0.0.7 | Built motion from commit d24580c. 0.0.7
authorMotion Team <team@xcally.com>
Wed, 9 Dec 2015 18:32:17 +0000 (19:32 +0100)
committerMotion Team <team@xcally.com>
Wed, 9 Dec 2015 18:32:17 +0000 (19:32 +0100)
67 files changed:
package.json
public/app/c7518ced.app.js [moved from public/app/04405547.app.js with 83% similarity]
public/assets/plugins/angular-elastic-builder-back/.bower.json [deleted file]
public/assets/plugins/angular-elastic-builder-back/LICENSE.md [deleted file]
public/assets/plugins/angular-elastic-builder-back/README.md [deleted file]
public/assets/plugins/angular-elastic-builder-back/bower.json [deleted file]
public/assets/plugins/angular-elastic-builder-back/dist/angular-elastic-builder.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/dist/angular-elastic-builder.min.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/examples/index.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/examples/index.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/examples/js/exampleApp.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/gulpfile.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/package.json [deleted file]
public/assets/plugins/angular-elastic-builder-back/screenshot.png [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/directives/BuilderDirective.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/directives/Chooser.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/directives/Group.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/directives/Rule.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/directives/RuleTypes.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/module.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/services/GroupClassHelper.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/services/QueryService.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/BuilderDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/ChooserDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/ElasticBuilderTemplates.js [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/GroupDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/RuleDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Boolean.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Date.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Multi.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Number.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Select.html [deleted file]
public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Term.html [deleted file]
public/assets/plugins/angular-elastic-builder/.bower.json [deleted file]
public/assets/plugins/angular-elastic-builder/LICENSE.md [deleted file]
public/assets/plugins/angular-elastic-builder/README.md [deleted file]
public/assets/plugins/angular-elastic-builder/bower.json [deleted file]
public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder.js [deleted file]
public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder.min.js [deleted file]
public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder_old.js [deleted file]
public/assets/plugins/angular-elastic-builder/examples/index.html [deleted file]
public/assets/plugins/angular-elastic-builder/examples/index.js [deleted file]
public/assets/plugins/angular-elastic-builder/examples/js/exampleApp.js [deleted file]
public/assets/plugins/angular-elastic-builder/gulpfile.js [deleted file]
public/assets/plugins/angular-elastic-builder/package.json [deleted file]
public/assets/plugins/angular-elastic-builder/screenshot.png [deleted file]
public/assets/plugins/angular-elastic-builder/src/directives/BuilderDirective.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/directives/Chooser.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/directives/Group.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/directives/Rule.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/directives/RuleTypes.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/module.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/services/GroupClassHelper.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/services/QueryService.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/BuilderDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/ChooserDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/ElasticBuilderTemplates.js [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/GroupDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/RuleDirective.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/types/Boolean.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/types/Date.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/types/Multi.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/types/Multiterm.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/types/Number.html [deleted file]
public/assets/plugins/angular-elastic-builder/src/tmpl/types/Term.html [deleted file]
public/index.html
release-notes/changelog_0.0.7.txt [moved from release-notes/changelog_0.0.6.txt with 70% similarity]

index 02fd002..f6f4dac 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "motion",
-  "version": "0.0.7",
+  "version": "0.0.8",
   "main": "server/app.js",
   "dependencies": {
     "accept-language-parser": "^1.0.2",
similarity index 83%
rename from public/app/04405547.app.js
rename to public/app/c7518ced.app.js
index 9fcdbd7..9856bbc 100644 (file)
@@ -7,15 +7,14 @@ c.workspaces=[],c.mainTab={active:!0},a.$on("$viewContentLoaded",function(){Metr
 }],a.queueAnnounces=[{display_name:"Default",value:null},{display_name:"Disabled",value:""}];var h=function(){return{select:function(c){b.post("/api/voice/queues/"+a.queue.name+"/agents",{agents:c}).success(function(){a.getTeams()}).error(function(a){console.error(a)})},deselect:function(c){b.put("/api/voice/queues/"+a.queue.name+"/agents",{agents:c}).success(function(){a.getTeams()}).error(function(a){console.error(a)})}}};a.getQueue=function(){b.get("/api/voice/queues/"+e.id).success(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(","),a.queue=b}).error(function(a){g.path("/voice/queues/list")})},a.updateVoiceQueue=function(){var f=angular.copy(a.queue);f.joinempty=f.joinempty.join(","),f.leavewhenempty=f.leavewhenempty.join(","),f.periodic_announce=f.periodic_announce.join(","),f.context||(f.context=null),b.put("/api/voice/queues/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),f.joinempty=f.joinempty.split(","),f.leavewhenempty=f.leavewhenempty.split(","),f.periodic_announce=f.periodic_announce.split(","),a.queue=f})},a.getTeams=function(){b.get("/api/teams").success(function(c){a.teams=c.rows,b({url:"/api/voice/user_has_queues",method:"GET",params:{queue:a.queue.name}}).success(function(b){ComponentsDropdowns.bindQueue(a.teams,_.pluck(b,"UserId"),h)})}).error(function(a){console.error(a)})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b.rows,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){c.show(d.instant(a.message),"danger")})},a.getMohs=function(){b.get("/api/voice/musiconholds").success(function(b){a.voiceMohs=b.rows,f.syncUpdates("voice_musiconhold",a.voiceMohs)}).error(function(a){c.show(a.message,"danger")})},a.getSounds=function(){b.get("/api/uploads").success(function(b){a.queueAnnounces=a.queueAnnounces.concat(b),a.periodicAnnounces=angular.copy(b),b.unshift({display_name:"None",converted_path:null,value:""}),a.sounds=b,f.syncUpdates("upload",a.sounds)}).error(function(a){console.error(a)})},a.returnAnnouncePath=function(a){return console.log("func"),a.converted_path?a.converted_path+"/"+a.save_name:null===a.value?null:a.value}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.queues.view",{url:"/view/:id",templateUrl:"app/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.voice.queues.view.settings",{url:"/settings",templateUrl:"app/voice/queue/view/view.settings.html"}).state("main.voice.queues.view.agents",{url:"/agents",templateUrl:"app/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/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.forms={queue:void 0},a.item={},a.next=function(){b.post("/api/voice/queues/validate/",a.item).success(function(a){console.log(a),a.length?e.show(g.instant("MESSAGE_EXIST_QUEUE"),"danger"):c.wizard().next()}).error(function(a){e.show(g.instant(a.message),"danger")})},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("/api/voice/queues/",a.item).success(function(){d.path("/voice/queues/list")}).error(function(a){e.show(g.instant(a.message),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.queues.wizard",{url:"/wizard",templateUrl:"app/voice/queue/wizard/wizard.html",controller:"VoiceQueueWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentCtrl",["$scope","$http","$log","$uibModal","$translate","socket","xAlert",function(a,b,c,d,e,f,g){a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){f.unsyncUpdates("user_has_voice_queue")}),a.groups=[],a.pauses=["pausa1","pausa2","pausa3"],a.pause=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/voice/realtime/view/agent/pause.modal.html",controller:"VoiceRealtimeViewAgentPauseModalCtrl",resolve:{items:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.add=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/voice/realtime/view/agent/queue.modal.add.html",controller:"VoiceRealtimeViewAgentQueueModalCtrl",resolve:{pauses:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){console.log(a),b.post("/api/voice/user_has_queues",a).then(function(){a.login?b.post("/api/ami",a).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.remove=function(a,f){var h=d.open({animation:!0,size:a,templateUrl:"app/voice/realtime/view/agent/queue.modal.remove.html",controller:"VoiceRealtimeViewAgentQueueModalCtrl",resolve:{pauses:function(){return null},data:function(){return f}}});h.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.initAgents=function(){b.get("/api/voice/user_has_queues").success(function(b){a.agents=b,a.groups=_.map(_.groupBy(a.agents,"membername"),function(a,b){return{membername:b,queues:a}}),f.socket.on("user_has_voice_queue:save",function(b){var c=_.find(a.groups,{membername:b.membername}),d=a.groups.indexOf(c);if(c){var e=_.find(c.queues,{queue:b.queue});e?_.merge(e,b):a.groups[d].queues.push(b)}else{var f={membername:b.membername,queues:[b]};a.groups.unshift(f)}}),f.socket.on("user_has_voice_queue:remove",function(b){var c=_.find(a.groups,{membername:b.membername});_.remove(c.queues,{queue:b.queue}),c.queues.length||_.remove(a.groups,{membername:b.membername})}),f.socket.on("report_agent:save",function(b){var c=_.find(a.groups,{membername:b.membername}),d=a.groups.indexOf(c);if(c){var e=_.find(c.queues,{queue:b.queue});e?_.merge(e,b):a.groups[d].queues.push(b)}else{var f={membername:b.membername,queues:[b]};a.groups.unshift(f)}})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentPauseModalCtrl",["$scope","$uibModalInstance","items","data",function(a,b,c,d){a.items=c,a.data=d,a.selected={item:a.items[0],queue:_.isArray(d)?a.data[0].queue:a.data.queue,membername:_.isArray(d)?a.data[0].membername:a.data.membername,"interface":_.isArray(d)?a.data[0]["interface"]:a.data["interface"]},a.ok=function(c){var e={action:"QueuePause","interface":a.selected["interface"],paused:c,reason:a.selected.item};_.isArray(d)||(e.queue=a.selected.queue),b.close(e)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","pauses","data",function(a,b,c,d,e){a.initAdd=function(){a.data=e,a.pauses=d,a.selected={membername:a.data[0].membername,"interface":a.data[0]["interface"],penalty:0,paused:!1,reason:a.pauses[0],UserId:a.data[0].UserId},c.get("/api/voice/queues",{params:{page:0,per_page:100}}).success(function(b){a.queues=_.reject(b.rows,function(b){return _.find(a.data,{queue:b.name})?!0:!1}),a.selected.queue=a.queues[0]?a.queues[0].name:null,console.log(a.queues)}).error(function(a){console.error(a)})},a.initRemove=function(){a.data=e,_.isArray(e)?a.selected={membername:a.data[0].membername,"interface":a.data[0]["interface"],logout:!1,UserId:a.data[0].UserId}:a.selected={membername:a.data.membername,"interface":a.data["interface"],queue:a.data.queue,logout:!1,UserId:a.data.UserId}},a.okAdd=function(){console.log(a.selected);var c={action:"QueueAdd",logged:a.data[0].logged,loggedAt:a.data[0].loggedAt,queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],penalty:a.selected.penalty,paused:a.selected.paused,UserId:a.selected.UserId};c.paused&&(c.reason=a.selected.reason),b.close(c)},a.okRemove=function(){var c;_.isArray(a.data)?(c=[],a.data.forEach(function(b){c.push({action:"QueueRemove",queue:b.queue,"interface":b["interface"],logout:a.selected.logout,UserId:b.UserId})})):c={action:"QueueRemove",queue:a.selected.queue,logout:a.selected.logout,"interface":a.selected["interface"],UserId:a.selected.UserId},b.close(c)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentReportCtrl",["$scope","$http","socket",function(a,b,c){a.$on("$destroy",function(){c.unsyncUpdates("report_agent")}),a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.initReport=function(){a.agents=[],b.get("/api/report/agents").success(function(b){a.agents=b,c.syncUpdates("report_agent",a.agents)}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").filter("VoiceRealtimeViewAgentReportFilter",function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueReportCtrl",["$scope","$http","socket",function(a,b,c){a.$on("$destroy",function(){c.unsyncUpdates("report_queue")}),a.conf={queuesByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.queuesByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.initReport=function(){a.queues=[],b.get("/api/report/queues").success(function(b){console.log(b),a.queues=b,c.syncUpdates("report_queue",a.queues)}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").filter("VoiceRealtimeViewQueueReportFilter",function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueuePauseModalCtrl",["$scope","$uibModalInstance","items","data",function(a,b,c,d){a.items=c,a.data=d,console.log(d),a.selected={item:a.items[0],queue:_.isArray(d)?a.data[0].queue:a.data.queue,membername:_.isArray(d)?a.data[0].membername:a.data.membername,"interface":_.isArray(d)?a.data[0]["interface"]:a.data["interface"]},a.ok=function(c,e){var f;_.isArray(d)?(f=[],d.forEach(function(b){f.push({action:"QueuePause",queue:b.queue,membername:b.membername,"interface":b["interface"],paused:c,reason:a.selected.item})})):f={action:"QueuePause",queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],paused:c,reason:a.selected.item},b.close(f)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCtrl",["$scope","$http","$log","$uibModal","$translate","socket","xAlert",function(a,b,c,d,e,f,g){a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){f.unsyncUpdates("user_has_voice_queue")}),a.groups=[],a.pauses=["pausa1","pausa2","pausa3"],a.pause=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/voice/realtime/view/queue/pause.modal.html",controller:"VoiceRealtimeViewQueuePauseModalCtrl",resolve:{items:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.add=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/voice/realtime/view/queue/queue.modal.add.html",controller:"VoiceRealtimeViewQueueQueueModalCtrl",resolve:{pauses:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){console.log("action",a),b.post("/api/voice/user_has_queues",a).then(function(){a.login?b.post("/api/ami",a).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")}),console.log(a)},function(){c.info("Modal dismissed at: "+new Date)})},a.remove=function(a,f){var h=d.open({animation:!0,size:a,templateUrl:"app/voice/realtime/view/queue/queue.modal.remove.html",controller:"VoiceRealtimeViewQueueQueueModalCtrl",resolve:{pauses:function(){return null},data:function(){return f}}});h.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.initQueues=function(){b.get("/api/voice/user_has_queues").success(function(b){a.queues=b,a.groups=_.map(_.groupBy(a.queues,"queue"),function(a,b){return{queue:b,agents:a}}),console.log("ok"),f.socket.on("user_has_voice_queue:save",function(b){console.log("item",b);var c=_.find(a.groups,{queue:b.queue}),d=a.groups.indexOf(c);if(c){var e=_.find(c.agents,{membername:b.membername});e?_.merge(e,b):a.groups[d].agents.push(b)}else{var f={queue:b.queue,agents:[b]};a.groups.unshift(f)}}),f.socket.on("user_has_voice_queue:remove",function(b){var c=_.find(a.groups,{queue:b.queue});_.remove(c.agents,{membername:b.membername}),c.agents.length||_.remove(a.groups,{queue:b.queue})}),f.socket.on("report_agent:save",function(b){var c=_.find(a.groups,{queue:b.queue}),d=a.groups.indexOf(c);if(c){var e=_.find(c.agents,{membername:b.membername});e?_.merge(e,b):a.groups[d].agents.push(b)}else{var f={queue:b.queue,agents:[b]};a.groups.unshift(f)}})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueQueueModalCtrl",["$scope","$uibModalInstance","$http","pauses","data",function(a,b,c,d,e){a.initAdd=function(){a.data=e,a.pauses=d,a.selected={penalty:0,paused:!1,reason:a.pauses[0]},a.$watch("selected.agent",function(b){b&&(a.selected.membername=b.name,a.selected["interface"]="SIP/"+b.name,a.selected.UserId=b.id)}),c.get("/api/agents",{params:{page:0,per_page:500}}).success(function(b){a.agents=_.reject(b.rows,function(b){return _.find(a.data,{membername:b.name})?!0:!1}),a.selected.queue=a.data[0]?a.data[0].queue:null}).error(function(a){console.error(a)})},a.initRemove=function(){a.data=e,console.log(e),_.isArray(e)?a.selected={queue:a.data[0].queue,logout:!1}:a.selected={membername:a.data.membername,"interface":a.data["interface"],queue:a.data.queue,logout:!1,UserId:a.data.UserId}},a.okAdd=function(){var c={action:"QueueAdd",queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],penalty:a.selected.penalty,paused:a.selected.paused,UserId:a.selected.UserId};c.paused&&(c.reason=a.selected.reason),b.close(c)},a.okRemove=function(){var c;_.isArray(a.data)?(c=[],a.data.forEach(function(b){c.push({action:"QueueRemove",queue:b.queue,"interface":b["interface"],logout:a.selected.logout,UserId:b.UserId})})):c={action:"QueueRemove",queue:a.selected.queue,logout:a.selected.logout,"interface":a.selected["interface"],UserId:a.selected.UserId},b.close(c)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"View1",link:"main.voice.realtime.view.agents"},{name:"View2",link:"main.voice.realtime.view.areports"}],a.queues=[{name:"View1",link:"main.voice.realtime.view.queues"},{name:"View2",link:"main.voice.realtime.view.qreports"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.realtime.view",{url:"/view",templateUrl:"app/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"]}])}]}}).state("main.voice.realtime.view.queues",{url:"/queues",controller:"VoiceRealtimeViewQueueCtrl",templateUrl:"app/voice/realtime/view/queue/queue.html"}).state("main.voice.realtime.view.qreports",{url:"/qreport/:search",controller:"VoiceRealtimeViewQueueReportCtrl",templateUrl:"app/voice/realtime/view/qreport/report.html"}).state("main.voice.realtime.view.agents",{url:"/agents",controller:"VoiceRealtimeViewAgentCtrl",templateUrl:"app/voice/realtime/view/agent/agent.html"}).state("main.voice.realtime.view.areports",{url:"/areport",controller:"VoiceRealtimeViewAgentReportCtrl",templateUrl:"app/voice/realtime/view/areport/report.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.inbound",{url:"/inbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={routesByPage:{name:"10",value:10}},a.routesByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.routes={checked:[]},a.check=function(b){b?a.routes.checked=angular.copy(_.pluck(a.displayedRoutes,"id")):a.routes.checked=[]},a.getRoutes=function(b){return _.map(a.displayedRoutes,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){c.unsyncUpdates("voice_extension"),b.url="/api/voice/extensions/route/inbound",h.getPage(b).then(function(c){a.displayedRoutes=c.rows,b.pagination.numberOfPages=c.total_pages,e.updateTableConfig(a.routesByPage,a.displayedRoutes.length),e.updateTableConfig(a.conf.routesByPage,a.displayedRoutes.length)}),c.socket.on("voice_extension:save",function(c){"inbound"===c.type&&a.initList(b)}),c.socket.on("voice_extension:remove",function(c){"inbound"===c.type&&(a.routes.checked=_.without(a.routes.checked,c.id),a.initList(b))})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/voice/extensions/"+a).success(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/voice/extensions/",{params:{id:a.routes.checked}}).success(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(d.instant(a.message),"danger")})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.inbound.list",{url:"/list",templateUrl:"app/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","$http","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=c,a.$application=j.application,a.$interval=k.interval,a.initApplication=function(){a.forms={settings:void 0,interval:void 0},a.application={VoiceExtensionId:d.id,type:"inbound"},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.joinInterval=function(a){console.log(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.toLowerCase(),a.wd_to&&"always"!==a.wd_to&&(c+="-"+a.wd_to.toLowerCase())):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.toLowerCase(),a.m_to&&"always"!==a.m_to&&(e+="-"+a.m_to.toLowerCase())):e="*",b+","+c+","+d+","+e},a.$watch("main.app",function(c){if(c){var e,f;switch(d.appId||(a.application={VoiceExtensionId:d.id,type:"inbound",interval:a.application.interval}),c){case"Queue":e="api/voice/queues",f="/api/uploads";break;case"Playback":e="/api/uploads";break;case"AGI":e="/api/square/projects";break;case"Goto":e="/api/voice/contexts";break;default:e=null,f=null}e&&b.get(e).success(function(b){a.items="Playback"!==c?b.rows:b}),f&&b.get(f).success(function(b){a.items2=b})}},!0),a.getIntervals=function(){b.get("/api/intervals").success(function(b){a.Intervals=b.rows,e.syncUpdates("interval",a.Intervals)}).error(function(a){i.show(c.instant(a.message),"danger")})},a.getRouteApplications=function(){b.get("/api/voice/extensions/"+d.id+"/applications").success(function(b){a.routeApplications=b,e.unsyncUpdates("voice_extension"),e.socket.on("voice_extension:remove",function(b){b.where.appGroup&&_.remove(a.routeApplications,function(a){return b.where.appGroup==a.appGroup})}),e.socket.on("voice_extension:save",function(b){if(b.VoiceExtensionId===d.id&&b.isApp){var c=_.find(a.routeApplications,{id:b.id});c||a.routeApplications.push(b)}})})},a.sortableOptions={stop:function(){b.post("api/voice/extensions/"+d.id+"/applications",{applications:_.pluck(a.routeApplications,"appGroup")}).success(function(b){a.getRouteApplications()}).error(function(a){console.error(a)})},"ui-floating":!0},a.getRoute=function(){b.get("/api/voice/extensions/"+d.id).success(function(b){a.route=b,e.socket.on("voice_extension:update",function(b){b.id==d.id&&(a.route=b)})}).error(function(a){f.path("/voice/routes/inbound/list")})},a.getApplication=function(){b.get("/api/voice/extensions/applications/"+d.appId).success(function(b){var c=_.filter(a.$application.applications,function(a){return a.value===b.app});if(c.length>0&&!b.customApp?a.main.app=b.app:a.main.app="custom",a.application=b,a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),"Queue"===b.app&&(a.application.app_options=b.app_options?b.app_options.split(","):[]),a.interval.intType=b.IntervalId?"list":"*,*,*,*"===b.interval?"always":"custom",a.interval.IntervalId=b.IntervalId,!b.IntervalId){var d,e=b.interval?b.interval.split(","):["*","*","*","*"];e.forEach(function(b,c){switch(c){case 0:"*"!==b?(d=b.split("-"),a.interval.t_from=moment(d[0],"HH:mm"),a.interval.t_to=moment(d[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:"*"!==b?(d=b.split("-"),a.interval.wd_from=_.capitalize(d[0]),a.interval.wd_to=d[1]?_.capitalize(d[1]):"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==b?(d=b.split("-"),a.interval.md_from=d[0],a.interval.md_to=d[1]?d[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==b?(d=b.split("-"),a.interval.m_from=_.capitalize(d[0]),a.interval.m_to=d[1]?_.capitalize(d[1]):"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}).error(function(a){f.path("/voice/routes/inbound/view/"+d.id+"/applications")})},a.updateRoute=function(){var e=angular.copy(a.route);b.put("/api/voice/extensions/"+d.id,e).success(function(){i.show(c.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){i.show(c.instant(b.message),"danger"),a.route=e})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b.rows,e.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){i.show(c.instant(a.message),"danger")})},a.createItem=function(){switch(a.application.app=a.main.app,a.application.exten=a.route.exten,a.application.context=a.route.context,a.application.app_options&&"Queue"===a.application.app&&(a.application.app_options=a.application.app_options.join(",")),a.interval.intType){case"list":a.application.IntervalId=a.interval.IntervalId,a.application.interval=_.result(_.find(a.Intervals,{id:a.interval.IntervalId}),"name");break;case"custom":a.application.IntervalId=null,a.application.interval=a.joinInterval(a.interval);break;case"always":a.application.IntervalId=null,a.application.interval="*,*,*,*"}b.post("/api/voice/extensions/",a.application).success(function(){f.path("/voice/routes/inbound/view/"+d.id+"/applications")}).error(function(a){i.show(c.instant(a.message),"danger")})},a.updateItem=function(){switch(a.application.app_options&&"Queue"===a.application.app&&(a.application.app_options=a.application.app_options.join(",")),a.interval.intType){case"list":a.application.IntervalId=a.interval.IntervalId,a.application.interval=_.result(_.find(a.Intervals,{id:a.interval.IntervalId}),"name");break;case"custom":a.application.IntervalId=null,a.application.interval=a.joinInterval(a.interval);break;case"always":a.application.IntervalId=null,a.application.interval="*,*,*,*"}b.put("/api/voice/extensions/applications/"+d.appId,a.application).success(function(){i.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),f.path("/voice/routes/inbound/view/"+d.id+"/applications")}).error(function(a){i.show(c.instant(a.message),"danger")})},a.deleteItem=h.confirm["delete"](function(d){b["delete"]("/api/voice/extensions/"+d).success(function(){a.getRouteApplications(),i.show(c.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){i.show(c.instant(a.message),"danger")})}),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.voice.routes.inbound.view",{url:"/view/:id",templateUrl:"app/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.voice.routes.inbound.view.settings",{url:"/settings",templateUrl:"app/voice/route/inbound/view/view.settings.html"}).state("main.voice.routes.inbound.view.applications",{url:"/applications",templateUrl:"app/voice/route/inbound/view/view.applications.html",cache:!1}).state("main.voice.routes.inbound.view.application",{url:"/application",templateUrl:"app/voice/route/inbound/view/view.application.html",authenticate:!0}).state("main.voice.routes.inbound.view.applications.settings",{url:"/settings/:appId",templateUrl:"app/voice/route/inbound/view/view.applicationSettings.html",authenticate:!0,controller:"VoiceRouteInboundViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.forms={route:void 0},a.item={type:"inbound",appdata:"Inbound Call",context:"from-voip-provider"},a.next=function(){b.post("/api/voice/extensions/validate/",a.item).success(function(a){console.log(a),a.length?e.show(g.instant("MESSAGE_EXIST_ROUTE"),"danger"):c.wizard().next()}).error(function(a){e.show(g.instant(a.message),"danger")})},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("/api/voice/extensions/",a.item).success(function(a){d.path("/voice/routes/inbound/view/"+a.id+"/applications")}).error(function(a){e.show(g.instant(a.message),"danger")})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){e.show(g.instant(a.message),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.inbound.wizard",{url:"/wizard",templateUrl:"app/voice/route/inbound/wizard/wizard.html",controller:"VoiceRouteInboundWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={routesByPage:{name:"10",value:10}},a.routesByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.routes={checked:[]},a.check=function(b){b?a.routes.checked=angular.copy(_.pluck(a.displayedRoutes,"id")):a.routes.checked=[]},a.getRoutes=function(b){return _.map(a.displayedRoutes,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){c.unsyncUpdates("voice_extension"),b.url="/api/voice/extensions/route/internal",h.getPage(b).then(function(c){a.displayedRoutes=c.rows,b.pagination.numberOfPages=c.total_pages,e.updateTableConfig(a.routesByPage,a.displayedRoutes.length),e.updateTableConfig(a.conf.routesByPage,a.displayedRoutes.length)}),c.socket.on("voice_extension:save",function(c){"internal"===c.type&&a.initList(b)}),c.socket.on("voice_extension:remove",function(c){"internal"===c.type&&(a.routes.checked=_.without(a.routes.checked,c.id),a.initList(b))})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/voice/extensions/"+a).success(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/voice/extensions/",{params:{id:a.routes.checked}}).success(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(d.instant(a.message),"danger");
 })})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.internal.list",{url:"/list",templateUrl:"app/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","$http","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=c,a.$application=j.application,a.$interval=k.interval,a.initApplication=function(){a.forms={settings:void 0,interval:void 0},a.application={VoiceExtensionId:d.id,type:"internal"},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.joinInterval=function(a){console.log(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.toLowerCase(),a.wd_to&&"always"!==a.wd_to&&(c+="-"+a.wd_to.toLowerCase())):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.toLowerCase(),a.m_to&&"always"!==a.m_to&&(e+="-"+a.m_to.toLowerCase())):e="*",b+","+c+","+d+","+e},a.$watch("main.app",function(c){if(c){var e,f;switch(d.appId||(a.application={VoiceExtensionId:d.id,type:"internal",interval:a.application.interval}),c){case"Queue":e="api/voice/queues",f="/api/uploads";break;case"Playback":e="/api/uploads";break;case"AGI":e="/api/square/projects";break;case"Goto":e="/api/voice/contexts";break;default:e=null,f=null}e&&b.get(e).success(function(b){a.items="Playback"!==c?b.rows:b}),f&&b.get(f).success(function(b){a.items2=b})}},!0),a.getIntervals=function(){b.get("/api/intervals").success(function(b){a.Intervals=b.rows,e.syncUpdates("interval",a.Intervals)}).error(function(a){i.show(c.instant(a.message),"danger")})},a.getRouteApplications=function(){b.get("/api/voice/extensions/"+d.id+"/applications").success(function(b){a.routeApplications=b,e.unsyncUpdates("voice_extension"),e.socket.on("voice_extension:remove",function(b){b.where.appGroup&&_.remove(a.routeApplications,function(a){return b.where.appGroup==a.appGroup})}),e.socket.on("voice_extension:save",function(b){if(b.VoiceExtensionId===d.id&&b.isApp){var c=_.find(a.routeApplications,{id:b.id});c||a.routeApplications.push(b)}})})},a.sortableOptions={stop:function(){b.post("api/voice/extensions/"+d.id+"/applications",{applications:_.pluck(a.routeApplications,"appGroup")}).success(function(b){a.getRouteApplications()}).error(function(a){console.error(a)})},"ui-floating":!0},a.getRoute=function(){b.get("/api/voice/extensions/"+d.id).success(function(b){a.route=b,e.socket.on("voice_extension:update",function(b){b.id==d.id&&(a.route=b)})}).error(function(a){console.error(a),f.path("/voice/routes/internal/list")})},a.getApplication=function(){b.get("/api/voice/extensions/applications/"+d.appId).success(function(b){var c=_.filter(a.applications,function(a){return a.value===b.app});if(c.length>0&&!b.customApp?a.main.app=b.app:a.main.app="custom",a.application=b,a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),"Queue"===b.app&&(a.application.app_options=b.app_options?b.app_options.split(","):[]),a.interval.intType=b.IntervalId?"list":"custom",a.interval.IntervalId=b.IntervalId,!b.IntervalId){var d,e=b.interval?b.interval.split(","):["*","*","*","*"];e.forEach(function(b,c){switch(c){case 0:"*"!==b?(d=b.split("-"),a.interval.t_from=moment(d[0],"HH:mm"),a.interval.t_to=moment(d[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:"*"!==b?(d=b.split("-"),a.interval.wd_from=_.capitalize(d[0]),a.interval.wd_to=d[1]?_.capitalize(d[1]):"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==b?(d=b.split("-"),a.interval.md_from=d[0],a.interval.md_to=d[1]?d[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==b?(d=b.split("-"),a.interval.m_from=_.capitalize(d[0]),a.interval.m_to=d[1]?_.capitalize(d[1]):"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}).error(function(a){f.path("/voice/routes/internal/view/"+d.id+"/applications")})},a.updateRoute=function(){var e=angular.copy(a.route);b.put("/api/voice/extensions/"+d.id,e).success(function(){i.show(c.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){i.show(c.instant(b.message),"danger"),a.route=e})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b.rows,e.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){i.show(c.instant(a.message),"danger")})},a.createItem=function(){switch(a.application.app=a.main.app,a.application.exten=a.route.exten,a.application.context=a.route.context,a.application.app_options&&"Queue"===a.application.app&&(a.application.app_options=a.application.app_options.join(",")),a.interval.intType){case"list":a.application.IntervalId=a.interval.IntervalId,a.application.interval=_.result(_.find(a.Intervals,{id:a.interval.IntervalId}),"name");break;case"custom":a.application.IntervalId=null,a.application.interval=a.joinInterval(a.interval);break;case"always":a.application.IntervalId=null,a.application.interval="*,*,*,*"}b.post("/api/voice/extensions/",a.application).success(function(){f.path("/voice/routes/internal/view/"+d.id+"/applications")}).error(function(a){i.show(c.instant(a.message),"danger")})},a.updateItem=function(){switch(a.application.app_options&&"Queue"===a.application.app&&(a.application.app_options=a.application.app_options.join(",")),a.interval.intType){case"list":a.application.IntervalId=a.interval.IntervalId,a.application.interval=_.result(_.find(a.Intervals,{id:a.interval.IntervalId}),"name");break;case"custom":a.application.IntervalId=null,a.application.interval=a.joinInterval(a.interval);break;case"always":a.application.IntervalId=null,a.application.interval="*,*,*,*"}b.put("/api/voice/extensions/applications/"+d.appId,a.application).success(function(){i.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),f.path("/voice/routes/internal/view/"+d.id+"/applications")}).error(function(a){i.show(c.instant(a.message),"danger")})},a.deleteItem=h.confirm["delete"](function(d){b["delete"]("/api/voice/extensions/"+d).success(function(b){a.getRouteApplications(),i.show(c.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){i.show(c.instant(a.message),"danger")})}),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.voice.routes.internal.view",{url:"/view/:id",templateUrl:"app/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.voice.routes.internal.view.settings",{url:"/settings",templateUrl:"app/voice/route/internal/view/view.settings.html"}).state("main.voice.routes.internal.view.applications",{url:"/applications",templateUrl:"app/voice/route/internal/view/view.applications.html",cache:!1}).state("main.voice.routes.internal.view.application",{url:"/application",templateUrl:"app/voice/route/internal/view/view.application.html",authenticate:!0}).state("main.voice.routes.internal.view.applications.settings",{url:"/settings/:appId",templateUrl:"app/voice/route/internal/view/view.applicationSettings.html",authenticate:!0,controller:"VoiceRouteInternalViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.forms={route:void 0},a.item={type:"internal",appdata:"Iternal Call",context:"from-sip"},a.next=function(){b.post("/api/voice/extensions/validate/",a.item).success(function(a){console.log(a),a.length?e.show(g.instant("MESSAGE_EXIST_ROUTE"),"danger"):c.wizard().next()}).error(function(a){e.show(g.instant(a.message),"danger")})},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("/api/voice/extensions/",a.item).success(function(a){d.path("/voice/routes/internal/view/"+a.id+"/applications")}).error(function(a){e.show(g.instant(a.message),"danger")})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){e.show(g.instant(a.message),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.internal.wizard",{url:"/wizard",templateUrl:"app/voice/route/internal/wizard/wizard.html",controller:"VoiceRouteInternalWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCtrl",["$scope","$http","socket","$rootScope","$translate","xAlert","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={routesByPage:{name:"10",value:10}},a.routesByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.routes={checked:[]},a.check=function(b){b?a.routes.checked=angular.copy(_.pluck(a.displayedRoutes,"id")):a.routes.checked=[]},a.getRoutes=function(b){return _.map(a.displayedRoutes,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){c.unsyncUpdates("voice_extension"),b.url="/api/voice/extensions/route/outbound",h.getPage(b).then(function(c){a.displayedRoutes=c.rows,b.pagination.numberOfPages=c.total_pages,d.updateTableConfig(a.routesByPage,a.displayedRoutes.length),d.updateTableConfig(a.conf.routesByPage,a.displayedRoutes.length)}),c.socket.on("voice_extension:save",function(c){"outbound"===c.type&&a.initList(b)}),c.socket.on("voice_extension:remove",function(c){"outbound"===c.type&&(a.routes.checked=_.without(a.routes.checked,c.id),a.initList(b))})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/voice/extensions/"+a).success(function(){f(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/voice/extensions/",{params:{id:a.routes.checked}}).success(function(){f.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(e.instant(a.message),"danger")})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.outbound.list",{url:"/list",templateUrl:"app/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.voice.routes.outbound",{url:"/outbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","application","interval",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=d,a.$application=j.application,a.$interval=k.interval,a.initApplication=function(){a.forms={info:void 0,interval:void 0},a.application={VoiceExtensionId:e.id,type:"outbound"},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:"Dial",value:"Dial"},{name:"Custom",value:"custom"}]},a.joinInterval=function(a){console.log(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.toLowerCase(),a.wd_to&&"always"!==a.wd_to&&(c+="-"+a.wd_to.toLowerCase())):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.toLowerCase(),a.m_to&&"always"!==a.m_to&&(e+="-"+a.m_to.toLowerCase())):e="*",b+","+c+","+d+","+e},a.$watch("main.app",function(c){if(c){var d,f;switch(e.appId||(a.application={VoiceExtensionId:e.id,type:"outbound",interval:a.application.interval}),c){case"Dial":d="api/trunks",f="/api/voice/contexts";break;default:d=null,f=null}d&&b.get(d).success(function(b){a.items="Dial"===c?b.rows:b}),f&&b.get(f).success(function(b){a.items2="Dial"===c?b.rows:b})}},!0),a.$watch("application.TrunkId",function(b){b&&(a.application.trunk=_.result(_.find(a.items,{id:b}),"name"))},!0),a.getIntervals=function(){b.get("/api/intervals").success(function(b){a.Intervals=b.rows,f.syncUpdates("interval",a.Intervals)}).error(function(a){c.show(d.instant(a.message),"danger")})},a.getRouteApplications=function(){b.get("/api/voice/extensions/"+e.id+"/applications").success(function(b){a.routeApplications=b,f.unsyncUpdates("voice_extension"),f.socket.on("voice_extension:remove",function(b){b.where.appGroup&&_.remove(a.routeApplications,function(a){return b.where.appGroup==a.appGroup})}),f.socket.on("voice_extension:save",function(b){if(b.VoiceExtensionId===e.id&&b.isApp){var c=_.find(a.routeApplications,{id:b.id});c||a.routeApplications.push(b)}})})},a.sortableOptions={stop:function(){b.post("api/voice/extensions/"+e.id+"/applications",{applications:_.pluck(a.routeApplications,"appGroup")}).success(function(){a.getRouteApplications()}).error(function(a){console.error(a)})},"ui-floating":!0},a.getRoute=function(){b.get("/api/voice/extensions/"+e.id).success(function(b){a.route=b,f.socket.on("voice_extension:update",function(b){b.id==e.id&&(a.route=b)})}).error(function(a){g.path("/voice/routes/outbound/list")})},a.getApplication=function(){b.get("/api/voice/extensions/applications/"+e.appId).success(function(b){var c=_.filter(a.applications,function(a){return a.value===b.app});if(c.length>0&&!b.customApp?a.main.app=b.app:a.main.app="custom",a.application=b,a.interval.intType=b.IntervalId?"list":"custom",a.interval.IntervalId=b.IntervalId,!b.IntervalId){var d,e=b.interval?b.interval.split(","):["*","*","*","*"];e.forEach(function(b,c){switch(c){case 0:"*"!==b?(d=b.split("-"),a.interval.t_from=moment(d[0],"HH:mm"),a.interval.t_to=moment(d[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:"*"!==b?(d=b.split("-"),a.interval.wd_from=_.capitalize(d[0]),a.interval.wd_to=d[1]?_.capitalize(d[1]):"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==b?(d=b.split("-"),a.interval.md_from=d[0],a.interval.md_to=d[1]?d[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==b?(d=b.split("-"),a.interval.m_from=_.capitalize(d[0]),a.interval.m_to=d[1]?_.capitalize(d[1]):"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}).error(function(a){console.error(a),g.path("/voice/routes/outbound/view/"+e.id+"/routes")})},a.updateRoute=function(){var f=angular.copy(a.route);b.put("/api/voice/extensions/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.route=f})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b.rows,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){c.show(d.instant(a.message),"danger")})},a.createItem=function(){switch(a.application.app=a.main.app,a.application.exten=a.route.exten,a.application.context=a.route.context,a.interval.intType){case"list":a.application.IntervalId=a.interval.IntervalId,a.application.interval=_.result(_.find(a.Intervals,{id:a.interval.IntervalId}),"name");break;case"custom":a.application.IntervalId=null,a.application.interval=a.joinInterval(a.interval);break;case"always":a.application.IntervalId=null,a.application.interval="*,*,*,*"}b.post("/api/voice/extensions/",a.application).success(function(){g.path("/voice/routes/outbound/view/"+e.id+"/routes")}).error(function(a){c.show(d.instant(a.message),"danger")})},a.updateItem=function(){switch(a.interval.intType){case"list":a.application.IntervalId=a.interval.IntervalId,a.application.interval=_.result(_.find(a.Intervals,{id:a.interval.IntervalId}),"name");break;case"custom":a.application.IntervalId=null,a.application.interval=a.joinInterval(a.interval);break;case"always":a.application.IntervalId=null,a.application.interval="*,*,*,*"}b.put("/api/voice/extensions/applications/"+e.appId,a.application).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),g.path("/voice/routes/outbound/view/"+e.id+"/routes")}).error(function(a){c.show(d.instant(a.message),"danger")})},a.deleteItem=i.confirm["delete"](function(e){b["delete"]("/api/voice/extensions/"+e).success(function(b){a.getRouteApplications(),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){c.show(d.instant(a.message),"danger")})}),a.goNext=function(){h.wizard().next()},a.previous=function(){h.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){f.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.outbound.view",{url:"/view/:id",templateUrl:"app/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.voice.routes.outbound.view.settings",{url:"/settings",templateUrl:"app/voice/route/outbound/view/view.settings.html"}).state("main.voice.routes.outbound.view.routes",{url:"/routes",templateUrl:"app/voice/route/outbound/view/view.routes.html",cache:!1}).state("main.voice.routes.outbound.view.route",{url:"/route",templateUrl:"app/voice/route/outbound/view/view.route.html",authenticate:!0}).state("main.voice.routes.outbound.view.routes.settings",{url:"/settings/:appId",templateUrl:"app/voice/route/outbound/view/view.routeSettings.html",authenticate:!0,controller:"VoiceRouteOutboundViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.forms={route:void 0},a.item={type:"outbound",appdata:"Outbound Call",context:"from-sip"},a.next=function(){b.post("/api/voice/extensions/validate/",a.item).success(function(a){console.log(a),a.length?e.show(g.instant("MESSAGE_EXIST_ROUTE"),"danger"):c.wizard().next()}).error(function(a){e.show(g.instant(a.message),"danger")})},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("/api/voice/extensions/",a.item).success(function(a){d.path("/voice/routes/outbound/view/"+a.id+"/routes")}).error(function(a){e.show(g.instant(a.message),"danger")})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){e.show(g.instant(a.message),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes.outbound.wizard",{url:"/wizard",templateUrl:"app/voice/route/outbound/wizard/wizard.html",controller:"VoiceRouteOutboundWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.routes",{url:"/routes",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice",{url:"/voice",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailListCtrl",["$scope","$http","$translate","$rootScope","xAlert","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={voicemailsByPage:{name:"10",value:10},labels:["mailbox","fullname","email"]},a.voicemailsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.voicemails={checked:[]},a.check=function(b,c){c?a.voicemails.checked=angular.copy(_.pluck(a.displayedVoicemails,"uniqueid")):a.voicemails.checked=[]},a.getVoicemails=function(b){return _.map(a.displayedVoicemails,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("voice_voicemail"),b.url="/api/voice/voicemails",h.getPage(b).then(function(c){a.displayedVoicemails=c.rows,b.pagination.numberOfPages=c.total_pages,d.updateTableConfig(a.voicemailsByPage,a.displayedVoicemails.length),d.updateTableConfig(a.conf.voicemailsByPage,a.displayedVoicemails.length)}),f.socket.on("voice_voicemail:save",function(){a.initList(b)}),f.socket.on("voice_voicemail:remove",function(c){a.voicemails.checked=_.without(a.voicemails.checked,c.uniqueid),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/voice/voicemails/"+a).success(function(){e.show(c.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){e.show(a.message,"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/voice/voicemails",{params:{uniqueid:a.voicemails.checked}}).success(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){e.show(c.instant(a.message),"danger")})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.voicemails.list",{url:"/list",templateUrl:"app/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","$http","xAlert","$translate","$stateParams","socket","$sce","Modal","$location",function(a,b,c,d,e,f,g,h,i){a.getVoicemail=function(){b.get("/api/voice/voicemails/"+e.uniqueid).success(function(b){delete b.password,delete b.stamp,a.voicemail=b}).error(function(a){console.error(a),i.path("/voice/voicemails/list")})},a.updateVoiceVoicemail=function(){var f=angular.copy(a.voicemail);b.put("/api/voice/voicemails/"+e.uniqueid,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.voicemail=f})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b.rows,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){c.show(a.message,"danger")})},a.getMessages=function(){b.get("/api/voice/voicemails/"+e.uniqueid+"/messages/").success(function(b){a.voicemailMessages=b,f.syncUpdates("voice_voicemail_messages",a.voicemailMessages)}).error(function(a){c.show(a.message,"danger")})},a.encodeRecording=function(a){return g.trustAsResourceUrl("data:audio/ogg;base64,"+j(a.data))},a.returnMessageDate=function(a){return a.split("T")[0]},a.returnDuration=function(a){return 1e3*a},a.deleteItem=h.confirm["delete"](function(a){b["delete"]("/api/voice/voicemails/messages/"+a+"/delete").success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){console.log(a),c.show(a.message,"danger")})});var j=function(a){for(var b=new Uint8Array(a),c=b.byteLength,d="",e=0;c>e;e++)d+=String.fromCharCode(b[e]);return window.btoa(d)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.voicemails.view",{url:"/view/:uniqueid",templateUrl:"app/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.voice.voicemails.view.settings",{url:"/settings",templateUrl:"app/voice/voicemail/view/view.settings.html"}).state("main.voice.voicemails.view.messages",{url:"/messages",templateUrl:"app/voice/voicemail/view/view.messages.html"})}]),angular.module("xCallyShuttleApp").controller("VoicemailCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.voicemails",{url:"/voicemails",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.initWizard=function(){a.forms={},a.item={}},a.next=function(){b.post("/api/voice/voicemails/validate/",a.item).success(function(a){a.length?e.show(g.instant("MESSAGE_EXIST_MAILBOX"),"danger"):c.wizard().next()}).error(function(a){e.show(a.message,"danger")})},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){a.item.customer_id=a.item.mailbox,b.post("/api/voice/voicemails/",a.item).success(function(){d.path("/voice/voicemails/list")}).error(function(a){e.show(a.message,"danger")})},a.getContexts=function(){b.get("/api/voice/contexts").success(function(b){a.voiceContexts=b.rows,f.syncUpdates("voice_context",a.voiceContexts)}).error(function(a){e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.voice.voicemails.wizard",{url:"/wizard",templateUrl:"app/voice/voicemail/wizard/wizard.html",controller:"VoiceVoicemailWizardCtrl"})}]),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","socket","$rootScope","$translate","xAlert","Modal","stResource","$uibModal","$log",function(a,b,c,d,e,f,g,h,i,j){a.conf={dashboardsByPage:{name:"10",value:10}},a.dashboardsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.dashboards={checked:[]},a.check=function(b,c){c?a.dashboards.checked=angular.copy(_.pluck(a.displayedDashboards,"id")):a.dashboards.checked=[]},a.getDashboards=function(b){return _.map(a.displayedDashboards,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){b.url="/api/dashboards",h.getPage(b).then(function(c){a.displayedDashboards=c.rows,b.pagination.numberOfPages=c.total_pages,d.updateTableConfig(a.dashboardsByPage,a.displayedDashboards.length),d.updateTableConfig(a.conf.dashboardsByPage,a.displayedDashboards.length)}),c.socket.on("dashboard:save",function(){a.initList(b)}),c.socket.on("dashboard:remove",function(c){a.dashboards.checked=_.without(a.dashboards.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/dashboards/"+a).success(function(){f.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/dashboards",{params:{id:a.dashboards.checked}}).success(function(){f.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}),a.create=function(){var a=i.open({animation:!0,templateUrl:"app/yourdashboard/list/create.modal.html",controller:"YourdashboardListCreateModalCtrl"});a.result.then(function(a){b.post("/api/dashboards",a).then(function(a){f.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.data.message,"danger")})},function(){j.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.yourdashboards.list",{url:"/list",templateUrl:"app/yourdashboard/list/list.html",controller:"YourdashboardListCtrl"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardShowCtrl",["$scope","localStorageService","$http","xAlert","$translate","Auth","$stateParams","$location",function(a,b,c,d,e,f,g,h){a.Auth=f,a.dashboard={name:"dashboard",structure:"4-8",enableconfirmdelete:!0,editable:f.isAdmin()?!0:!1,maximizable:!0,collapsible:!0},a.getDashboard=function(){c.get("/api/dashboards/"+g.id).success(function(b){b.model=JSON.parse(b.model),a.dashboard=_.merge(a.dashboard,b)}).error(function(a){h.path("/yourdashboards/list")})};var i=function(b,f,h){var i=angular.copy(a.dashboard);i.name=a.dashboard.model.title,i.model=JSON.stringify(i.model),c.put("/api/dashboards/"+g.id,i).success(function(){d.show(e.instant("MESSAGE_DASHBOARD_SAVED")+"!","success")}).error(function(b){d.show(b.message,"danger"),i.model=JSON.parse(i.model),i.name="dashboard",a.dashboard=i})};a.$on("adfDashboardChanged",i),a.$on("destroy",function(){console.log("main dashboard")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.yourdashboards.show",{url:"/show/:id",templateUrl:"app/yourdashboard/show/show.html",controller:"YourdashboardShowCtrl"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.getDashboard=function(){b.get("/api/dashboards/"+e.id).success(function(b){delete b.model,a.dashboard=b}).error(function(a){f.path("/yourdashboards/list")})},a.updateDashboard=function(){var f=angular.copy(a.dashboard);b.put("/api/dashboards/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.dashboard=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.yourdashboards.view",{url:"/view/:id",templateUrl:"app/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"]}])}]}}).state("main.yourdashboards.view.settings",{url:"/settings",templateUrl:"app/yourdashboard/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.yourdashboards",{url:"/yourdashboards",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskListCtrl",["$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(_.pluck(a.displayedZdAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedZdAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("zendesk_account"),b.url="/api/zendesk/accounts",h.getPage(b).then(function(d){a.displayedZdAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedZdAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedZdAccounts.length);
 }),f.socket.on("zendesk_account:save",function(){a.initList(b)}),f.socket.on("zendesk_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/zendesk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/zendesk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/zendesk/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.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").controller("ZendeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){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("zendesk_configuration"),g.unsyncUpdates("zendesk_field")}),a.initView=function(){b.get("/api/zendesk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/zendesk/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/zendesk/configurations",{params:{ZendeskAccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("zendesk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/zendesk/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.ZendeskAccountId=c.id,b.post("api/zendesk/configurations",a.configuration).success(function(a){e.path("zendesk/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/zendesk/accounts/"+c.id+"/fields").success(function(b){_.remove(b,function(a){return"subject"===a.type||"description"===a.type||"assignee"===a.type}),a.accountFields=b}).error(function(a){h.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/zendesk/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("zendesk_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.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/zendesk/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/zendesk/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/zendesk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/zendesk/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/zendesk/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/zendesk/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){b.content="",a.updateField(b)},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",{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"}).state("main.zendesk.view.configurations",{url:"/configurations",templateUrl:"app/zendesk/view/view.configurations.html"}).state("main.zendesk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/zendesk/view/view.configurationSettings.html",controller:"ZendeskViewCtrl"}).state("main.zendesk.view.configuration",{url:"/configuration",templateUrl:"app/zendesk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("ZendeskWizardCtrl",["$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.authType="password"},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/zendesk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/zendesk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),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").config(["$stateProvider",function(a){a.state("main.zendesk",{url:"/zendesk",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").service("application",function(){var a={applications:[{name:"Queue",value:"Queue"},{name:"Playback",value:"Playback"},{name:"Dial",value:"Dial"},{name:"Cally-Square IVR",value:"AGI"},{name:"GoTo",value:"Goto"},{name:"Hangup",value:"Hangup"},{name:"Set",value:"Set"},{name:"Custom",value:"custom"},{name:"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"}]};return{application:a}}),angular.module("xCallyShuttleApp").factory("Auth",["$location","$rootScope","$http","User","$cookieStore","$q",function(a,b,c,d,e,f){var g={};return e.get("token")&&(g=d.me()),{login:function(a,h){var i=h||angular.noop,j=f.defer();return c.post("/auth/local",{name:a.name,password:a.password,remember:a.remember}).success(function(a){return e.put("token",a.token),e.put("userId",a.userId),g=d.me({},function(){b.$broadcast("login")}),j.resolve(a),i()}).error(function(a){return this.logout(),j.reject(a),i(a)}.bind(this)),j.promise},loginWithToken:function(a,b,c){e.put("token",a),e.put("userId",b),e.put("name",c),g=d.me()},logout:function(){c.put("/api/users/"+g.id,{online:!1}).success(function(){e.remove("token"),e.remove("userId"),g={},b.$broadcast("logout")}).error(function(a){return a})},createUser:function(a,b){var c=b||angular.noop;return d.save(a,function(b){return e.put("token",b.token),g=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:g.id},{oldPassword:a,newPassword:b},function(a){return e(null,a)},function(a){return e(a)}).$promise},getCurrentUser:function(){return g},isLoggedIn:function(){return g.hasOwnProperty("role")},isLoggedInAsync:function(a){g.hasOwnProperty("$promise")?g.$promise.then(function(){a(!0)})["catch"](function(){a(!1)}):a(g.hasOwnProperty("role")?!0:!1)},isAdmin:function(){return"admin"===g.role},getRole:function(){return g.role},getToken:function(){return e.get("token")},getUserId:function(){return console.log(e.get("userId")),e.get("userId")},getName:function(){return e.get("name")}}}]),angular.module("xCallyShuttleApp").factory("User",["$resource",function(a){return a("/api/users/:id/:controller",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},me:{method:"GET",params:{id:"me"}}})}]),angular.module("xCallyShuttleApp").service("automations",function(){var a={voice:{conditions:[],actions:[]},mail:{conditions:[{name:"APPLICATION_STATUS",value:"status",propertyField:"select",operators:"equals"},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",propertyField:"number",operators:"noequals"}],actions:[{name:"APPLICATION_STATUS",value:"status",propertyField:"select"}]},chat:{conditions:[],actions:[]},fax:{conditions:[{name:"APPLICATION_STATUS",value:"status",propertyField:"select",operators:"equals"},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",propertyField:"number",operators:"noequals"}],actions:[{name:"APPLICATION_STATUS",value:"status",propertyField:"select"}]}},b=["voice","mail","chat","fax"],c={equals:[{value:"=",name:"APPLICATION_EQUALS_TO"},{value:"<>",name:"APPLICATION_NOT_EQUALS_TO"}],all:[{value:"=",name:"APPLICATION_EQUALS_TO"},{value:"<>",name:"APPLICATION_NOT_EQUALS_TO"},{value:">=",name:"APPLICATION_GTE_TO"},{value:"<=",name:"APPLICATION_LTE_TO"},{value:">",name:"APPLICATION_GREATER_THAN"},{value:"<",name:"APPLICATION_LESS_THAN"}],noequals:[{value:">=",name:"APPLICATION_GTE_TO"},{value:"<=",name:"APPLICATION_LTE_TO"},{value:">",name:"APPLICATION_GREATER_THAN"},{value:"<",name:"APPLICATION_LESS_THAN"}]},d={voice:{},mail:{status:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"},{name:"APPLICATION_STATUS_SOLVED",value:"SOLVED"}]},chat:{},fax:{status:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"},{name:"APPLICATION_STATUS_SOLVED",value:"SOLVED"}]}};return{automations:a,properties:d,channels:b,operators:c}}),angular.module("xCallyShuttleApp").controller("FooterController",["$scope","$http",function(a,b){a.$on("$includeContentLoaded",function(){Layout.initFooter()}),a.initFooter=function(){b.get("/api/settings/info").success(function(b){a.info=b}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("HeaderController",["$scope","$rootScope","$location","$state","$http","$notification","Auth","xAlert","socket","ngAudio","settings","toastr","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.toggleQuickSidebar=function(){k.layout.pageQuickSidebarOpened=!k.layout.pageQuickSidebarOpened,k.layout.pageQuickSidebarOpened||m.remove("chatRoomId")},a.initHeader=function(){var c=j.load("api/xchatty/assets?resource=notification/xc_blubb.mp3");"agent"===g.getCurrentUser().role&&(i.socket.on("report_mail:save",function(a){c.play();var b=f("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*a.timeslot});b.$on("click",function(){e.put("/api/report/mails/"+a.id,{connect:!0}).success(function(){b.close(),h.show("Mail properly assigned","success")}).error(function(a){h.show(a.message,"danger")})})}),i.socket.on("report_chat:save",function(a){c.play();var d=f("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot});d.$on("click",function(){e.put("/api/report/chats/"+a.id,{connect:!0}).success(function(){d.close(),h.show("Chat properly assigned","success"),b.$broadcast("chatMessageEvent",{type:"external",chatRoomId:a.chatroomid})}).error(function(a){h.show(a.message,"danger")})})}),i.socket.on("chat_message:save",function(a){var d=m.get("chatRoomId");if(!d||d!==a.ChatRoomId){c.play();var e=f(a.User.fullname,{icon:"assets/images/media/channels/chat64.png",body:a.body.length>35?a.body.substring(0,35)+"...":a.body,delay:1e4});e.$on("click",function(){b.$broadcast("chatMessageEvent",{type:"internal",chatRoomId:a.ChatRoomId})})}})),e({url:"/api/fax/user_has_queues",method:"GET",params:{UserId:g.getCurrentUser().id}}).success(function(b){a.faxQueues=_.pluck(b,"FaxQueueId"),a.faxQueues.forEach(function(a){i.socket.on("FAX:QUEUE:"+a,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})})}),i.socket.on("FAX:AGENT:"+g.getCurrentUser().id,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){b(g.getCurrentUser().id),l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})})}).error(function(a){console.error(a)}),i.socket.on("user_has_fax_queue:save",function(b){b=_.map(b,function(a){return a.UserId=parseInt(a.UserId,10),a}),b=_.find(b,{UserId:g.getCurrentUser().id}),b&&-1===_.indexOf(a.faxQueues,b.FaxQueueId)&&(a.faxQueues.push(b.FaxQueueId),i.socket.on("FAX:QUEUE:"+b.FaxQueueId,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){b(g.getCurrentUser().id),l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})}))}),i.socket.on("user_has_fax_queue:remove",function(b){_.indexOf(b.where.UserId,g.getCurrentUser().id.toString())>=0&&_.indexOf(a.faxQueues,b.where.FaxQueueId)>=0&&(a.faxQueues=_.remove(a.faxQueues,b.where.FaxQueueId),i.socket.removeAllListeners("FAX:QUEUE:"+b.where.FaxQueueId))})},a.logout=function(){e.get("/auth/local/logout").success(function(){g.logout(),c.path("/login")}).error(function(a){console.error(a)})},a.isActive=function(a){return a===c.path()}}]),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"}],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").factory("Modal",["$rootScope","$uibModal",function(a,b){function c(c,d){console.log("openModal",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").controller("QuickSidebarControllerAddModal",["$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.modal={title:"APPLICATION_AGENTS_SELECTION"},a.ok=function(){b.close(_.union(_.pluck(a.selected.items,"id"),_.pluck(a.items,"id")))},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarControllerCloseModal",["$scope","$uibModalInstance",function(a,b){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_CHAT"},a.ok=function(){b.close()},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarController",["$scope","$rootScope","$window","$http","$uibModal","$log","$timeout","Auth","Agent","User","ChatRoom","ChatMessage","socket","settings","localStorageService","xAlert","$translate",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.emojiMessage={},a.options={link:!0,linkTarget:"_blank",pdf:{embed:!1},image:{embed:!0},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,ytAuthKey:"_nkO9h1A7HlVyiUICO17oA"}};var r=a.currentUser=h.getCurrentUser();a.message={body:"",user:""},a.$on("$includeContentLoaded",function(){o.get("chatRoomId")&&k.get({id:o.get("chatRoomId")},t,u),o.get("currentTab")&&(a.currentTab=o.get("currentTab"))});var s=angular.element(c);a.getWindowDimensions=function(){return{h:s.height(),w:s.width()}},a.$watch(a.getWindowDimensions,function(b){a.style={height:b.h-46-46-46+"px"},a.style2={height:b.h-46-46-46-180+"px"}},!0),s.bind("resize",function(){a.$apply()}),a.agents=i.get({page:0,per_page:1e3},function(){m.syncUpdates("agent",a.agents.rows)}),a.users=j.get({page:0,per_page:1e3},function(){m.syncUpdates("user",a.users.rows)}),a.chatRooms=k.me(function(b){a.chatRooms=b,m.syncUpdates("chat_room",a.chatRooms)},function(a){console.error(a)}),a.currentTab=0,a.messagesTab=!1,b.$on("chatMessageEvent",function(b,c){switch(c.type){case"internal":a.currentTab=0;break;case"external":a.currentTab=2}k.get({id:c.chatRoomId},t,u)}),a.goToTab=function(b){a.currentTab=b,a.messagesTab=!1,a.chatRoom=null,o.set("currentTab",a.currentTab),o.set("messagesTab",a.messagesTab),o.remove("chatRoomId"),m.unsyncUpdates("chat_message"),m.unsyncUpdates("chat_room")},a.goToMessage=function(a,b){a?k.users({users:[r.id,a]},t,u):k.get({id:b},t,u)},a.sendMessage=function(){a.message.body.trim().length&&l.save({ChatRoomId:a.chatRoom.id,body:a.message.body},function(){a.message.body=""},function(a){console.error(a)})},a.goBack=function(){a.messagesTab=!1,a.chatRoom=null,o.set("messagesTab",a.messagesTab),o.remove("chatRoomId"),m.unsyncUpdates("chat_message"),m.unsyncUpdates("user_has_chat_room")},a.chatRoomsGroupsGreaterThan=function(a){return function(b){return b.Users?"external"!==b.type&&b.Users.length>a:!1}},a.closeChatRoom=function(a,b){var c=e.open({animation:!0,size:b,templateUrl:"components/quickSidebar/modal/close.html",controller:"QuickSidebarControllerCloseModal"});c.result.then(function(){d.put("/api/chat/rooms/"+a,{status:"close"}).then(function(){p.show(q.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){p.show(a.data.message,"danger")})},function(){f.info("Modal dismissed at: "+new Date)})},a.addAgent=function(b,c){var g=e.open({animation:!0,size:c,templateUrl:"components/quickSidebar/modal/add.html",controller:"QuickSidebarControllerAddModal",resolve:{items:function(){return _.map(a.chatRoom.Users?a.chatRoom.Users:[],function(a){return{id:a.id,fullname:a.fullname}})}}});g.result.then(function(c){d.put("/api/chat/rooms/"+b+"/users",{users:c}).then(function(b){m.unsyncUpdates("chat_message"),a.chatRoom=b.data,a.currentTab=3,a.messagesTab=!0;var c=_.find(a.chatRooms,{id:b.id}),d=a.chatRooms.indexOf(c);c?_.merge(a.chatRooms[d],b.data):a.chatRooms.push(b.data),m.socket.on("chat_message:save",function(c){c.ChatRoomId===b.data.id&&(a.chatRoom.ChatMessages.push(c),angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last"))}),p.show(q.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){p.show(a.data.message,"danger")})},function(){f.info("Modal dismissed at: "+new Date)})};var t=function(b){a.messagesTab=!0,n.layout.pageQuickSidebarOpened=!0,o.set("chatRoomId",b.id),o.set("messagesTab",a.messagesTab),a.chatRoom=b;var c=_.find(a.chatRooms,{id:b.id}),d=a.chatRooms.indexOf(c);c?_.merge(a.chatRooms[d],b):a.chatRooms.push(b),g(function(){angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last")},1e3),m.socket.on("chat_message:save",function(c){c.ChatRoomId===b.id&&(a.chatRoom.ChatMessages.push(c),angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last"))}),m.socket.on("chat_room:save",function(b){b.id===a.chatRoom.id&&(a.chatRoom.status=b.status)})},u=function(a){console.error(a)};a.$on("$destroy",function(){m.unsyncUpdates("agent"),m.unsyncUpdates("user")})}]),angular.module("xCallyShuttleApp").directive("resizeQuickSidebar",["$window",function(a){return function(b){var c=angular.element(a);b.getWindowDimensions=function(){return{h:c.height(),w:c.width()}},b.$watch(b.getWindowDimensions,function(a){b.style={height:a.h-46-46-46+"px"}},!0),c.bind("resize",function(){b.$apply()})}}]),angular.module("xCallyShuttleApp").controller("SidebarController",["$scope","$rootScope","$resource","$location","Auth","$http","xAlert","$stateParams","socket",function(a,b,c,d,e,f,g,h,i){a.Auth=e,a.$stateParams=h,a.$on("$includeContentLoaded",function(){Metronic.init(),Layout.initSidebar()}),a.isAssociated=function(a){if(e.isAdmin())return!0;if(e.getCurrentUser().Modules)for(var b=0;b<e.getCurrentUser().Modules.length;b++)if(e.getCurrentUser().Modules[b].name===a)return!0;return!1},a.getSidebarDashboards=function(){f.get("/api/dashboards").then(function(b){a.dashboards=b.data.rows,i.syncUpdates("dashboard",a.dashboards)})["catch"](function(a){g.show("Error loading your dashboards","danger")})},a.isActive=function(a){return a===d.path()},a.$on("destroy",function(){i.unsyncUpdates("dashboard")})}]),angular.module("xCallyShuttleApp").factory("socket",["$rootScope","socketFactory","Auth",function(a,b,c){var d=c.getCurrentUser(),e=io("",{query:"token="+c.getToken()+"&userId="+(d.id||c.getUserId())+"&name="+(d.name||c.getName())+"&role="+(d.role||"agent")+"&source=browser",path:"/socket.io-client"}),f=b({ioSocket:e});return a.$on("login",function(){e=io("",{forceNew:!0,query:"token="+c.getToken()+"&userId="+c.getCurrentUser().id+"&name="+c.getCurrentUser().name+"&role="+c.getCurrentUser().role+"&source=browser",path:"/socket.io-client"})}),a.$on("logout",function(){f&&f.disconnect(!0)}),{socket:f,syncUpdates:function(a,b,c){c=c||angular.noop,f.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)}),f.on(a+":remove",function(a){var d="deleted";_.remove(b,{id:a.id}),c(d,a,b)})},unsyncUpdates:function(a){f.removeAllListeners(a+":save"),f.removeAllListeners(a+":remove")},syncUpdatesByAttributes:function(a,b,c,d){d=d||angular.noop,f.on(a+":save",function(e){console.log(a),console.log(e);var f=!0;if(_.forIn(b,function(a,b){return e[b]&&e[b]===a?!0:f=!1}),f){var g=_.find(c,{id:e.id}),h=c.indexOf(g),i="created";g?(_.merge(c[h],e),i="updated"):c.unshift(e),d(i,e,c)}}),f.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,f.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)}),f.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncMailMessageUpdates:function(a,b){f.removeAllListeners(a+":"+b+":save"),f.removeAllListeners(a+":"+b+":remove")},syncFaxMessageUpdates:function(a,b,c,d){d=d||angular.noop,f.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)}),f.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncFaxMessageUpdates:function(a,b){f.removeAllListeners(a+":"+b+":save"),f.removeAllListeners(a+":"+b+":remove")}}}]),angular.module("xCallyShuttleApp").service("triggers",function(){var a={voice:{conditions:[],actions:[]},mail:{conditions:[{name:"APPLICATION_FROM",value:"from",propertyField:"input",operators:"equals"},{name:"APPLICATION_CC",value:"cc",propertyField:"input",operators:"equals"},{name:"APPLICATION_SUBJECT",value:"subject",propertyField:"input",operators:"equals"}],actions:[{name:"APPLICATION_TEMPLATE",value:"template",propertyField:"select"}]},chat:{conditions:[],actions:[]},fax:{conditions:[],actions:[]}},b={equals:[{value:"=",name:"APPLICATION_EQUALS_TO"},{value:"<>",name:"APPLICATION_NOT_EQUALS_TO"}],all:[{value:"=",name:"APPLICATION_EQUALS_TO"},{value:"<>",name:"APPLICATION_NOT_EQUALS_TO"},{value:">=",name:"APPLICATION_GTE_TO"},{value:"<=",name:"APPLICATION_LTE_TO"},{value:">",name:"APPLICATION_GREATER_THAN"},{value:"<",name:"APPLICATION_LESS_THAN"}],noequals:[{value:">=",name:"APPLICATION_GTE_TO"},{value:"<=",name:"APPLICATION_LTE_TO"},{value:">",name:"APPLICATION_GREATER_THAN"},{value:"<",name:"APPLICATION_LESS_THAN"}]},c={voice:{},mail:{},chat:{},fax:{}},d=["voice","mail","chat","fax"];return{triggers:a,properties:c,operators:b,channels:d}}),function(a,b){angular.module("adf.widget.counter",["adf.provider"]).value("apiServiceUrlCounter","/api/widgets/counter").config(["dashboardProvider",function(a){a.widget("counter",{title:"Counter",description:"Counter for db results",templateUrl:"{widgetsPath}/counter/src/view.html",controller:"apiwidgetCounterViewCtrl",edit:{templateUrl:"{widgetsPath}/counter/src/edit.html",controller:"apiwidgetCounterEditCtrl"}})}]).service("apiServiceCounter",["$q","$http","apiServiceUrlCounter",function(a,b,c){return{get:function(d){var e=a.defer();return b.get(c,{params:{condition:encodeURIComponent(d.condition),table:d.report}}).success(function(a){a?e.resolve(a):e.reject()}).error(function(a){console.log(a),e.reject()}),e.promise}}}]).controller("apiwidgetCounterEditCtrl",["$scope",function(a){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.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"}],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"}],a.config.timeout=a.config.timeout?a.config.timeout:1,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?a.config.timeout:1,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.condition&&a.config.report&&c.get(a.config).then(function(b){a.count=parseInt(b[0].count)})},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 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 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 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 }}\">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"color.value as color in config.colors | filter: $select.search\"><div ng-bind-html=\"color.name | highlight: $select.search\"></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 }}\">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"icon.value as icon in config.icons | filter: $select.search\"><div ng-bind-html=\"icon.name | highlight: $select.search\"></div></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="count || count === 0"><div class=visual><i class=fa ng-class=config.icon></i></div><div class=details><div class=number>{{count}}</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="!count && count != 0"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.pie-chart",["adf.provider"]).value("apiServiceUrlPieChart","/api/widgets/piechart").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",["$q","$http","apiServiceUrlPieChart",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("apiWidgetPieChartEditCtrl",["$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.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetPieChartViewCtrl",["$scope","$interval","apiServicePieChart",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,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&&1===b.length){a.labels=[],a.data=[];for(var c in b[0])a.labels.push(c),a.data.push(b[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 }}">{{$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_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=1></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),function(){angular.module("pdf",[]).directive("ngPdf",["$window",function(a){return{restrict:"E",templateUrl:function(a,b){return b.templateUrl?b.templateUrl:"partials/viewer.html"},link:function(b,c,d){var e=d.pdfUrl,f=null,g=d.page?d.page:1,h=d.scale>0?d.scale:1,i=c.find("canvas"),j=i[0],k=j.getContext("2d"),l=angular.element(a);l.on("scroll",function(){b.$apply(function(){b.scroll=l[0].scrollY})}),PDFJS.disableWorker=!0,b.pageNum=g,b.renderPage=function(a){f.getPage(a).then(function(a){var e,f,g,i={};"page-fit"!==d.scale||h?e=a.getViewport(h):(e=a.getViewport(1),f=c[0].clientWidth/e.width,g=c[0].clientHeight/e.height,h=Math.min(f,g)),j.height=e.height,j.width=e.width,i={canvasContext:k,viewport:e},a.render(i).promise.then(function(){"function"==typeof b.onPageRender&&b.onPageRender()})})},b.goPrevious=function(){b.pageToDisplay<=1||(b.pageNum=parseInt(b.pageNum)-1)},b.goNext=function(){b.pageToDisplay>=f.numPages||(b.pageNum=parseInt(b.pageNum)+1)},b.zoomIn=function(){return h=parseFloat(h)+.2,b.renderPage(b.pageToDisplay),h},b.zoomOut=function(){return h=parseFloat(h)-.2,b.renderPage(b.pageToDisplay),h},b.changePage=function(){b.renderPage(b.pageToDisplay)},b.rotate=function(){"rotate0"===j.getAttribute("class")?j.setAttribute("class","rotate90"):"rotate90"===j.getAttribute("class")?j.setAttribute("class","rotate180"):"rotate180"===j.getAttribute("class")?j.setAttribute("class","rotate270"):j.setAttribute("class","rotate0")},PDFJS.getDocument(e,null,null,b.onProgress).then(function(a){"function"==typeof b.onLoad&&b.onLoad(),f=a,b.renderPage(b.pageToDisplay),b.$apply(function(){b.pageCount=a.numPages})},function(a){a&&"function"==typeof b.onError&&b.onError(a)}),b.$watch("pageNum",function(a){b.pageToDisplay=parseInt(a),null!==f&&b.renderPage(b.pageToDisplay)})}}}])}(),function(a){a.module("angular-elastic-builder",["RecursionHelper"])}(window.angular),function(a){a.module("angular-elastic-builder").directive("elasticBuilder",["elasticQueryService",function(a){return{scope:{data:"=elasticBuilder"},templateUrl:"angular-elastic-builder/BuilderDirective.html",link:function(b){var c=b.data;b.filters=[],b.removeChild=function(a){b.filters.splice(a,1)},b.addRule=function(){b.filters.push({})},b.addGroup=function(){b.filters.push({type:"group",subType:"and",rules:[]})},b.$watch("data.needsUpdate",function(d){d&&(b.filters=a.toFilters(c.query,b.data.fields),b.data.needsUpdate=!1)}),b.$watch("filters",function(d){d&&(c.query=a.toQuery(b.filters,b.data.fields))},!0)}}}])}(window.angular),function(a){var b=a.module("angular-elastic-builder");b.directive("elasticBuilderChooser",["RecursionHelper","groupClassHelper",function(a,b){return{scope:{elasticFields:"=",item:"=elasticBuilderChooser",onRemove:"&"},templateUrl:"angular-elastic-builder/ChooserDirective.html",compile:function(c){return a.compile(c,function(a,c,d){var e=a.depth=+d.depth,f=a.item;a.getGroupClassName=function(){var a=e;return"group"===f.type&&a++,b(a)}})}}}])}(window.angular),function(a){var b=a.module("angular-elastic-builder");b.directive("elasticBuilderGroup",["RecursionHelper","groupClassHelper",function(a,b){return{scope:{elasticFields:"=",group:"=elasticBuilderGroup",onRemove:"&"},templateUrl:"angular-elastic-builder/GroupDirective.html",compile:function(c){return a.compile(c,function(a,c,d){var e=a.depth=+d.depth,f=a.group;a.addRule=function(){f.rules.push({})},a.addGroup=function(){f.rules.push({type:"group",subType:"and",rules:[]})},a.removeChild=function(a){f.rules.splice(a,1)},a.getGroupClassName=function(){return b(e+1)}})}}}])}(window.angular),function(a){var b=a.module("angular-elastic-builder");b.directive("elasticBuilderRule",[function(){return{scope:{elasticFields:"=",rule:"=elasticBuilderRule",onRemove:"&"},templateUrl:"angular-elastic-builder/RuleDirective.html",link:function(a){a.getType=function(){var b=a.elasticFields,c=a.rule.field;return b&&c?"boolean"===b[c].subType?"boolean":b[c].type:void 0}}}}])}(window.angular),function(a){var b=a.module("angular-elastic-builder");b.directive("elasticType",[function(){return{scope:{type:"=elasticType",rule:"=",guide:"="},template:'<ng-include src="getTemplateUrl()" />',link:function(a){a.getTemplateUrl=function(){var b=a.type;if(b)return b=b.charAt(0).toUpperCase()+b.slice(1),"angular-elastic-builder/types/"+b+".html"},a.booleans=["False","True"],a.booleansOrder=["True","False"],a.inputNeeded=function(){var b=["equals","notEquals","gt","gte","lt","lte"];return~b.indexOf(a.rule.subType)}}}}])}(window.angular),function(a){a.module("angular-elastic-builder").factory("groupClassHelper",function(){return function(a){var b=[""];return b[a%b.length]}})}(window.angular),function(a){function b(a,b){var c=a.map(d.bind(a,b));return c}function c(a,b){var c=a.map(e.bind(a,b)).filter(function(a){return!!a});return c}function d(a,b,c){c!==!1&&(c=!0);var e=Object.keys(b)[0],g={or:"group",and:"group",range:"number"},h=g[e]||"item",i=f(h);switch(e){case"or":case"and":i.rules=b[e].map(d.bind(b,a)),i.subType=e;break;case"missing":case"exists":i.field=b[e].field,i.subType={exists:"exists",missing:"notExists"}[e],delete i.value;break;case"term":case"terms":i.field=Object.keys(b[e])[0];var j=a[Object.keys(b[e])[0]];if("multi"===j.type){var k=b[e][i.field];"string"==typeof k&&(k=[k]),i.value=b[e][i.field]}else i.subType=c?"equals":"notEquals",i.value=b[e][i.field],"number"==typeof i.value&&(i.subType="boolean");break;case"range":i.field=Object.keys(b[e])[0],i.subType=Object.keys(b[e][i.field])[0],i.value=b[e][i.field][i.subType];break;case"not":i=d(a,b[e].filter,!1);break;default:i.field=Object.keys(b[e])[0]}return i}function e(a,b){var c={};if("group"===b.type)return c[b.subType]=b.rules.map(e.bind(b,a)).filter(function(a){return!!a}),c;var d=b.field,f=a[d];if(d){switch(f.type){case"term":case"multiterm":if("boolean"===f.subType&&(b.subType="boolean"),!b.subType)return;switch(b.subType){case"equals":case"boolean":if(void 0===b.value)return;c.term={},c.term[d]=b.value;break;case"notEquals":if(void 0===b.value)return;c.not={filter:{term:{}}},c.not.filter.term[d]=b.value;break;case"exists":c.exists={field:d};break;case"notExists":c.missing={field:d};break;default:throw new Error("unexpected subtype "+b.subType)}break;case"number":c.range={},c.range[d]={},c.range[d][b.subType]=b.value;break;case"date":if("exists"===b.subType)c.exists={field:d};else{if("notExists"!==b.subType)throw new Error("unexpected subtype");c.missing={field:d}}break;case"multi":c.terms={},c.terms[d]=b.value;break;default:throw new Error("unexpected type")}return c}}function f(b){var c={group:{type:"group",subType:"",rules:[]},item:{field:"",subType:"",value:""},number:{field:"",subType:"",value:null}};return a.copy(c[b])}a.module("angular-elastic-builder").factory("elasticQueryService",[function(){return{toFilters:b,toQuery:c}}])}(window.angular),function(a){a.module("angular-elastic-builder").run(["$templateCache",function(a){a.put("angular-elastic-builder/BuilderDirective.html",'<!-- <div class="elastic-builder">\n  <div class="filter-panels">\n    <div class="list-group form-inline">\n      <div\n        data-ng-repeat="filter in filters"\n        data-elastic-builder-chooser="filter"\n        data-elastic-fields="data.fields"\n        data-on-remove="removeChild($index)"\n        data-depth="0"></div>\n      <div class="list-group-item actions">\n        <a class="btn btn-xs btn-primary" title="Add Rule" data-ng-click="addRule()">\n          <i class="fa fa-plus"></i>\n        </a>\n        <a class="btn btn-xs btn-primary" title="Add Group" data-ng-click="addGroup()">\n          <i class="fa fa-list"></i>\n        </a>\n      </div>\n    </div>\n  </div>\n</div> -->\n\n<!-- <div class="elastic-builder">\n  <div class="filter-panels"> -->\n    <div class="list-group form-inline list-group-item-custom" ng-switch="data.type">\n      <div\n        data-ng-repeat="filter in filters"\n        data-elastic-builder-chooser="filter"\n        data-elastic-fields="data.fields"\n        data-on-remove="removeChild($index)"\n        data-depth="0">\n      </div>\n      <div class="list-group-item actions list-group-item-custom" ng-switch-when="condition">\n        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">\n                                  <i class="icon-plus"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                               </a>\n      </div>\n      <div class="list-group-item actions list-group-item-custom" ng-switch-when="action">\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\n                                 <i class="icon-plus"></i> {{ \'APPLICATION_ADD_ACTION\' | translate }}\n                              </a>\n      </div>\n      <div class="list-group-item actions list-group-item-custom" ng-switch-default>\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\n                               <i class="icon-plus"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n                           </a>\n        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">\n                                  <i class="icon-plus"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                               </a>\n      </div>\n    </div>\n  <!-- </div>\n</div> -->\n'),a.put("angular-elastic-builder/ChooserDirective.html",'<!-- <div\n  class="list-group-item elastic-builder-chooser"\n  data-ng-class="getGroupClassName()">\n\n  <div data-ng-if="item.type === \'group\'"\n    data-elastic-builder-group="item"\n    data-depth="{{ depth }}"\n    data-elastic-fields="elasticFields"\n    data-on-remove="onRemove()"></div>\n\n  <div data-ng-if="item.type !== \'group\'"\n    data-elastic-builder-rule="item"\n    data-elastic-fields="elasticFields"\n    data-on-remove="onRemove()"></div>\n\n</div> -->\n\n\n<div class="list-group-item elastic-builder-chooser list-group-item-custom" data-ng-class="getGroupClassName()">\n  <div data-ng-if="item.type === \'group\'"\n    data-elastic-builder-group="item"\n    data-depth="{{ depth }}"\n    data-elastic-fields="elasticFields"\n    data-on-remove="onRemove()"></div>\n  <div data-ng-if="item.type !== \'group\'"\n    data-elastic-builder-rule="item"\n    data-elastic-fields="elasticFields"\n    data-on-remove="onRemove()"></div>\n</div>\n'),a.put("angular-elastic-builder/GroupDirective.html",'<!-- <div class="elastic-builder-group">\n  <h5>If\n    <select data-ng-model="group.subType" class="form-control">\n      <option value="and">all</option>\n      <option value="or">any</option>\n    </select>\n    of these conditions are met\n  </h5>\n  <div\n    data-ng-repeat="rule in group.rules"\n    data-elastic-builder-chooser="rule"\n    data-elastic-fields="elasticFields"\n    data-depth="{{ +depth + 1 }}"\n    data-on-remove="removeChild($index)"></div>\n\n  <div class="list-group-item actions" data-ng-class="getGroupClassName()">\n    <a class="btn btn-xs btn-primary" title="Add Sub-Rule" data-ng-click="addRule()">\n      <i class="fa fa-plus"></i>\n    </a>\n    <a class="btn btn-xs btn-primary" title="Add Sub-Group" data-ng-click="addGroup()">\n      <i class="fa fa-list"></i>\n    </a>\n  </div>\n\n  <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\n    <i class="fa fa-minus"></i>\n  </a>\n</div> -->\n\n\n<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light">\n  <div class="portlet-title">\n    <div class="caption" data-ng-class="{\'font-blue-hoki\': data.type === \'condition\', \'font-red-flamingo\': data.type === \'action\'}">\n      <!-- <i class="icon-people font-green-sharp"></i> -->\n      <h5><span class="caption-subject">{{ \'APPLICATION_IF\' | translate }}</span>\n        <select data-ng-model="group.subType" class="form-control">\n          <option value="and"><strong>{{ \'APPLICATION_ALL\' | translate | lowercase }}</strong></option>\n          <option value="or"><strong>{{ \'APPLICATION_ANY\' | translate | lowercase }}</strong></option>\n        </select>\n        <span class="caption-subject">{{group.subType == \'and\' ? \'MESSAGE_CODITIONS_MET_ALL\' : \'MESSAGE_CODITIONS_MET_ANY\' | translate}}</span>\n      </h5>\n    </div>\n  </div>\n  <div class="portlet-body">\n    <div class="elastic-builder-group">\n      <div\n        data-ng-repeat="rule in group.rules"\n        data-elastic-builder-chooser="rule"\n        data-elastic-fields="elasticFields"\n        data-depth="{{ +depth + 1 }}"\n        data-on-remove="removeChild($index)"></div>\n\n      <div class="list-group-item actions list-group-item-custom" data-ng-class="getGroupClassName()">\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\n          <i class="icon-plus"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n        </a>\n        <a class="btn red btn-sm remover" data-ng-click="onRemove()">\n          <i class="icon-trash"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\n        </a>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("angular-elastic-builder/RuleDirective.html",'<!-- <div class="elastic-builder-rule">\n  <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select>\n\n  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>\n\n  <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\n    <i class="fa fa-minus"></i>\n  </a>\n\n</div> -->\n<!-- <div class="elastic-builder-rule"> -->\n  <!-- <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select> -->\n  {{elasticFields[rule.field].action.label | translate}}\n  <select class="form-control" data-ng-model="rule.field" >\n  <option ng-repeat="option in elasticFields" value="{{option.value}}">{{ option.label | translate }}</option>\n  </select>\n  <!-- <ui-select class="form-control" data-ng-model="rule.field" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_CONDITION\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n    <ui-select-choices repeat="value.value as key for (key, value) in elasticFields | filter: $select.search">\n      {{$translate.instant(key.name)}}\n    </ui-select-choices>\n  </ui-select> -->\n\n  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>\n\n  <!-- <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\n    <i class="fa fa-minus"></i>\n  </a> -->\n\n  <a class="btn remover" data-ng-click="onRemove()">\n    <i class="icon-trash"></i>\n  </a>\n\n<!-- </div> -->\n'),a.put("angular-elastic-builder/types/Boolean.html",'<span class="boolean-rule">\n  Equals\n\n  <!-- This is a weird hack to make sure these are numbers -->\n  <select\n    data-ng-model="rule.value"\n    class="form-control"\n    data-ng-options="booleans.indexOf(choice) as choice for choice in booleansOrder">\n  </select>\n</span>\n'),a.put("angular-elastic-builder/types/Date.html",'<span class="date-rule">\n  <select data-ng-model="rule.subType" class="form-control">\n\n    <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup>\n  </select>\n\n</span>\n'),a.put("angular-elastic-builder/types/Multi.html",'<!-- <span class="multi-rule">\n  <span data-ng-repeat="choice in guide.choices">\n    <label class="checkbox">\n      <input type="checkbox" data-ng-model="rule.values[choice]">\n      {{ choice }}\n    </label>\n  </span>\n</span> -->\n\n<span class="multi-rule">\n  {{guide.action.midterm | translate}}\n  <!-- Range Fields -->\n  <!-- <select data-ng-model="rule.values" class="form-control"> -->\n  <select data-ng-model="rule.value" class="form-control">\n    <!-- <optgroup label="Numeral"> -->\n      <option data-ng-repeat="(key, value) in guide.choices" value="{{value}}">{{key}}</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- <input data-ng-if="inputNeeded()"\n    class="form-control"\n    data-ng-model="rule.value"\n    type="number"\n    min="{{ guide.minimum }}"\n    max="{{ guide.maximum }}"> -->\n</span>\n'),a.put("angular-elastic-builder/types/Multiterm.html",'<span class="elastic-multiterm">\n  <select data-ng-model="rule.subType" class="form-control">\n      <option value="equals">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value="notEquals">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n  </select>\n  <select data-ng-model="rule.value" class="form-control">\n      <option data-ng-repeat="(key, value) in guide.choices" value="{{value}}">{{value | capitalize}}</option>\n  </select>\n</span>\n'),a.put("angular-elastic-builder/types/Number.html",'<span class="number-rule">\n  <select data-ng-model="rule.subType" class="form-control">\n    <!-- <optgroup label="Numeral"> -->\n      <option value="equals">=</option>\n      <option value="gt">&gt;</option>\n      <option value="gte">&ge;</option>\n      <option value="lt">&lt;</option>\n      <option value="lte">&le;</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label="Generic"> -->\n      <!-- <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option> -->\n    <!-- </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <input data-ng-if="inputNeeded()"\n    class="form-control"\n    data-ng-model="rule.value"\n    type="number"\n    min="{{ guide.minimum }}"\n    max="{{ guide.maximum }}">\n\n    <!-- <span class="help-block">{{rule.help}}</span> -->\n\n</span>\n'),a.put("angular-elastic-builder/types/Term.html",'<!-- <span class="elastic-term">\n  <select data-ng-model="rule.subType" class="form-control"> -->\n    <!-- Term Options -->\n    <!-- <optgroup label="Text">\n      <option value="equals">Equals</option>\n      <option value="notEquals">! Equals</option>\n    </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup>\n\n  </select>\n  <input\n    data-ng-if="inputNeeded()"\n    class="form-control"\n    data-ng-model="rule.value"\n    type="text">\n</span> -->\n\n\n<span class="elastic-term">\n  <select data-ng-model="rule.subType" class="form-control">\n    <!-- Term Options -->\n    <!-- <optgroup label="Text"> -->\n      <option value="equals">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value="notEquals">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n    <!-- </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup> -->\n\n  </select>\n  <input\n    data-ng-if="inputNeeded()"\n    class="form-control input-medium"\n    data-ng-model="rule.value"\n    type="text">\n</span>\n')}])}(window.angular);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")?!0:!1,railVisible:"1"==$(this).attr("data-rail-visible")?!0:!1,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?!1:!0},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}),$(".sidebar-search .submit").on("click",function(a){a.preventDefault(),$("body").hasClass("page-sidebar-closed")&&$(".sidebar-search").hasClass("open")===!1?(1===$(".page-sidebar-fixed").size()&&$(".page-sidebar .sidebar-toggler").click(),$(".sidebar-search").addClass("open")):$(".sidebar-search").submit()}),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(){var a=$("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"),$("body").on("click",".sidebar-toggler",function(b){var c=$(".page-sidebar"),d=$(".page-sidebar-menu");$(".sidebar-search",c).removeClass("open"),a.hasClass("page-sidebar-closed")?(a.removeClass("page-sidebar-closed"),d.removeClass("page-sidebar-menu-closed"),$.cookie&&$.cookie("sidebar_closed","0")):(a.addClass("page-sidebar-closed"),d.addClass("page-sidebar-menu-closed"),a.hasClass("page-sidebar-fixed")&&d.trigger("mouseleave"),$.cookie&&$.cookie("sidebar_closed","1")),$(window).trigger("resize")})},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/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-people"></i>\n                                   <a href="/agents/list">{{ \'APPLICATION_AGENTS\' | 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-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="agents.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="#" data-toggle="dropdown">\n                                                  <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AGENT\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/agents/wizard">\n                                                             <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAgents([\'name\', \'fullname\', \'email\'])" csv-header="[\'Username\', \'Fullname\', \'Email\']" field-separator=";" filename="agents.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="displayedAgents" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                  <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.agentsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="agentByPage in agentsByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="agentByPage.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(agent, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="fullname">{{ \'APPLICATION_FULLNAME\' | translate }}</th>\n                                                <th st-sort="name">{{ \'APPLICATION_USERNAME\' | translate }}</th>\n                                                    <th st-sort="email">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="agent in displayedAgents" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="agents.checked" checklist-value="agent.id"></td>\n                                                               <td>{{agent.fullname}}</td>\n                                         <td>{{agent.name}}</td>\n                                       <td><a data-ng-href="mailto:{{agent.email}}">{{agent.email}}</a></td>\n                                         <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/agents/view/{{agent.id}}/account">\n                                                                           {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(agent.fullname,agent.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedAgents.length">\n                                                            <td colspan="5" style="text-align:center;">\n                                                                   <i>No agents 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="fullname" 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="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_USERNAME\' | 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                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.agentsByPage.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/agent/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 data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\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()">\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() || 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()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\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.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | 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}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="agent.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 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 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="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\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                                                       <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()" 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 src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" 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() || 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()" 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" 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 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/agent/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-people"></i>\n                                   <a href="/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.agents.view.account\')}">\n                                                        <a data-ng-href="/agents/view/{{agent.id}}/account">\n                                                  <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | 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/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-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" 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_NAME\' | 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" required ng-remote-validate="/api/agents/validate/name"/>\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                             </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 ng-remote-validate="/api/agents/validate/email"/>\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                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.ngRemoteValidate" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_EMAIL\' | 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" required/>\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" ng-remote-validate="/api/agents/validate/internal"/>\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                                                       <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                             <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 ACCOUNTCODE -->\n                                            <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_ACCOUNTCODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                  <input type="number" name="accountcode" placeholder="{{\'APPLICATION_ACCOUNTCODE\' | translate}}" class="form-control" data-ng-model="item.accountcode" required/>\n                                                    <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="(forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div> -->\n                                            <!-- END ACCOUNTCODE -->\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 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="item.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 ng-model="item.nat" name="nat" theme="bootstrap" ng-disabled="disabled">\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\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="item.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="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 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/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-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">\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="Automations.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }} <i class="fa fa-angle-down"></i>\n                                           </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/automations/wizard">\n                                                                <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAutomations([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="automations.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="displayedAutomations" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.AutomationsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="AutomationByPage in AutomationsByPage | filter: $select.search">\n                                                                                                   <div ng-bind-html="AutomationByPage.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 st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th> -->\n                                                              <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(Automation, checked)" checklist-model checklist-value="id"></th>\n                                               <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="channel">{{ \'APPLICATION_CHANNEL\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                             <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="Automation in displayedAutomations">\n                                                          <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="Automations.checked" checklist-value="Automation.id"></td>\n                                           <td>{{Automation.name}}</td>\n                                                            <td>{{Automation.description}}</td>\n                                                           <td>{{Automation.channel | capitalize}}</td>\n                                                          <td>\n                                                                  <input\n                                                                                data-ng-change="updateItem(Automation.id, Automation.status)",\n                                                                    bs-switch\n                                                             ng-model="Automation.status"\n                                                                  type="checkbox"\n                                                               switch-active="{{ isActive }}"\n                                                                switch-on-text="{{ onText }}"\n                                                                 switch-off-text="{{ offText }}"\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                                                          </td>\n                                       <td>\n                                                                    <a class="btn default btn-xs blue-stripe" data-ng-href="/automations/view/{{Automation.id}}/settings">\n                                                                                {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(Automation.name, Automation.id)">\n                                                                          {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedAutomations.length">\n                                                               <td colspan="6" class="text-center">\n                                                                  <i>No available automations</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_USERNAME\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="channel" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_CHANNEL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\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="conf.AutomationsByPage.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/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="/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.automations.view.settings\')}">\n                                                  <a href="/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/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                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\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 && updateAutomation()" 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="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 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                                          </form>\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">{{ \'APPLICATION_CONDITIONS\' | translate }}</a> </span>\n                                                        </div>\n                                                </div>\n                                                <div class="portlet-body">\n                                                    <query-builder group="conditionsFilter.group" fields="fields.conditions" operators="$automations.operators" properties="properties[automation.channel]"></query-builder>\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 }}</a> </span>\n                                                   </div>\n                                                </div>\n                                                <div class="portlet-body">\n                                                    <query-builder group="actionsFilter.group" fields="fields.actions" properties="properties[automation.channel]"></query-builder>\n                                               </div>\n                                        </div>\n\n                                              <input class="btn green-haze" type="button" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-click="updateAutomation()"/>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/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="/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                                     <!-- <pre>\n                                            {{item | json}}\n                                       </pre>\n                                        <pre>\n                                         {{conditionsData.query | json}}\n                                       </pre>\n                                        <pre>\n                                         {{actionsData.query | json}}\n                                  </pre> -->\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 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                                                    <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            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(conditionsData.query.length && actionsData.query.length)">\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group"  >\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                                                          </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_CONDITIONS\' | translate }}</a> </span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="conditionsFilter.group" fields="fields.conditions" operators="$automations.operators" properties="properties[item.channel]"></query-builder>\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="actionsFilter.group" fields="fields.actions" properties="properties[item.channel]"></query-builder>\n                                                     </div>\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="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\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/chat/preview/preview.html",'<style>\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\n  div.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\n  div.xc_chat_head.rounded\n  {\n       border-radius: 20px 20px 0px 0px !important;\n  }\n\n  div.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/icon_visitorchat.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\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\n  a.xc_btn_exit_chat_confirm:hover\n  {\n   color:red;\n  }\n\n  a.xc_btn_exit_chat_cancel:hover\n  {\n     color:#0c0;\n  }\n\n  form.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  {\n        height:100px;\n  }\n\n  .xc_form_signup,.xc_form_enquiry\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 no-repeat;\n  }\n\n  .xc_submission_confirmed\n  {\n         background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_tick.png) left center no-repeat;\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\n  i.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      <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            <!--<i class="xc_btn_notifications_close">&times;</i>-->\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 ng-bind-html=\'chatWebsite.offline_message\'></p>\n                <input maxlength="45" type="text" name="data[Enquiry][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_enquiry_fullname" />\n                <input maxlength="85" type="text" name="data[Enquiry][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_enquiry_email" />\n                <textarea maxlength="1500" placeholder="{{chatWebsite.enquiry_message_placeholder}}" name="data[Enquiry][message]" class="xc_input_enquiry_message"></textarea>\n                <a href="#" class="xc_btn_enquiry xc_btn_style">{{chatWebsite.enquiry_button}}</a></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 ng-bind-html=\'chatWebsite.online_message\'></p>\n                <input maxlength="45" type="text" name="data[Discussion][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_fullname" />\n                <input maxlength="85" type="text" name="data[Discussion][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_email" />\n                <input type="hidden" class="xc_input_visitor_time" name="data[Discussion][visitor_time]" /><a href="#" class="xc_btn_signup xc_btn_style">{{chatWebsite.start_chat_button}}</a></form>\n        </div>\n        <!-- <div class="xc_conversation">\n            <div class="xc_conversation_container">\n                <p class="xc_message_intro" data-id="-10">{FirstMessageText}</p>\n            </div>\n            <div class="xc_composing_container"></div>\n            <form class="xc_form_reply" accept-charset="UTF-8">\n                <div class="xc_exit_chat_container"><a href="#" class="xc_btn_exit_chat">{ExitChatButtonText}</a>\n                    <div class="xc_exit_chat_confirmation_wrapper" style="display: none;"><span>{ExitChatQuestionText} </span><a href="#" class="xc_btn_exit_chat_confirm">{ExitChatButtonConfirmText}</a><span> | </span><a href="#" class="xc_btn_exit_chat_cancel">{ExitChatButtonCancelText}</a></div>\n                </div>\n                <textarea maxlength="750" placeholder="{MessagePlaceholderText}" name="data[Message][message]" class="xc_input_message"></textarea><a href="#" class="xc_btn_send xc_btn_style">{MessageSendButtonText}</a></form>\n        </div> -->\n        <div class="xc_footer">\n            <div class="xc_powered"><a>Powered by Xenialab | Trademark xCALLY</a></div>\n        </div>\n    </div>\n</div>\n'),a.put("app/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="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-layers"></i>\n                                           <a href="/chat/queues/list">{{ \'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">\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_QUEUE\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="chatQueues.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <!-- <li>\n                                                             <a href="#" data-ng-click="open()">\n                                                           <i class="icon-user"></i> {{ \'APPLICATION_QUICK\' | translate }} </a>\n                                                        </li> -->\n                                                     <li>\n                                                          <a href="/chat/queues/wizard">\n                                                                <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                                 <!-- <li>\n                                                             <a href="#">\n                                                          <i class="icon-users"></i> {{ \'APPLICATION_BULK\' | translate }} </a>\n                                                        </li> -->\n                                             </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getChatQueues([\'name\', \'description\', \'timeout\', \'strategy\'])" csv-header="[\'Username\', \'Description\', \'Timeout\', \'Strategy\']" field-separator=";" filename="chat_queues.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="displayedChatQueues" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.chatQueuesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                            <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="chatQueueByPage in chatQueuesByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="chatQueueByPage.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(queue, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="strategy">{{ \'APPLICATION_STRATEGY\' | translate }}</th>\n                                                                <th st-sort="timeout">{{ \'APPLICATION_AGENT_TIMEOUT\' | translate }}</th>\n                                                            <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="chatQueue in displayedChatQueues" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="chatQueues.checked" checklist-value="chatQueue.id"></td>\n                                             <td>{{chatQueue.name}}</td>\n                                                             <td>{{chatQueue.description}}</td>\n                                                            <td>{{chatQueue.strategy | uppercase}}</td>\n                                                           <td>{{chatQueue.timeout}}</td>\n                                              <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/chat/queues/view/{{chatQueue.id}}/settings">\n                                                                         {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(chatQueue.name,chatQueue.id)">\n                                                                             {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedChatQueues.length">\n                                                                <td colspan="6" style="text-align:center;">\n                                                                   <i>No chat queues 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="strategy" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_STRATEGY\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\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="conf.chatQueuesByPage.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/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" style="width: 50%; margin: 0 auto;">\n                                <!-- BEGIN FORM-->\n                            <form action="index.html" class="form-horizontal form-row-seperated">\n                                 <div class="form-body text-center">\n                                           <div class="form-group last">\n                                                 <div class="col-md-9" 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/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-layers"></i>\n                                   <a href="/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 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.chat.queues.view.settings\')}">\n                                                  <a data-ng-href="/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.chat.queues.view.agents\')}">\n                                                    <a data-ng-href="/chat/queues/view/{{queue.id}}/agents">\n                                                      <i class="icon-users"></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/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" 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 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">{{\'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 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                                         <!-- <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="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 [\'rrmemory\',\'beepall\'] | 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 HEADER SHAPE -->\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/chat/queue/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-envelope"></i>\n                         <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n        <i class="fa fa-angle-right"></i>\n                     </li>\n      <li>\n                             <i class="icon-layers"></i>\n                           <a href="/chat/queues/list">{{ \'APPLICATION_QUEUES\' | 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-layers font-green-sharp"></i>\n                          <span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }} WIZARD</a> </span>\n             </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                                        <form name="forms.general" data-ng-submit="forms.general.$valid && createItem()" 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.$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 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 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_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/>\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            </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}}<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 [\'rrmemory\',\'beepall\'] | 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="(forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid && 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 HEADER SHAPE -->\n                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CREATE\' | translate}}"/>\n                                  </form>\n                         </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\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/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          <table st-table="displayedAgents" st-safe-src="agents" class="table table-striped table-bordered table-hover">\n                        <div class="table-responsive">\n                          <thead>\n                                     <tr>\n                                          <th colspan="12">\n                                                     <div class="row">\n                                                             <div class="col-md-6">\n                                                                        <ui-select class="input-xsmall" ng-model="conf.agentsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                             <ui-select-choices repeat="agentByPage in agentsByPage | filter: $select.search">\n                                                                                     <div ng-bind-html="agentByPage.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></th>\n                                             <th st-sort="uniqueid" reverse class="input-small">{{ \'APPLICATION_UNIQUEID\' | translate }}</th>\n                                <th st-sort="queue" class="input-medium">{{ \'APPLICATION_QUEUE\' | translate }}</th>\n                                 <th st-sort="membername" class="input-medium">{{ \'APPLICATION_AGENT\' | translate }}</th>\n                                                <th st-sort="from" class="input-small">{{ \'APPLICATION_VISITOR\' | translate }}</th>\n                                         <th st-sort="accountname" class="input-small">{{ \'APPLICATION_WEB_SITE\' | translate }}</th>\n                                         <th st-sort="agentcalledAt" st-sort-default="reverse">{{ \'APPLICATION_CALLED_AT\' | translate }}</th>\n                                                <th st-sort="agentconnectAt">{{ \'APPLICATION_CONNECTED_AT\' | translate }}</th>\n                                              <th st-sort="agentringnoanswerAt">{{ \'APPLICATION_UNASWER_AT\' | translate }}</th>\n                                           <th st-sort="reason">{{ \'APPLICATION_REASON\' | translate }}</th>\n                              </tr>\n                         </thead>\n                      <tbody>\n                         <tr data-ng-repeat="agent in displayedAgents">\n                                            <td>\n                                                  <span>\n                                                                <i data-ng-class="{\'icon-user font-yellow\': agent.lastevent === \'called\',\n                                                         \'icon-user-following font-green\': agent.lastevent === \'agent\',\n                                                            \'icon-user-unfollow font-red\': agent.lastevent === \'timeout\',\n                                                             \'icon-user-unfollow font-blue\': agent.lastevent === \'answered_elsewhere\'}"></i>\n                                                   </span>\n                                               </td>\n                                         <td>{{agent.uniqueid}}</td>\n                                           <td>{{agent.chatqueuename}}</td>\n                                              <td>{{agent.fullname}}</td>\n                                           <td>{{agent.visitorname}} {{agent.visitoremail}}</td>\n                                         <td>{{agent.websitename}}</td>\n                                                <td>\n                                                  <time is="relative-time" datetime="{{agent.agentcalledAt}}">\n                                                          April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{agent.agentconnectedAt}}" data-ng-show="agent.agentconnectedAt">\n                                                         April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{agent.agentringnoanswerAt}}" data-ng-show="agent.agentringnoanswerAt">\n                                                           April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  {{agent.reason | uppercase}}\n                                          </td>\n                     </tr>\n                                     <tr data-ng-hide="displayedAgents.length">\n                                            <td colspan="11" style="text-align:center;">\n                                                  <i>No agents 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="uniqueid" data-ng-model="filters.uniqueid" placeholder="{{ \'APPLICATION_UNIQUEID\' | 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="queue" placeholder="{{ \'APPLICATION_QUEUE\' | 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="membername" placeholder="{{ \'APPLICATION_AGENT\' | 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="from" placeholder="{{ \'APPLICATION_VISITOR\' | 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="accountname" placeholder="{{ \'APPLICATION_WEB_SITE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                       </div>\n                                    </td>\n                                             <td colspan="7"></td>\n                           </tr>\n                           <tr>\n                            <td colspan="12" class="text-center">\n                                                   <div class="pagination" st-pagination st-items-by-page="conf.agentsByPage.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 PAGE CONTENT-->\n'),
-a.put("app/chat/realtime/view/session/session.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initChats()">\n        <div class="col-md-12">\n               <!-- START TABLE -->\n          <table st-table="displayedChats" st-safe-src="sessions" class="table table-striped table-bordered table-hover">\n                       <div class="table-responsive">\n                          <thead>\n                                     <tr>\n                                          <th colspan="12">\n                                                     <div class="row">\n                                                             <div class="col-md-6">\n                                                                        <ui-select class="input-xsmall" ng-model="conf.sessionsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                             <ui-select-choices repeat="sessionByPage in sessionsByPage | filter: $select.search">\n                                                                                 <div ng-bind-html="sessionByPage.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></th>\n                                             <th st-sort="uniqueid" reverse class="input-small">{{ \'APPLICATION_UNIQUEID\' | translate }}</th>\n                                <th st-sort="queue" class="input-medium">{{ \'APPLICATION_QUEUE\' | translate }}</th>\n                                 <th st-sort="membername" class="input-medium">{{ \'APPLICATION_AGENT\' | translate }}</th>\n                                                <th st-sort="visitorname" class="input-medium">{{ \'APPLICATION_VISITOR\' | translate }}</th>\n                                         <th st-sort="websitename" class="input-small">{{ \'APPLICATION_WEB_SITE\' | translate }}</th>\n                                         <th st-sort="sessioncalledAt" st-sort-default="reverse">{{ \'APPLICATION_JOIN_AT\' | translate }}</th>\n                                                <th st-sort="sessionconnectAt">{{ \'APPLICATION_LEAVE_AT\' | translate }}</th>\n                                                <th st-sort="sessionringnoanswerAt">{{ \'APPLICATION_UNMANAGED_AT\' | translate }}</th>\n                                 </tr>\n                         </thead>\n                      <tbody>\n                         <tr data-ng-repeat="session in displayedChats">\n                                           <td>\n                                                  <span>\n                                                                <i data-ng-class="{\'icon-user font-yellow\': session.mailjoinAt && !session.mailleaveAt,\n                                                             \'icon-user-following font-green\': session.fullname,\n                                                         \'icon-user-unfollow font-red\': session.mailunmanagedAt}"></i>\n                                                       </span>\n                                               </td>\n                                         <td>{{session.uniqueid}}</td>\n                                         <td>{{session.chatqueuename}}</td>\n                                            <td>{{session.fullname}}</td>\n                                         <td>{{session.visitorname + \' [\' + session.visitoremail + \']\'}}</td>\n                                              <td>{{session.websitename}}</td>\n                                              <td>\n                                                  <time is="relative-time" datetime="{{session.chatjoinAt}}">\n                                                           April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{session.chatleaveAt}}" data-ng-show="session.chatleaveAt">\n                                                               April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{session.chatunmanagedAt}}" data-ng-show="session.chatunmanagedAt">\n                                                               April 1, 2014\n                                                 </time>\n                                               </td>\n                     </tr>\n                                     <tr data-ng-hide="displayedChats.length">\n                                             <td colspan="11" style="text-align:center;">\n                                                  <i>No sessions 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="uniqueid" data-ng-model="filters.uniqueid" placeholder="{{ \'APPLICATION_UNIQUEID\' | 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="queue" placeholder="{{ \'APPLICATION_QUEUE\' | 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="membername" placeholder="{{ \'APPLICATION_AGENT\' | 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="visitorname" placeholder="{{ \'APPLICATION_VISITOR\' | 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="websitename" placeholder="{{ \'APPLICATION_WEB_SITE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                       </div>\n                                    </td>\n                                             <td colspan="7"></td>\n                           </tr>\n                           <tr>\n                            <td colspan="12" class="text-center">\n                                                   <div class="pagination" st-pagination st-items-by-page="conf.sessionsByPage.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 PAGE CONTENT-->\n'),a.put("app/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="icon-energy"></i>\n                                   <a href="/chat/realtime/list">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <div>\n             <nav class="navbar navbar-default" role="navigation">\n                     <div class="navbar-header">\n                       <button type="button" class="navbar-toggle" ng-init="navCollapsed = true" 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                     <!-- <a class="navbar-brand" ui-sref="home">Brand</a> -->\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 dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_AGENTS\' | translate }}\n                                      <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'agents\'></tree>\n                             </li>\n                                                                         <li dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_SESSIONS\' | translate }}\n                                    <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'sessions\'></tree>\n                           </li>\n                     </ul>\n                         <!-- <ul class="nav navbar-nav">\n                          <li dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_QUEUES\' | translate }}\n                                      <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'queues\'></tree>\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/chat/statistic/statistic.conversation.html",'<!-- BEGIN PAGE CONTENT-->\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_CONVERSATIONS\' | translate }}</a> </span>\n                     </div>\n                        <div class="actions">\n                         <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedChatRooms" filename="rooms.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="displayedChatRooms" st-safe-src="chatRooms" class="table table-bordered table-hover">\n                                <div class="table-responsive">\n                                        <thead>\n                                               <tr>\n                                                  <th colspan="9">\n                                                              <div class="row">\n                                                                     <div class="col-md-6">\n                                                                                <select class="form-control input-small select2me" data-ng-model="conf.chatRoomsByPage">\n                                                                                      <option value="10">10</option>\n                                                                                        <option value="25">25</option>\n                                                                                        <option value="50">50</option>\n                                                                                        <option value="{{chatRooms.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="type">{{ \'APPLICATION_TYPE\' | translate }}</th>\n                                                        <th st-sort="users">{{ \'APPLICATION_USERS\' | translate }}</th>\n                                                      <th st-sort="visitor">{{ \'APPLICATION_VISITOR\' | translate }}</th>\n                                                  <th st-sort="status">{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                    <th st-sort="createdAt">{{ \'APPLICATION_TIME\' | translate }}</th>\n                                           </tr>\n                                 </thead>\n                                      <tbody>\n                                               <tr data-ng-repeat="chatRoom in displayedChatRooms" data-ng-click="$location.path(\'/chat/statistics/conversation/\' + chatRoom.id)">\n                                                 <td style="text-align: center;">{{chatRoom.type | uppercase}}</td>\n                                                    <td style="text-align: center;">{{getUsersFullname(chatRoom.Users)}}</td>\n                                                     <td style="text-align: center;">{{chatRoom.ChatVisitor.email}}</td>\n                                                   <td style="text-align: center;">\n                                                              <span class="label label-sm label-success" data-ng-class="{\'label-success\': chatRoom.status == \'close\', \'label-warning\': chatRoom.status == \'open\'}">\n                                                                 {{chatRoom.status | capitalize}}\n                                                              </span>\n                                                       </td>\n                                                 <td style="text-align: center;">\n                                                              <time is="relative-time" datetime="{{chatRoom.createdAt}}">\n                                                                   April 1, 2014\n                                                         </time>\n                                                       </td>\n                                         </tr>\n                                 </tbody>\n                                      <tfoot>\n                                               <tr>\n                                                  <td colspan="9" class="text-center">\n                                                          <div st-pagination class="pagination" st-items-by-page="conf.chatRoomsByPage" 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<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.conversation.view.html",'<!-- BEGIN PAGE CONTENT-->\n<div data-ng-init="initRoomView()">\n        <div class="col-md-6">\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-book-open font-green-sharp"></i>\n                                       <span class="caption-subject">{{ \'APPLICATION_TRANSCRIPT\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default" href="#" ng-csv="chatRoom.ChatMessages" filename="chatMessages.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                            <div class="scroller" style="height: 352px;" data-always-visible="1" data-rail-visible1="1">\n                                  <ul class="chats">\n                                            <li data-ng-class="{\'out\': chatMessage.visitorId, \'in\': chatMessage.userId}" data-ng-repeat="chatMessage in chatRoom.ChatMessages | orderBy:\'-createdAt\'">\n                                                      <img class="avatar" data-ng-src="api/users/{{chatMessage.userId ? chatMessage.userId : \'avatar\'}}/avatar"/>\n                                                 <div class="message">\n                                                         <span class="arrow">\n                                                          </span>\n                                                               <a href="#" class="name">\n                                                             {{chatMessage.fullname}} </a>\n                                                         <span class="datetime">\n                                                                       <time is="relative-time" datetime="{{chatMessage.createdAt}}">\n                                                                                April 1, 2014\n                                                                 </time>\n                                                               </span>\n                                                               <span class="body">\n                                                                   {{chatMessage.body}}\n                                                          </span>\n                                                       </div>\n                                                </li>\n                                 </ul>\n                         </div>\n                        </div>\n                <!-- END PORTLET-->\n           </div>\n        </div>\n        <div class="col-md-6">\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-user font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VISITOR\' | translate }}:</a> </span>\n                                  <span class="caption-helper">{{chatRoom.ChatVisitor.fullname}}</span>\n                         </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.fullname">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-8 value">\n                                          {{chatRoom.ChatVisitor.fullname}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.email">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_EMAIL\' | translate}}\n                                 </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.email}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.remote_address">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.remote_address}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.referer">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_REFERER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.referer}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.browser">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_BROWSER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.browser}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.engine">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_ENGINE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.engine}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.os">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_OS\' | translate}}\n                                    </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.os}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.device">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_DEVICE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.device}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.country">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_COUNTRY\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.country}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.region">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_REGION\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.region}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.city">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_CITY\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.city}}\n                                 </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.latitude">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_LATITUDE\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.latitude}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.longitude">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_LONGITUDE\' | translate}}\n                                     </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.longitude}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.createdAt">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_ARRIVAL_TIME\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          <time is="relative-time" datetime="{{chatRoom.ChatVisitor.createdAt}}">\n                                                       April 1, 2014\n                                         </time>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n           <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-repeat="user in chatRoom.Users">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-earphones-alt font-green-sharp"></i>\n                                   <span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }}:</a> </span>\n                                    <span class="caption-helper">{{user.fullname}}</span>\n                         </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{user.fullname}}\n                                     </div>\n                                </div>\n                                <div class="row static-info">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_USERNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{user.name}}\n                                 </div>\n                                </div>\n                                <div class="row static-info">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_ROLE\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{user.role | uppercase}}\n                                     </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.enquiry.html",'<!-- BEGIN PAGE CONTENT-->\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-question font-green-sharp"></i>\n                                <span class="caption-subject">{{ \'APPLICATION_ENQUIRIES\' | translate }}</a> </span>\n                 </div>\n                        <div class="actions">\n                         <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedChatEnquiries" filename="enquiries.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="displayedChatEnquiries" st-safe-src="chatEnquiries" class="table table-bordered table-hover">\n                                <div class="table-responsive">\n                                        <thead>\n                                               <tr>\n                                                  <th colspan="9">\n                                                              <div class="row">\n                                                                     <div class="col-md-6">\n                                                                                <select class="form-control input-small select2me" data-ng-model="conf.chatEnquiriesByPage">\n                                                                                  <option value="10">10</option>\n                                                                                        <option value="25">25</option>\n                                                                                        <option value="50">50</option>\n                                                                                        <option value="{{chatEnquiries.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="type">{{ \'APPLICATION_USERNAME\' | translate }}</th>\n                                                    <th st-sort="users">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                      <th st-sort="createdAt">{{ \'APPLICATION_TIME\' | translate }}</th>\n                                           </tr>\n                                 </thead>\n                                      <tbody>\n                                               <tr data-ng-repeat="chatEnquiry in displayedChatEnquiries" data-ng-click="$location.path(\'/chat/statistics/enquiry/\' + chatEnquiry.id)">\n                                                    <td style="text-align: center;">{{chatEnquiry.username}}</td>\n                                                 <td style="text-align: center;">{{chatEnquiry.email}}</td>\n                                                    <td style="text-align: center;">\n                                                              <time is="relative-time" datetime="{{chatEnquiry.createdAt}}">\n                                                                        April 1, 2014\n                                                         </time>\n                                                       </td>\n                                         </tr>\n                                 </tbody>\n                                      <tfoot>\n                                               <tr>\n                                                  <td colspan="9" class="text-center">\n                                                          <div st-pagination class="pagination" st-items-by-page="conf.chatEnquiriesByPage" 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<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.enquiry.view.html",'<!-- BEGIN PAGE CONTENT-->\n<div data-ng-init="initEnquiryView()">\n  <div class="col-md-6">\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_TEXT\' | translate }}</a> </span>\n                              </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default" href="#" ng-csv="chatEnquiry" filename="chatEnquery.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                            <!-- BEGIN PAGE CONTENT-->\n                            <div class="note note-warning">\n                                       <h4 class="block">{{chatEnquiry.ChatVisitor.fullname}} -\n                                              <time is="relative-time" datetime="{{chatEnquiry.createdAt}}">\n                                                        April 1, 2014\n                                         </time>\n                                       </h4>\n                                 <p>\n                                            {{chatEnquiry.text}}\n                                 </p>\n                          </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n        <div class="col-md-6">\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-user font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VISITOR\' | translate }}:</a> </span>\n                                  <span class="caption-helper">{{chatEnquiry.ChatVisitor.fullname}}</span>\n                              </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.fullname">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-8 value">\n                                          {{chatEnquiry.ChatVisitor.fullname}}\n                                  </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.email">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_EMAIL\' | translate}}\n                                 </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.email}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.remote_address">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.remote_address}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.referer">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_REFERER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.referer}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.browser">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_BROWSER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.browser}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.engine">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_ENGINE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.engine}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.os">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_OS\' | translate}}\n                                    </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.os}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.device">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_DEVICE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.device}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.country">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_COUNTRY\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.country}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.region">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_REGION\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.region}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.city">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_CITY\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.city}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.latitude">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_LATITUDE\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.latitude}}\n                                  </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.longitude">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_LONGITUDE\' | translate}}\n                                     </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.longitude}}\n                                 </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.createdAt">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_ARRIVAL_TIME\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          <time is="relative-time" datetime="{{chatEnquiry.ChatVisitor.createdAt}}">\n                                                    April 1, 2014\n                                         </time>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initList()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-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-eyeglass"></i>\n                                 <a href="/chat/statistics">{{ \'APPLICATION_STATISTICS\' | 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/statistics.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 BUTTONS -->\n                              <!-- <div class="profile-userbuttons">\n                                        <button type="button" class="btn btn-circle green-haze btn-sm">Follow</button>\n                                        <button type="button" class="btn btn-circle btn-danger btn-sm">Message</button>\n                               </div> -->\n                            <!-- END SIDEBAR BUTTONS -->\n                          <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.chat.statistics.summary\')}">\n                                                    <a ng-href="/chat/statistics/summary">\n                                                        <i class="icon-list"></i>\n                                                     {{ \'APPLICATION_SUMMARY\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.chat.statistics.enquiry\') || $state.is(\'main.chat.statistics.enquiries\')}">\n                                                   <a ng-href="/chat/statistics/enquiries">\n                                                      <i class="icon-question"></i>\n                                                 {{ \'APPLICATION_ENQUIRIES\' | translate }} </a>\n                                              </li>\n                                         <li data-ng-class="{active: $state.is(\'main.chat.statistics.conversation\') || $state.is(\'main.chat.statistics.conversations\')}">\n                                                  <a ng-href="/chat/statistics/conversations">\n                                                  <i class="icon-notebook"></i>\n                                                 {{ \'APPLICATION_CONVERSATIONS\' | translate }} </a>\n                                          </li>\n                                         <li data-ng-class="{active: $state.is(\'main.chat.statistics.visitor\') || $state.is(\'main.chat.statistics.visitors\')}">\n                                                    <a ng-href="/chat/statistics/visitors">\n                                                       <i class="icon-users"></i>\n                                                    {{ \'APPLICATION_VISITORS\' | 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/chat/statistic/statistic.summary.html",'<div class="col-md-12">\n       <!-- BEGIN Portlet PORTLET-->\n <div class="portlet light bordered" data-ng-show="online">\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_LOCATIONS\' | translate }}</a> </span>\n                 </div>\n                </div>\n                <div class="portlet-body">\n                    <map center="0, 0" zoom="2">\n                          <marker data-ng-show="chatVisitor.latitude && chatVisitor.longitude" data-ng-repeat="chatVisitor in chatVisitors" position="{{chatVisitor.latitude}}, {{chatVisitor.longitude}}" title="{{chatVisitor.fullname}}"></marker>\n                   </map>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\n\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-notebook font-green-sharp"></i>\n                                <span class="caption-subject">{{ \'APPLICATION_CONVERSATIONS\' | translate }}</a> </span>\n                     </div>\n                </div>\n                <div class="portlet-body">\n                    <div class="row">\n                             <div class="col-md-6">\n                                        <div class="portlet sale-summary">\n                                            <div class="portlet-body">\n                                                    <ul class="list-unstyled">\n                                                            <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_OPENED\' | translate }} <i class="fa fa-img-up"></i>\n                                                                 </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatRooms | filter:{ status:\'open\' }).length }} </span>\n                                                         </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_CLOSED\' | translate }} <i class="fa fa-img-down"></i>\n                                                                       </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatRooms | filter:{ status:\'close\' }).length }} </span>\n                                                                </li>\n                                                 </ul>\n                                         </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <canvas class="chart chart-pie" data="[(chatRooms | filter:{ status:\'open\' }).length, (chatRooms | filter:{ status:\'close\' }).length]" labels="[$translate.instant(\'APPLICATION_OPENED\'), $translate.instant(\'APPLICATION_CLOSED\')]" legend="true"></canvas>\n                          </div>\n                        </div>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\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-users font-green-sharp"></i>\n                           <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                  </div>\n                </div>\n                <div class="portlet-body">\n                    <div class="row">\n                             <div class="col-md-6">\n                                        <div class="portlet sale-summary">\n                                            <div class="portlet-body">\n                                                    <ul class="list-unstyled">\n                                                            <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_PENDING\' | translate }} <i class="fa fa-img-up"></i>\n                                                                        </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatVisitors | filter:{ status:\'pending\' }).length }} </span>\n                                                           </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_SERVED\' | translate }} <i class="fa fa-img-down"></i>\n                                                                       </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatVisitors | filter:{ status:\'served\' }:true).length }} </span>\n                                                               </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_UNSERVED\' | translate }} </span>\n                                                                    <span class="sale-num">\n                                                                       {{ (chatVisitors | filter:{ status:\'unserved\' }).length }} </span>\n                                                          </li>\n                                                 </ul>\n                                         </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <canvas class="chart chart-pie" data="[(chatVisitors | filter:{ status:\'pending\' }).length, (chatVisitors | filter:{ status:\'served\' }:true).length, (chatVisitors | filter:{ status:\'unserved\' }).length]" labels="[$translate.instant(\'APPLICATION_PENDING\'), $translate.instant(\'APPLICATION_SERVED\'), $translate.instant(\'APPLICATION_UNSERVED\')]" legend="true"></canvas>\n                            </div>\n                        </div>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\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-question font-green-sharp"></i>\n                                <span class="caption-subject">{{ \'APPLICATION_ENQUIRIES\' | translate }}</a> </span>\n                 </div>\n                </div>\n                <div class="portlet-body">\n                    <div class="row">\n                             <div class="col-md-6">\n                                        <div class="portlet sale-summary">\n                                            <div class="portlet-body">\n                                                    <ul class="list-unstyled">\n                                                            <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_READ\' | translate }}<i class="fa fa-img-up"></i>\n                                                                    </span>\n                                                                       <span class="sale-num">\n                                                                       {{(chatEnquiries | filter:{ read:true }).length}} </span>\n                                                             </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_UNREAD\' | translate }}<i class="fa fa-img-down"></i>\n                                                                        </span>\n                                                                       <span class="sale-num">\n                                                                       {{(chatEnquiries | filter:{ read:false }).length}} </span>\n                                                            </li>\n                                                 </ul>\n                                         </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <canvas class="chart chart-pie" data="[(chatEnquiries | filter:{ read:true }).length, (chatEnquiries | filter:{ read:false }).length]" labels="[$translate.instant(\'APPLICATION_READ\'), $translate.instant(\'APPLICATION_UNREAD\')]" legend="true" ng-show="true"></canvas>\n                         </div>\n                        </div>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\n</div>\n'),
-a.put("app/chat/statistic/statistic.visitor.html",'<!-- BEGIN PAGE CONTENT-->\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-users font-green-sharp"></i>\n                           <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                  </div>\n                        <div class="actions">\n                         <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedChatVisitors" filename="visitors.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="displayedChatVisitors" st-safe-src="chatVisitors" class="table table-bordered table-hover">\n                          <div class="table-responsive">\n                                        <thead>\n                                               <tr>\n                                                  <th colspan="9">\n                                                              <div class="row">\n                                                                     <div class="col-md-6">\n                                                                                <select class="form-control input-small select2me" data-ng-model="conf.chatVisitorsByPage">\n                                                                                   <option value="10">10</option>\n                                                                                        <option value="25">25</option>\n                                                                                        <option value="50">50</option>\n                                                                                        <option value="{{chatVisitors.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="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                        <th st-sort="email">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                      <th st-sort="remote_address">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                    <th st-sort="referer">{{ \'APPLICATION_ORIGIN\' | translate }}</th>\n                                                   <th st-sort="device">{{ \'APPLICATION_DEVICE\' | translate }}</th>\n                                                    <th st-sort="browser">{{ \'APPLICATION_BROWSER\' | translate }}</th>\n                                                  <th st-sort="visitor_language">{{ \'APPLICATION_LANGUAGES\' | translate }}</th>\n                                                       <th st-sort="status">{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                    <th st-sort="createdAt">{{ \'APPLICATION_TIME\' | translate }}</th>\n                                           </tr>\n                                 </thead>\n                                      <tbody>\n                                               <tr data-ng-repeat="chatVisitor in displayedChatVisitors" data-ng-click="$location.path(\'/chat/statistics/visitor/\' + chatVisitor.id)">\n                                                     <td>{{chatVisitor.fullname}}</td>\n                                                     <td>{{chatVisitor.email}}</td>\n                                                        <td>{{chatVisitor.remote_address}}</td>\n                                                       <td>{{chatVisitor.referer}}</td>\n                                                      <td class="centered-td">{{chatVisitor.device ? chatVisitor.device : \'--\'}}</td>\n                                                     <td class="centered-td">\n                                                              <img data-ng-show="chatVisitor.browser.includes(\'Chrome\')" data-ng-src="assets/images/browsers/chrome/chrome_16x16.png" data-title="{{chatVisitor.browser}}" bs-tooltip>\n                                                            <img data-ng-show="chatVisitor.browser.includes(\'Safari\')" data-ng-src="assets/images/browsers/safari/safari_16x16.png">\n                                                            <img data-ng-show="chatVisitor.browser.includes(\'Firefox\')" data-ng-src="assets/images/browsers/firefox/firefox_16x16.png">\n                                                         <img data-ng-show="chatVisitor.browser.includes(\'Explorer\')" data-ng-src="assets/images/browsers/internet-explorer/internet-explorer_16x16.png">\n                                                    </td>\n                                                 <td class="centered-td">\n                                                              <img data-ng-show="chatVisitor.visitor_language.includes(\'IT\') || chatVisitor.visitor_language.includes(\'it\')" data-ng-src="assets/images/flags/it.png">\n                                                          <img data-ng-show="chatVisitor.visitor_language.includes(\'US\') || chatVisitor.visitor_language.includes(\'us\')" data-ng-src="assets/images/flags/us.png">\n                                                          <img data-ng-show="chatVisitor.visitor_language.includes(\'EN\') || chatVisitor.visitor_language.includes(\'en\')" data-ng-src="assets/images/flags/en_EN.png">\n                                                       </td>\n                                                 <td class="centered-td">\n                                                              <span class="label label-sm label-success" data-ng-class="{\'label-warning\': chatVisitor.status == \'pending\', \'label-danger\': chatVisitor.status == \'unserved\'}">\n                                                                      {{ $translate.instant(\'APPLICATION_\' + $filter(\'uppercase\')(chatVisitor.status)) }}\n                                                               </span>\n                                                       </td>\n                                                 <td style="text-align: center;">\n                                                              <time is="relative-time" datetime="{{chatVisitor.createdAt}}">\n                                                                        April 1, 2014\n                                                         </time>\n                                                       </td>\n                                         </tr>\n                                 </tbody>\n                                      <tfoot>\n                                               <tr>\n                                                  <td colspan="9" class="text-center">\n                                                          <div st-pagination class="pagination" st-items-by-page="conf.chatVisitorsByPage" 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<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.visitor.view.html",'<!-- BEGIN PAGE CONTENT-->\n<div data-ng-init="initVisitorView()">\n  <div class="col-md-6">\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-pin font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_LOCATION\' | translate }}</a> </span>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- BEGIN PAGE CONTENT-->\n                            <map center="{{chatVisitor.latitude}}, {{chatVisitor.longitude}}" zoom="8">\n                                   <marker position="{{chatVisitor.latitude}}, {{chatVisitor.longitude}}" title="{{chatVisitor.fullname}}"></marker>\n                             </map>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n        <div class="col-md-6">\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-user font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VISITOR\' | translate }}:</a> </span>\n                                  <span class="caption-helper">{{chatVisitor.fullname}}</span>\n                          </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info" data-ng-show="chatVisitor.longitude && chatVisitor.latitude">\n                            </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.fullname">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-8 value">\n                                          {{chatVisitor.fullname}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.email">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_EMAIL\' | translate}}\n                                 </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.email}}\n                                 </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.remote_address">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.remote_address}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.referer">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_REFERER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.referer}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.browser">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_BROWSER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.browser}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.engine">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_ENGINE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.engine}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.os">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_OS\' | translate}}\n                                    </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.os}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.device">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_DEVICE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.device}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.country">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_COUNTRY\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.country}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.region">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_REGION\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.region}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.city">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_CITY\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.city}}\n                                  </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.latitude">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_LATITUDE\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.latitude}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.longitude">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_LONGITUDE\' | translate}}\n                                     </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.longitude}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.createdAt">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_ARRIVAL_TIME\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          <time is="relative-time" datetime="{{chatVisitor.createdAt}}">\n                                                        April 1, 2014\n                                         </time>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/chat/timeline/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-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-list"></i>\n                                             <a href="/mail/timeline/list"> Timeline</a>\n                                   </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initList()">\n     <div class="col-md-12">\n    <h3 class="page-title">\n                          Timeline\n                      </h3>\n                 <!-- END PAGE HEADER-->\n                       <!-- BEGIN PAGE CONTENT-->\n                    <div class="timeline">\n                                <!-- TIMELINE ITEM -->\n                                <div class="timeline-item" data-ng-repeat="event in events | orderBy:\'-id\'"  ng-animate=" \'animate\' ">\n                                    <div class="timeline-badge">\n                                          <div class="timeline-icon">\n                                                   <i class="icon-envelope font-green-haze"></i>\n                                         </div>\n                                        </div>\n                                        <div class="timeline-body">\n                                           <div class="timeline-body-arrow"></div>\n                                               <div class="timeline-body-head">\n                                                      <div class="timeline-body-head-caption">\n                                                              <span class="timeline-body-alerttitle" data-ng-class="{\'font-red\': event.name == \'INCOMING\', \'font-blue\': event.name == \'ATTEMPT\', \'font-green\': event.name == \'TAKEN\'}">{{event.name | uppercase}}</span>\n                                                                <span class="timeline-body-time font-grey-cascade">at {{event.createdAt | date:\'yyyy-MM-dd HH:mm:ss\'}}</span>\n                                                       </div>\n                                                        <div class="timeline-body-head-actions">\n                                                              <div class="btn-group">\n                                                                       <a class="btn btn-circle btn-sm dropdown-toggle btn-success" href="/mail/inbox/room/{{event.MailRoomId}}">Go To Mail</a>\n                                                              </div>\n                                                        </div>\n                                                </div>\n                                                <div class="timeline-body-content">\n                                                   <span class="font-grey-cascade" data-ng-show="event.User">\n                                                    {{event.MailRoom.subject ? event.MailRoom.subject + \' - \' : \'\'}}<a href="/agents/view/{{event.UserId}}/account">{{event.User.fullname}}</a>\n                                                       </span>\n                                               </div>\n                                        </div>\n                                </div>\n                                <!-- END TIMELINE ITEM -->\n                    </div>\n                        <!-- END PAGE CONTENT-->\n      </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/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="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="/chat/websites/list">{{ \'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">\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="chatWebsites.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_WEB_SITE\' | translate }} <i class="fa fa-angle-down"></i>\n                                             </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <!-- <li>\n                                                             <a href="#" data-ng-click="open()">\n                                                           <i class="icon-user"></i> {{ \'APPLICATION_QUICK\' | translate }} </a>\n                                                        </li> -->\n                                                     <li>\n                                                          <a href="/chat/websites/wizard">\n                                                              <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                                 <!-- <li>\n                                                             <a href="#">\n                                                          <i class="icon-users"></i> {{ \'APPLICATION_BULK\' | translate }} </a>\n                                                        </li> -->\n                                             </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getChatWebsites([\'name\', \'address\', \'description\', \'remote\'])" csv-header="[\'Name\', \'Address\', \'Description\', \'Remote\']" field-separator=";" filename="chat_websites.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="displayedChatWebsites" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                    <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.chatWebsitesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="chatWebsiteByPage in chatWebsitesByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="chatWebsiteByPage.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(agent, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                              <th st-sort="address">{{ \'APPLICATION_WEB_ADDRESS\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="chatWebsite in displayedChatWebsites" class="animate-repeat">\n                                                         <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="chatWebsites.checked" checklist-value="chatWebsite.id"></td>\n                                         <td>{{chatWebsite.name}}</td>\n                                                           <td>{{chatWebsite.description}}</td>\n                                        <td><a ng-href="{{chatWebsite.address}}">{{chatWebsite.address}}</a></td>\n                                             <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/chat/websites/view/{{chatWebsite.id}}/snippet/view">\n                                                                         {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(chatWebsite.name,chatWebsite.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedChatWebsites.length">\n                                                              <td colspan="5" style="text-align:center;">\n                                                                   <i>{{\'MESSAGE_NO_AVAILABLE_WEBSITES\' | translate}}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="address" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_WEB_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.chatWebsitesByPage.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/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">\n                                               <a class="btn green-jungle " href="/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                          <table class="table table-striped table-bordered table-hover">\n                                          <thead>\n                                               <tr>\n                                                    <th class="input-small" align="center">{{\'APPLICATION_APPLICATION\' | translate}}</th>\n                                                           <th class="input-small" align="center">{{\'APPLICATION_TIMEOUT\' | translate}} [s]</th>\n                                                   <th align="center">{{ \'APPLICATION_INTERVAL\' | translate }}</th>\n                                                                <th class="input-small">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                  </tr>\n                                         </thead>\n                                      <tbody ui-sortable="sortableOptions" data-ng-model="chatApplications">\n                                          <tr data-ng-repeat="application in chatApplications">\n                                                             <td align="center">\n                                                                   <span>\n                                                                                <i data-ng-class="application.User ? \'icon-user\' : \'icon-docs\'"></i>\n                                                                      </span>\n                                                               </td>\n                                                         <td align="center">{{application.timeout}}</td>\n                                                               <td align="center">{{application.Interval ? application.Interval.name : application.interval}}</td>\n                                                           <td>\n                                                                  <a class="btn default btn-xs blue-stripe" data-ng-href="/chat/websites/view/{{chatWebsite.id}}/actions/view/{{application.id}}">\n                                                                              {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(application.app, application.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="chatApplications.length">\n                                                           <td colspan="5" style="text-align:center;">\n                                                                   <i>No applications available</i>\n                                                              </td>\n                                                 </tr>\n                                   </tbody>\n                            </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/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                                    <!-- START HOST -->\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="0" 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 HOST -->\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 class="input-medium" 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                                                  <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                                    </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                                                  <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                                    </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>{{$select.selected}}</ui-select-match>\n                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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>{{$select.selected}}</ui-select-match>\n                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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 inpu" 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                                                  <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/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                                                    <!-- START HOST -->\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="0" 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 HOST -->\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                                                                  <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                                                    </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.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                                                                  <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                                                    </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>{{$select.selected}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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>{{$select.selected}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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                                                                  <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                                            <!-- <button class="btn green-haze" type="button" wz-previous><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button> -->\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/chat/website/view/snippet/view/view.html",'<div class="row" data-ng-init="getSnippetCode()">\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_EMBEDDING\' | translate}}</a>\n                                    </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_APPEARANCE\' | translate}}</a>\n                                   </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FORMS\' | translate}}</a>\n                                        </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_LABELS\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_5" data-toggle="tab">{{\'APPLICATION_SETTINGS\' | 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                                                             <!-- EMBEDDING TAB -->\n                                                                <div class="tab-pane active" id="tab_1_1">\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                                                                                               <textarea name="snippet" rows="13" style="resize:none;cursor:text;" class="form-control" readonly data-ng-model="snippetCode"></textarea>\n                                                                                     </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </div>\n                                                                <!-- END EMBEDDING TAB -->\n\n                                                          <!-- APPEARANCE TAB -->\n                                                               <div class="tab-pane" id="tab_1_2">\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_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="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>\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.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="animationToggle in [true, false] | filter: $select.search">\n                                                                                                        <div ng-bind-html="animationToggle ? \'On\' : \'Off\' | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <!-- END ANIMATION TOGGLE -->\n\n\n                                                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                                                  </form>\n                                                               </div>\n                                                                <!-- END APPEARANCE TAB -->\n\n                                                         <!-- FORMS TAB -->\n                                                            <div class="tab-pane" id="tab_1_3">\n                                                                   <form name="forms.formFunctionality" data-ng-submit="forms.formFunctionality.$valid && updateItem()" 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="chatWebsite.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 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_4">\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 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_USERNAME_PLACEHOLDER\' | translate}}</label>\n                                                                                     <input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_USERNAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.username_placeholder"/>\n                                                                              </div>\n                                                                                <!-- END USERNAME PLACEHOLDER -->\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 == \'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.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="chatWebsite.offline_message"/>\n                                                                             </div>\n                                                                                <!-- END OFFLINE MESSAGE -->\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.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="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.startChatButton.$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                                                                         <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_5">\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_REMOTE\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                                      <input type="url" name="remote" placeholder="{{\'APPLICATION_REMOTE\' | 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                                                                               </div>\n                                                                                <!-- END REMOTE IP -->\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                                                     </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\',\'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("{widgetsPath}/counter/src/view.html",'<div class=dashboard-stat ng-class=config.color ng-if="count || count === 0"><div class=visual><i class=fa ng-class=config.icon></i></div><div class=details><div class=number>{{count}}</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="!count && count != 0"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.pie-chart",["adf.provider"]).value("apiServiceUrlPieChart","/api/widgets/piechart").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",["$q","$http","apiServiceUrlPieChart",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("apiWidgetPieChartEditCtrl",["$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.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetPieChartViewCtrl",["$scope","$interval","apiServicePieChart",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,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&&1===b.length){a.labels=[],a.data=[];for(var c in b[0])a.labels.push(c),a.data.push(b[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 }}">{{$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_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=1></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),function(){angular.module("pdf",[]).directive("ngPdf",["$window",function(a){return{restrict:"E",templateUrl:function(a,b){return b.templateUrl?b.templateUrl:"partials/viewer.html"},link:function(b,c,d){var e=d.pdfUrl,f=null,g=d.page?d.page:1,h=d.scale>0?d.scale:1,i=c.find("canvas"),j=i[0],k=j.getContext("2d"),l=angular.element(a);l.on("scroll",function(){b.$apply(function(){b.scroll=l[0].scrollY})}),PDFJS.disableWorker=!0,b.pageNum=g,b.renderPage=function(a){f.getPage(a).then(function(a){var e,f,g,i={};"page-fit"!==d.scale||h?e=a.getViewport(h):(e=a.getViewport(1),f=c[0].clientWidth/e.width,g=c[0].clientHeight/e.height,h=Math.min(f,g)),j.height=e.height,j.width=e.width,i={canvasContext:k,viewport:e},a.render(i).promise.then(function(){"function"==typeof b.onPageRender&&b.onPageRender()})})},b.goPrevious=function(){b.pageToDisplay<=1||(b.pageNum=parseInt(b.pageNum)-1)},b.goNext=function(){b.pageToDisplay>=f.numPages||(b.pageNum=parseInt(b.pageNum)+1)},b.zoomIn=function(){return h=parseFloat(h)+.2,b.renderPage(b.pageToDisplay),h},b.zoomOut=function(){return h=parseFloat(h)-.2,b.renderPage(b.pageToDisplay),h},b.changePage=function(){b.renderPage(b.pageToDisplay)},b.rotate=function(){"rotate0"===j.getAttribute("class")?j.setAttribute("class","rotate90"):"rotate90"===j.getAttribute("class")?j.setAttribute("class","rotate180"):"rotate180"===j.getAttribute("class")?j.setAttribute("class","rotate270"):j.setAttribute("class","rotate0")},PDFJS.getDocument(e,null,null,b.onProgress).then(function(a){"function"==typeof b.onLoad&&b.onLoad(),f=a,b.renderPage(b.pageToDisplay),b.$apply(function(){b.pageCount=a.numPages})},function(a){a&&"function"==typeof b.onError&&b.onError(a)}),b.$watch("pageNum",function(a){b.pageToDisplay=parseInt(a),null!==f&&b.renderPage(b.pageToDisplay)})}}}])}();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")?!0:!1,railVisible:"1"==$(this).attr("data-rail-visible")?!0:!1,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?!1:!0},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}),$(".sidebar-search .submit").on("click",function(a){a.preventDefault(),$("body").hasClass("page-sidebar-closed")&&$(".sidebar-search").hasClass("open")===!1?(1===$(".page-sidebar-fixed").size()&&$(".page-sidebar .sidebar-toggler").click(),
+$(".sidebar-search").addClass("open")):$(".sidebar-search").submit()}),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(){var a=$("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"),$("body").on("click",".sidebar-toggler",function(b){var c=$(".page-sidebar"),d=$(".page-sidebar-menu");$(".sidebar-search",c).removeClass("open"),a.hasClass("page-sidebar-closed")?(a.removeClass("page-sidebar-closed"),d.removeClass("page-sidebar-menu-closed"),$.cookie&&$.cookie("sidebar_closed","0")):(a.addClass("page-sidebar-closed"),d.addClass("page-sidebar-menu-closed"),a.hasClass("page-sidebar-fixed")&&d.trigger("mouseleave"),$.cookie&&$.cookie("sidebar_closed","1")),$(window).trigger("resize")})},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/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-people"></i>\n                                   <a href="/agents/list">{{ \'APPLICATION_AGENTS\' | 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-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="agents.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="#" data-toggle="dropdown">\n                                                  <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AGENT\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/agents/wizard">\n                                                             <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAgents([\'name\', \'fullname\', \'email\'])" csv-header="[\'Username\', \'Fullname\', \'Email\']" field-separator=";" filename="agents.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="displayedAgents" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                  <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.agentsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="agentByPage in agentsByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="agentByPage.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(agent, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="fullname">{{ \'APPLICATION_FULLNAME\' | translate }}</th>\n                                                <th st-sort="name">{{ \'APPLICATION_USERNAME\' | translate }}</th>\n                                                    <th st-sort="email">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="agent in displayedAgents" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="agents.checked" checklist-value="agent.id"></td>\n                                                               <td>{{agent.fullname}}</td>\n                                         <td>{{agent.name}}</td>\n                                       <td><a data-ng-href="mailto:{{agent.email}}">{{agent.email}}</a></td>\n                                         <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/agents/view/{{agent.id}}/account">\n                                                                           {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(agent.fullname,agent.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedAgents.length">\n                                                            <td colspan="5" style="text-align:center;">\n                                                                   <i>No agents 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="fullname" 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="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_USERNAME\' | 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                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.agentsByPage.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/agent/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 data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\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()">\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() || 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()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\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.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | 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}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="agent.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 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 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="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\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                                                       <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()" 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 src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" 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() || 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()" 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" 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 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/agent/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-people"></i>\n                                   <a href="/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.agents.view.account\')}">\n                                                        <a data-ng-href="/agents/view/{{agent.id}}/account">\n                                                  <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | 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/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-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" 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_NAME\' | 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" required ng-remote-validate="/api/agents/validate/name"/>\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                             </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 ng-remote-validate="/api/agents/validate/email"/>\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                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.ngRemoteValidate" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_EMAIL\' | 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" required/>\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" ng-remote-validate="/api/agents/validate/internal"/>\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                                                       <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                             <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 ACCOUNTCODE -->\n                                            <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_ACCOUNTCODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                  <input type="number" name="accountcode" placeholder="{{\'APPLICATION_ACCOUNTCODE\' | translate}}" class="form-control" data-ng-model="item.accountcode" required/>\n                                                    <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="(forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div> -->\n                                            <!-- END ACCOUNTCODE -->\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 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="item.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 ng-model="item.nat" name="nat" theme="bootstrap" ng-disabled="disabled">\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\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="item.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="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 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/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-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">\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="Automations.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }} <i class="fa fa-angle-down"></i>\n                                           </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/automations/wizard">\n                                                                <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAutomations([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="automations.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="displayedAutomations" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.AutomationsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="AutomationByPage in AutomationsByPage | filter: $select.search">\n                                                                                                   <div ng-bind-html="AutomationByPage.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 st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th> -->\n                                                              <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(Automation, checked)" checklist-model checklist-value="id"></th>\n                                               <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="channel">{{ \'APPLICATION_CHANNEL\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                             <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="Automation in displayedAutomations">\n                                                          <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="Automations.checked" checklist-value="Automation.id"></td>\n                                           <td>{{Automation.name}}</td>\n                                                            <td>{{Automation.description}}</td>\n                                                           <td>{{Automation.channel | capitalize}}</td>\n                                                          <td>\n                                                                  <input\n                                                                                data-ng-change="updateItem(Automation.id, Automation.status)",\n                                                                    bs-switch\n                                                             ng-model="Automation.status"\n                                                                  type="checkbox"\n                                                               switch-active="{{ isActive }}"\n                                                                switch-on-text="{{ onText }}"\n                                                                 switch-off-text="{{ offText }}"\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                                                          </td>\n                                       <td>\n                                                                    <a class="btn default btn-xs blue-stripe" data-ng-href="/automations/view/{{Automation.id}}/settings">\n                                                                                {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(Automation.name, Automation.id)">\n                                                                          {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedAutomations.length">\n                                                               <td colspan="6" class="text-center">\n                                                                  <i>No available automations</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_USERNAME\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="channel" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_CHANNEL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\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="conf.AutomationsByPage.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/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="/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.automations.view.settings\')}">\n                                                  <a href="/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/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                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\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 && updateAutomation()" 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="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 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                                          </form>\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">{{ \'APPLICATION_CONDITIONS\' | translate }}</a> </span>\n                                                        </div>\n                                                </div>\n                                                <div class="portlet-body">\n                                                    <query-builder group="conditionsFilter.group" fields="fields.conditions" operators="$automations.operators" properties="properties[automation.channel]"></query-builder>\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 }}</a> </span>\n                                                   </div>\n                                                </div>\n                                                <div class="portlet-body">\n                                                    <query-builder group="actionsFilter.group" fields="fields.actions" properties="properties[automation.channel]"></query-builder>\n                                               </div>\n                                        </div>\n\n                                              <input class="btn green-haze" type="button" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-click="updateAutomation()"/>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/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="/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                                     <!-- <pre>\n                                            {{item | json}}\n                                       </pre>\n                                        <pre>\n                                         {{conditionsData.query | json}}\n                                       </pre>\n                                        <pre>\n                                         {{actionsData.query | json}}\n                                  </pre> -->\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 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                                                    <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            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(conditionsData.query.length && actionsData.query.length)">\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group"  >\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                                                          </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_CONDITIONS\' | translate }}</a> </span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="conditionsFilter.group" fields="fields.conditions" operators="$automations.operators" properties="properties[item.channel]"></query-builder>\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="actionsFilter.group" fields="fields.actions" properties="properties[item.channel]"></query-builder>\n                                                     </div>\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="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\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/chat/preview/preview.html",'<style>\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\n  div.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\n  div.xc_chat_head.rounded\n  {\n       border-radius: 20px 20px 0px 0px !important;\n  }\n\n  div.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/icon_visitorchat.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\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\n  a.xc_btn_exit_chat_confirm:hover\n  {\n   color:red;\n  }\n\n  a.xc_btn_exit_chat_cancel:hover\n  {\n     color:#0c0;\n  }\n\n  form.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  {\n        height:100px;\n  }\n\n  .xc_form_signup,.xc_form_enquiry\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 no-repeat;\n  }\n\n  .xc_submission_confirmed\n  {\n         background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_tick.png) left center no-repeat;\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\n  i.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      <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            <!--<i class="xc_btn_notifications_close">&times;</i>-->\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 ng-bind-html=\'chatWebsite.offline_message\'></p>\n                <input maxlength="45" type="text" name="data[Enquiry][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_enquiry_fullname" />\n                <input maxlength="85" type="text" name="data[Enquiry][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_enquiry_email" />\n                <textarea maxlength="1500" placeholder="{{chatWebsite.enquiry_message_placeholder}}" name="data[Enquiry][message]" class="xc_input_enquiry_message"></textarea>\n                <a href="#" class="xc_btn_enquiry xc_btn_style">{{chatWebsite.enquiry_button}}</a></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 ng-bind-html=\'chatWebsite.online_message\'></p>\n                <input maxlength="45" type="text" name="data[Discussion][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_fullname" />\n                <input maxlength="85" type="text" name="data[Discussion][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_email" />\n                <input type="hidden" class="xc_input_visitor_time" name="data[Discussion][visitor_time]" /><a href="#" class="xc_btn_signup xc_btn_style">{{chatWebsite.start_chat_button}}</a></form>\n        </div>\n        <!-- <div class="xc_conversation">\n            <div class="xc_conversation_container">\n                <p class="xc_message_intro" data-id="-10">{FirstMessageText}</p>\n            </div>\n            <div class="xc_composing_container"></div>\n            <form class="xc_form_reply" accept-charset="UTF-8">\n                <div class="xc_exit_chat_container"><a href="#" class="xc_btn_exit_chat">{ExitChatButtonText}</a>\n                    <div class="xc_exit_chat_confirmation_wrapper" style="display: none;"><span>{ExitChatQuestionText} </span><a href="#" class="xc_btn_exit_chat_confirm">{ExitChatButtonConfirmText}</a><span> | </span><a href="#" class="xc_btn_exit_chat_cancel">{ExitChatButtonCancelText}</a></div>\n                </div>\n                <textarea maxlength="750" placeholder="{MessagePlaceholderText}" name="data[Message][message]" class="xc_input_message"></textarea><a href="#" class="xc_btn_send xc_btn_style">{MessageSendButtonText}</a></form>\n        </div> -->\n        <div class="xc_footer">\n            <div class="xc_powered"><a>Powered by Xenialab | Trademark xCALLY</a></div>\n        </div>\n    </div>\n</div>\n'),a.put("app/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="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-layers"></i>\n                                           <a href="/chat/queues/list">{{ \'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">\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_QUEUE\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="chatQueues.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <!-- <li>\n                                                             <a href="#" data-ng-click="open()">\n                                                           <i class="icon-user"></i> {{ \'APPLICATION_QUICK\' | translate }} </a>\n                                                        </li> -->\n                                                     <li>\n                                                          <a href="/chat/queues/wizard">\n                                                                <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                                 <!-- <li>\n                                                             <a href="#">\n                                                          <i class="icon-users"></i> {{ \'APPLICATION_BULK\' | translate }} </a>\n                                                        </li> -->\n                                             </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getChatQueues([\'name\', \'description\', \'timeout\', \'strategy\'])" csv-header="[\'Username\', \'Description\', \'Timeout\', \'Strategy\']" field-separator=";" filename="chat_queues.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="displayedChatQueues" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.chatQueuesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                            <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="chatQueueByPage in chatQueuesByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="chatQueueByPage.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(queue, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="strategy">{{ \'APPLICATION_STRATEGY\' | translate }}</th>\n                                                                <th st-sort="timeout">{{ \'APPLICATION_AGENT_TIMEOUT\' | translate }}</th>\n                                                            <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="chatQueue in displayedChatQueues" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="chatQueues.checked" checklist-value="chatQueue.id"></td>\n                                             <td>{{chatQueue.name}}</td>\n                                                             <td>{{chatQueue.description}}</td>\n                                                            <td>{{chatQueue.strategy | uppercase}}</td>\n                                                           <td>{{chatQueue.timeout}}</td>\n                                              <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/chat/queues/view/{{chatQueue.id}}/settings">\n                                                                         {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(chatQueue.name,chatQueue.id)">\n                                                                             {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedChatQueues.length">\n                                                                <td colspan="6" style="text-align:center;">\n                                                                   <i>No chat queues 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="strategy" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_STRATEGY\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\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="conf.chatQueuesByPage.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/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" style="width: 50%; margin: 0 auto;">\n                                <!-- BEGIN FORM-->\n                            <form action="index.html" class="form-horizontal form-row-seperated">\n                                 <div class="form-body text-center">\n                                           <div class="form-group last">\n                                                 <div class="col-md-9" 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/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-layers"></i>\n                                   <a href="/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 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.chat.queues.view.settings\')}">\n                                                  <a data-ng-href="/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.chat.queues.view.agents\')}">\n                                                    <a data-ng-href="/chat/queues/view/{{queue.id}}/agents">\n                                                      <i class="icon-users"></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/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" 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 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">{{\'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 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                                         <!-- <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="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 [\'rrmemory\',\'beepall\'] | 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 HEADER SHAPE -->\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/chat/queue/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-envelope"></i>\n                         <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n        <i class="fa fa-angle-right"></i>\n                     </li>\n      <li>\n                             <i class="icon-layers"></i>\n                           <a href="/chat/queues/list">{{ \'APPLICATION_QUEUES\' | 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-layers font-green-sharp"></i>\n                          <span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }} WIZARD</a> </span>\n             </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                                        <form name="forms.general" data-ng-submit="forms.general.$valid && createItem()" 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.$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 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 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_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/>\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            </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}}<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 [\'rrmemory\',\'beepall\'] | 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="(forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid && 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 HEADER SHAPE -->\n                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CREATE\' | translate}}"/>\n                                  </form>\n                         </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\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/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          <table st-table="displayedAgents" st-safe-src="agents" class="table table-striped table-bordered table-hover">\n                        <div class="table-responsive">\n                          <thead>\n                                     <tr>\n                                          <th colspan="12">\n                                                     <div class="row">\n                                                             <div class="col-md-6">\n                                                                        <ui-select class="input-xsmall" ng-model="conf.agentsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                             <ui-select-choices repeat="agentByPage in agentsByPage | filter: $select.search">\n                                                                                     <div ng-bind-html="agentByPage.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></th>\n                                             <th st-sort="uniqueid" reverse class="input-small">{{ \'APPLICATION_UNIQUEID\' | translate }}</th>\n                                <th st-sort="queue" class="input-medium">{{ \'APPLICATION_QUEUE\' | translate }}</th>\n                                 <th st-sort="membername" class="input-medium">{{ \'APPLICATION_AGENT\' | translate }}</th>\n                                                <th st-sort="from" class="input-small">{{ \'APPLICATION_VISITOR\' | translate }}</th>\n                                         <th st-sort="accountname" class="input-small">{{ \'APPLICATION_WEB_SITE\' | translate }}</th>\n                                         <th st-sort="agentcalledAt" st-sort-default="reverse">{{ \'APPLICATION_CALLED_AT\' | translate }}</th>\n                                                <th st-sort="agentconnectAt">{{ \'APPLICATION_CONNECTED_AT\' | translate }}</th>\n                                              <th st-sort="agentringnoanswerAt">{{ \'APPLICATION_UNASWER_AT\' | translate }}</th>\n                                           <th st-sort="reason">{{ \'APPLICATION_REASON\' | translate }}</th>\n                              </tr>\n                         </thead>\n                      <tbody>\n                         <tr data-ng-repeat="agent in displayedAgents">\n                                            <td>\n                                                  <span>\n                                                                <i data-ng-class="{\'icon-user font-yellow\': agent.lastevent === \'called\',\n                                                         \'icon-user-following font-green\': agent.lastevent === \'agent\',\n                                                            \'icon-user-unfollow font-red\': agent.lastevent === \'timeout\',\n                                                             \'icon-user-unfollow font-blue\': agent.lastevent === \'answered_elsewhere\'}"></i>\n                                                   </span>\n                                               </td>\n                                         <td>{{agent.uniqueid}}</td>\n                                           <td>{{agent.chatqueuename}}</td>\n                                              <td>{{agent.fullname}}</td>\n                                           <td>{{agent.visitorname}} {{agent.visitoremail}}</td>\n                                         <td>{{agent.websitename}}</td>\n                                                <td>\n                                                  <time is="relative-time" datetime="{{agent.agentcalledAt}}">\n                                                          April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{agent.agentconnectedAt}}" data-ng-show="agent.agentconnectedAt">\n                                                         April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{agent.agentringnoanswerAt}}" data-ng-show="agent.agentringnoanswerAt">\n                                                           April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  {{agent.reason | uppercase}}\n                                          </td>\n                     </tr>\n                                     <tr data-ng-hide="displayedAgents.length">\n                                            <td colspan="11" style="text-align:center;">\n                                                  <i>No agents 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="uniqueid" data-ng-model="filters.uniqueid" placeholder="{{ \'APPLICATION_UNIQUEID\' | 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="queue" placeholder="{{ \'APPLICATION_QUEUE\' | 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="membername" placeholder="{{ \'APPLICATION_AGENT\' | 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="from" placeholder="{{ \'APPLICATION_VISITOR\' | 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="accountname" placeholder="{{ \'APPLICATION_WEB_SITE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                       </div>\n                                    </td>\n                                             <td colspan="7"></td>\n                           </tr>\n                           <tr>\n                            <td colspan="12" class="text-center">\n                                                   <div class="pagination" st-pagination st-items-by-page="conf.agentsByPage.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 PAGE CONTENT-->\n'),a.put("app/chat/realtime/view/session/session.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initChats()">\n    <div class="col-md-12">\n               <!-- START TABLE -->\n          <table st-table="displayedChats" st-safe-src="sessions" class="table table-striped table-bordered table-hover">\n                       <div class="table-responsive">\n                          <thead>\n                                     <tr>\n                                          <th colspan="12">\n                                                     <div class="row">\n                                                             <div class="col-md-6">\n                                                                        <ui-select class="input-xsmall" ng-model="conf.sessionsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                             <ui-select-choices repeat="sessionByPage in sessionsByPage | filter: $select.search">\n                                                                                 <div ng-bind-html="sessionByPage.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></th>\n                                             <th st-sort="uniqueid" reverse class="input-small">{{ \'APPLICATION_UNIQUEID\' | translate }}</th>\n                                <th st-sort="queue" class="input-medium">{{ \'APPLICATION_QUEUE\' | translate }}</th>\n                                 <th st-sort="membername" class="input-medium">{{ \'APPLICATION_AGENT\' | translate }}</th>\n                                                <th st-sort="visitorname" class="input-medium">{{ \'APPLICATION_VISITOR\' | translate }}</th>\n                                         <th st-sort="websitename" class="input-small">{{ \'APPLICATION_WEB_SITE\' | translate }}</th>\n                                         <th st-sort="sessioncalledAt" st-sort-default="reverse">{{ \'APPLICATION_JOIN_AT\' | translate }}</th>\n                                                <th st-sort="sessionconnectAt">{{ \'APPLICATION_LEAVE_AT\' | translate }}</th>\n                                                <th st-sort="sessionringnoanswerAt">{{ \'APPLICATION_UNMANAGED_AT\' | translate }}</th>\n                                 </tr>\n                         </thead>\n                      <tbody>\n                         <tr data-ng-repeat="session in displayedChats">\n                                           <td>\n                                                  <span>\n                                                                <i data-ng-class="{\'icon-user font-yellow\': session.mailjoinAt && !session.mailleaveAt,\n                                                             \'icon-user-following font-green\': session.fullname,\n                                                         \'icon-user-unfollow font-red\': session.mailunmanagedAt}"></i>\n                                                       </span>\n                                               </td>\n                                         <td>{{session.uniqueid}}</td>\n                                         <td>{{session.chatqueuename}}</td>\n                                            <td>{{session.fullname}}</td>\n                                         <td>{{session.visitorname + \' [\' + session.visitoremail + \']\'}}</td>\n                                              <td>{{session.websitename}}</td>\n                                              <td>\n                                                  <time is="relative-time" datetime="{{session.chatjoinAt}}">\n                                                           April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{session.chatleaveAt}}" data-ng-show="session.chatleaveAt">\n                                                               April 1, 2014\n                                                 </time>\n                                               </td>\n                                         <td>\n                                                  <time is="relative-time" datetime="{{session.chatunmanagedAt}}" data-ng-show="session.chatunmanagedAt">\n                                                               April 1, 2014\n                                                 </time>\n                                               </td>\n                     </tr>\n                                     <tr data-ng-hide="displayedChats.length">\n                                             <td colspan="11" style="text-align:center;">\n                                                  <i>No sessions 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="uniqueid" data-ng-model="filters.uniqueid" placeholder="{{ \'APPLICATION_UNIQUEID\' | 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="queue" placeholder="{{ \'APPLICATION_QUEUE\' | 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="membername" placeholder="{{ \'APPLICATION_AGENT\' | 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="visitorname" placeholder="{{ \'APPLICATION_VISITOR\' | 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="websitename" placeholder="{{ \'APPLICATION_WEB_SITE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                       </div>\n                                    </td>\n                                             <td colspan="7"></td>\n                           </tr>\n                           <tr>\n                            <td colspan="12" class="text-center">\n                                                   <div class="pagination" st-pagination st-items-by-page="conf.sessionsByPage.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 PAGE CONTENT-->\n'),a.put("app/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="icon-energy"></i>\n                                   <a href="/chat/realtime/list">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <div>\n             <nav class="navbar navbar-default" role="navigation">\n                     <div class="navbar-header">\n                       <button type="button" class="navbar-toggle" ng-init="navCollapsed = true" 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                     <!-- <a class="navbar-brand" ui-sref="home">Brand</a> -->\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 dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_AGENTS\' | translate }}\n                                      <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'agents\'></tree>\n                             </li>\n                                                                         <li dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_SESSIONS\' | translate }}\n                                    <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'sessions\'></tree>\n                           </li>\n                     </ul>\n                         <!-- <ul class="nav navbar-nav">\n                          <li dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_QUEUES\' | translate }}\n                                      <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'queues\'></tree>\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/chat/statistic/statistic.conversation.html",'<!-- BEGIN PAGE CONTENT-->\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_CONVERSATIONS\' | translate }}</a> </span>\n                     </div>\n                        <div class="actions">\n                         <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedChatRooms" filename="rooms.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="displayedChatRooms" st-safe-src="chatRooms" class="table table-bordered table-hover">\n                                <div class="table-responsive">\n                                        <thead>\n                                               <tr>\n                                                  <th colspan="9">\n                                                              <div class="row">\n                                                                     <div class="col-md-6">\n                                                                                <select class="form-control input-small select2me" data-ng-model="conf.chatRoomsByPage">\n                                                                                      <option value="10">10</option>\n                                                                                        <option value="25">25</option>\n                                                                                        <option value="50">50</option>\n                                                                                        <option value="{{chatRooms.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="type">{{ \'APPLICATION_TYPE\' | translate }}</th>\n                                                        <th st-sort="users">{{ \'APPLICATION_USERS\' | translate }}</th>\n                                                      <th st-sort="visitor">{{ \'APPLICATION_VISITOR\' | translate }}</th>\n                                                  <th st-sort="status">{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                    <th st-sort="createdAt">{{ \'APPLICATION_TIME\' | translate }}</th>\n                                           </tr>\n                                 </thead>\n                                      <tbody>\n                                               <tr data-ng-repeat="chatRoom in displayedChatRooms" data-ng-click="$location.path(\'/chat/statistics/conversation/\' + chatRoom.id)">\n                                                 <td style="text-align: center;">{{chatRoom.type | uppercase}}</td>\n                                                    <td style="text-align: center;">{{getUsersFullname(chatRoom.Users)}}</td>\n                                                     <td style="text-align: center;">{{chatRoom.ChatVisitor.email}}</td>\n                                                   <td style="text-align: center;">\n                                                              <span class="label label-sm label-success" data-ng-class="{\'label-success\': chatRoom.status == \'close\', \'label-warning\': chatRoom.status == \'open\'}">\n                                                                 {{chatRoom.status | capitalize}}\n                                                              </span>\n                                                       </td>\n                                                 <td style="text-align: center;">\n                                                              <time is="relative-time" datetime="{{chatRoom.createdAt}}">\n                                                                   April 1, 2014\n                                                         </time>\n                                                       </td>\n                                         </tr>\n                                 </tbody>\n                                      <tfoot>\n                                               <tr>\n                                                  <td colspan="9" class="text-center">\n                                                          <div st-pagination class="pagination" st-items-by-page="conf.chatRoomsByPage" 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<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.conversation.view.html",'<!-- BEGIN PAGE CONTENT-->\n<div data-ng-init="initRoomView()">\n        <div class="col-md-6">\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-book-open font-green-sharp"></i>\n                                       <span class="caption-subject">{{ \'APPLICATION_TRANSCRIPT\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default" href="#" ng-csv="chatRoom.ChatMessages" filename="chatMessages.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                            <div class="scroller" style="height: 352px;" data-always-visible="1" data-rail-visible1="1">\n                                  <ul class="chats">\n                                            <li data-ng-class="{\'out\': chatMessage.visitorId, \'in\': chatMessage.userId}" data-ng-repeat="chatMessage in chatRoom.ChatMessages | orderBy:\'-createdAt\'">\n                                                      <img class="avatar" data-ng-src="api/users/{{chatMessage.userId ? chatMessage.userId : \'avatar\'}}/avatar"/>\n                                                 <div class="message">\n                                                         <span class="arrow">\n                                                          </span>\n                                                               <a href="#" class="name">\n                                                             {{chatMessage.fullname}} </a>\n                                                         <span class="datetime">\n                                                                       <time is="relative-time" datetime="{{chatMessage.createdAt}}">\n                                                                                April 1, 2014\n                                                                 </time>\n                                                               </span>\n                                                               <span class="body">\n                                                                   {{chatMessage.body}}\n                                                          </span>\n                                                       </div>\n                                                </li>\n                                 </ul>\n                         </div>\n                        </div>\n                <!-- END PORTLET-->\n           </div>\n        </div>\n        <div class="col-md-6">\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-user font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VISITOR\' | translate }}:</a> </span>\n                                  <span class="caption-helper">{{chatRoom.ChatVisitor.fullname}}</span>\n                         </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.fullname">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-8 value">\n                                          {{chatRoom.ChatVisitor.fullname}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.email">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_EMAIL\' | translate}}\n                                 </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.email}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.remote_address">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.remote_address}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.referer">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_REFERER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.referer}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.browser">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_BROWSER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.browser}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.engine">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_ENGINE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.engine}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.os">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_OS\' | translate}}\n                                    </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.os}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.device">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_DEVICE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.device}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.country">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_COUNTRY\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.country}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.region">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_REGION\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.region}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.city">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_CITY\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.city}}\n                                 </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.latitude">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_LATITUDE\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.latitude}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.longitude">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_LONGITUDE\' | translate}}\n                                     </div>\n                                        <div class="col-md-4 value">\n                                          {{chatRoom.ChatVisitor.longitude}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatRoom.ChatVisitor.createdAt">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_ARRIVAL_TIME\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          <time is="relative-time" datetime="{{chatRoom.ChatVisitor.createdAt}}">\n                                                       April 1, 2014\n                                         </time>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n           <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-repeat="user in chatRoom.Users">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-earphones-alt font-green-sharp"></i>\n                                   <span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }}:</a> </span>\n                                    <span class="caption-helper">{{user.fullname}}</span>\n                         </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{user.fullname}}\n                                     </div>\n                                </div>\n                                <div class="row static-info">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_USERNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{user.name}}\n                                 </div>\n                                </div>\n                                <div class="row static-info">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_ROLE\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{user.role | uppercase}}\n                                     </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/chat/statistic/statistic.enquiry.html",'<!-- BEGIN PAGE CONTENT-->\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-question font-green-sharp"></i>\n                                <span class="caption-subject">{{ \'APPLICATION_ENQUIRIES\' | translate }}</a> </span>\n                 </div>\n                        <div class="actions">\n                         <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedChatEnquiries" filename="enquiries.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="displayedChatEnquiries" st-safe-src="chatEnquiries" class="table table-bordered table-hover">\n                                <div class="table-responsive">\n                                        <thead>\n                                               <tr>\n                                                  <th colspan="9">\n                                                              <div class="row">\n                                                                     <div class="col-md-6">\n                                                                                <select class="form-control input-small select2me" data-ng-model="conf.chatEnquiriesByPage">\n                                                                                  <option value="10">10</option>\n                                                                                        <option value="25">25</option>\n                                                                                        <option value="50">50</option>\n                                                                                        <option value="{{chatEnquiries.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="type">{{ \'APPLICATION_USERNAME\' | translate }}</th>\n                                                    <th st-sort="users">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                      <th st-sort="createdAt">{{ \'APPLICATION_TIME\' | translate }}</th>\n                                           </tr>\n                                 </thead>\n                                      <tbody>\n                                               <tr data-ng-repeat="chatEnquiry in displayedChatEnquiries" data-ng-click="$location.path(\'/chat/statistics/enquiry/\' + chatEnquiry.id)">\n                                                    <td style="text-align: center;">{{chatEnquiry.username}}</td>\n                                                 <td style="text-align: center;">{{chatEnquiry.email}}</td>\n                                                    <td style="text-align: center;">\n                                                              <time is="relative-time" datetime="{{chatEnquiry.createdAt}}">\n                                                                        April 1, 2014\n                                                         </time>\n                                                       </td>\n                                         </tr>\n                                 </tbody>\n                                      <tfoot>\n                                               <tr>\n                                                  <td colspan="9" class="text-center">\n                                                          <div st-pagination class="pagination" st-items-by-page="conf.chatEnquiriesByPage" 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<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.enquiry.view.html",'<!-- BEGIN PAGE CONTENT-->\n<div data-ng-init="initEnquiryView()">\n  <div class="col-md-6">\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_TEXT\' | translate }}</a> </span>\n                              </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default" href="#" ng-csv="chatEnquiry" filename="chatEnquery.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                            <!-- BEGIN PAGE CONTENT-->\n                            <div class="note note-warning">\n                                       <h4 class="block">{{chatEnquiry.ChatVisitor.fullname}} -\n                                              <time is="relative-time" datetime="{{chatEnquiry.createdAt}}">\n                                                        April 1, 2014\n                                         </time>\n                                       </h4>\n                                 <p>\n                                            {{chatEnquiry.text}}\n                                 </p>\n                          </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n        <div class="col-md-6">\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-user font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VISITOR\' | translate }}:</a> </span>\n                                  <span class="caption-helper">{{chatEnquiry.ChatVisitor.fullname}}</span>\n                              </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.fullname">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-8 value">\n                                          {{chatEnquiry.ChatVisitor.fullname}}\n                                  </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.email">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_EMAIL\' | translate}}\n                                 </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.email}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.remote_address">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.remote_address}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.referer">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_REFERER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.referer}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.browser">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_BROWSER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.browser}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.engine">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_ENGINE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.engine}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.os">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_OS\' | translate}}\n                                    </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.os}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.device">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_DEVICE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.device}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.country">\n                                  <div class="col-md-4 name">\n                                           {{\'APPLICATION_COUNTRY\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.country}}\n                                   </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.region">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_REGION\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.region}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.city">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_CITY\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.city}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.latitude">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_LATITUDE\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.latitude}}\n                                  </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.longitude">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_LONGITUDE\' | translate}}\n                                     </div>\n                                        <div class="col-md-4 value">\n                                          {{chatEnquiry.ChatVisitor.longitude}}\n                                 </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatEnquiry.ChatVisitor.createdAt">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_ARRIVAL_TIME\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          <time is="relative-time" datetime="{{chatEnquiry.ChatVisitor.createdAt}}">\n                                                    April 1, 2014\n                                         </time>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initList()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-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-eyeglass"></i>\n                                 <a href="/chat/statistics">{{ \'APPLICATION_STATISTICS\' | 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/statistics.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 BUTTONS -->\n                              <!-- <div class="profile-userbuttons">\n                                        <button type="button" class="btn btn-circle green-haze btn-sm">Follow</button>\n                                        <button type="button" class="btn btn-circle btn-danger btn-sm">Message</button>\n                               </div> -->\n                            <!-- END SIDEBAR BUTTONS -->\n                          <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.chat.statistics.summary\')}">\n                                                    <a ng-href="/chat/statistics/summary">\n                                                        <i class="icon-list"></i>\n                                                     {{ \'APPLICATION_SUMMARY\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.chat.statistics.enquiry\') || $state.is(\'main.chat.statistics.enquiries\')}">\n                                                   <a ng-href="/chat/statistics/enquiries">\n                                                      <i class="icon-question"></i>\n                                                 {{ \'APPLICATION_ENQUIRIES\' | translate }} </a>\n                                              </li>\n                                         <li data-ng-class="{active: $state.is(\'main.chat.statistics.conversation\') || $state.is(\'main.chat.statistics.conversations\')}">\n                                                  <a ng-href="/chat/statistics/conversations">\n                                                  <i class="icon-notebook"></i>\n                                                 {{ \'APPLICATION_CONVERSATIONS\' | translate }} </a>\n                                          </li>\n                                         <li data-ng-class="{active: $state.is(\'main.chat.statistics.visitor\') || $state.is(\'main.chat.statistics.visitors\')}">\n                                                    <a ng-href="/chat/statistics/visitors">\n                                                       <i class="icon-users"></i>\n                                                    {{ \'APPLICATION_VISITORS\' | 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/chat/statistic/statistic.summary.html",'<div class="col-md-12">\n       <!-- BEGIN Portlet PORTLET-->\n <div class="portlet light bordered" data-ng-show="online">\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_LOCATIONS\' | translate }}</a> </span>\n                 </div>\n                </div>\n                <div class="portlet-body">\n                    <map center="0, 0" zoom="2">\n                          <marker data-ng-show="chatVisitor.latitude && chatVisitor.longitude" data-ng-repeat="chatVisitor in chatVisitors" position="{{chatVisitor.latitude}}, {{chatVisitor.longitude}}" title="{{chatVisitor.fullname}}"></marker>\n                   </map>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\n\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-notebook font-green-sharp"></i>\n                                <span class="caption-subject">{{ \'APPLICATION_CONVERSATIONS\' | translate }}</a> </span>\n                     </div>\n                </div>\n                <div class="portlet-body">\n                    <div class="row">\n                             <div class="col-md-6">\n                                        <div class="portlet sale-summary">\n                                            <div class="portlet-body">\n                                                    <ul class="list-unstyled">\n                                                            <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_OPENED\' | translate }} <i class="fa fa-img-up"></i>\n                                                                 </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatRooms | filter:{ status:\'open\' }).length }} </span>\n                                                         </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_CLOSED\' | translate }} <i class="fa fa-img-down"></i>\n                                                                       </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatRooms | filter:{ status:\'close\' }).length }} </span>\n                                                                </li>\n                                                 </ul>\n                                         </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <canvas class="chart chart-pie" data="[(chatRooms | filter:{ status:\'open\' }).length, (chatRooms | filter:{ status:\'close\' }).length]" labels="[$translate.instant(\'APPLICATION_OPENED\'), $translate.instant(\'APPLICATION_CLOSED\')]" legend="true"></canvas>\n                          </div>\n                        </div>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\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-users font-green-sharp"></i>\n                           <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                  </div>\n                </div>\n                <div class="portlet-body">\n                    <div class="row">\n                             <div class="col-md-6">\n                                        <div class="portlet sale-summary">\n                                            <div class="portlet-body">\n                                                    <ul class="list-unstyled">\n                                                            <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_PENDING\' | translate }} <i class="fa fa-img-up"></i>\n                                                                        </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatVisitors | filter:{ status:\'pending\' }).length }} </span>\n                                                           </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_SERVED\' | translate }} <i class="fa fa-img-down"></i>\n                                                                       </span>\n                                                                       <span class="sale-num">\n                                                                       {{ (chatVisitors | filter:{ status:\'served\' }:true).length }} </span>\n                                                               </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_UNSERVED\' | translate }} </span>\n                                                                    <span class="sale-num">\n                                                                       {{ (chatVisitors | filter:{ status:\'unserved\' }).length }} </span>\n                                                          </li>\n                                                 </ul>\n                                         </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <canvas class="chart chart-pie" data="[(chatVisitors | filter:{ status:\'pending\' }).length, (chatVisitors | filter:{ status:\'served\' }:true).length, (chatVisitors | filter:{ status:\'unserved\' }).length]" labels="[$translate.instant(\'APPLICATION_PENDING\'), $translate.instant(\'APPLICATION_SERVED\'), $translate.instant(\'APPLICATION_UNSERVED\')]" legend="true"></canvas>\n                            </div>\n                        </div>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\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-question font-green-sharp"></i>\n                                <span class="caption-subject">{{ \'APPLICATION_ENQUIRIES\' | translate }}</a> </span>\n                 </div>\n                </div>\n                <div class="portlet-body">\n                    <div class="row">\n                             <div class="col-md-6">\n                                        <div class="portlet sale-summary">\n                                            <div class="portlet-body">\n                                                    <ul class="list-unstyled">\n                                                            <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_READ\' | translate }}<i class="fa fa-img-up"></i>\n                                                                    </span>\n                                                                       <span class="sale-num">\n                                                                       {{(chatEnquiries | filter:{ read:true }).length}} </span>\n                                                             </li>\n                                                         <li>\n                                                                  <span class="sale-info">\n                                                                      {{ \'APPLICATION_UNREAD\' | translate }}<i class="fa fa-img-down"></i>\n                                                                        </span>\n                                                                       <span class="sale-num">\n                                                                       {{(chatEnquiries | filter:{ read:false }).length}} </span>\n                                                            </li>\n                                                 </ul>\n                                         </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <canvas class="chart chart-pie" data="[(chatEnquiries | filter:{ read:true }).length, (chatEnquiries | filter:{ read:false }).length]" labels="[$translate.instant(\'APPLICATION_READ\'), $translate.instant(\'APPLICATION_UNREAD\')]" legend="true" ng-show="true"></canvas>\n                         </div>\n                        </div>\n                </div>\n        </div>\n        <!-- END Portlet PORTLET-->\n</div>\n'),a.put("app/chat/statistic/statistic.visitor.html",'<!-- BEGIN PAGE CONTENT-->\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-users font-green-sharp"></i>\n                           <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                  </div>\n                        <div class="actions">\n                         <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedChatVisitors" filename="visitors.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="displayedChatVisitors" st-safe-src="chatVisitors" class="table table-bordered table-hover">\n                          <div class="table-responsive">\n                                        <thead>\n                                               <tr>\n                                                  <th colspan="9">\n                                                              <div class="row">\n                                                                     <div class="col-md-6">\n                                                                                <select class="form-control input-small select2me" data-ng-model="conf.chatVisitorsByPage">\n                                                                                   <option value="10">10</option>\n                                                                                        <option value="25">25</option>\n                                                                                        <option value="50">50</option>\n                                                                                        <option value="{{chatVisitors.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="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                        <th st-sort="email">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                      <th st-sort="remote_address">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                    <th st-sort="referer">{{ \'APPLICATION_ORIGIN\' | translate }}</th>\n                                                   <th st-sort="device">{{ \'APPLICATION_DEVICE\' | translate }}</th>\n                                                    <th st-sort="browser">{{ \'APPLICATION_BROWSER\' | translate }}</th>\n                                                  <th st-sort="visitor_language">{{ \'APPLICATION_LANGUAGES\' | translate }}</th>\n                                                       <th st-sort="status">{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                    <th st-sort="createdAt">{{ \'APPLICATION_TIME\' | translate }}</th>\n                                           </tr>\n                                 </thead>\n                                      <tbody>\n                                               <tr data-ng-repeat="chatVisitor in displayedChatVisitors" data-ng-click="$location.path(\'/chat/statistics/visitor/\' + chatVisitor.id)">\n                                                     <td>{{chatVisitor.fullname}}</td>\n                                                     <td>{{chatVisitor.email}}</td>\n                                                        <td>{{chatVisitor.remote_address}}</td>\n                                                       <td>{{chatVisitor.referer}}</td>\n                                                      <td class="centered-td">{{chatVisitor.device ? chatVisitor.device : \'--\'}}</td>\n                                                     <td class="centered-td">\n                                                              <img data-ng-show="chatVisitor.browser.includes(\'Chrome\')" data-ng-src="assets/images/browsers/chrome/chrome_16x16.png" data-title="{{chatVisitor.browser}}" bs-tooltip>\n                                                            <img data-ng-show="chatVisitor.browser.includes(\'Safari\')" data-ng-src="assets/images/browsers/safari/safari_16x16.png">\n                                                            <img data-ng-show="chatVisitor.browser.includes(\'Firefox\')" data-ng-src="assets/images/browsers/firefox/firefox_16x16.png">\n                                                         <img data-ng-show="chatVisitor.browser.includes(\'Explorer\')" data-ng-src="assets/images/browsers/internet-explorer/internet-explorer_16x16.png">\n                                                    </td>\n                                                 <td class="centered-td">\n                                                              <img data-ng-show="chatVisitor.visitor_language.includes(\'IT\') || chatVisitor.visitor_language.includes(\'it\')" data-ng-src="assets/images/flags/it.png">\n                                                          <img data-ng-show="chatVisitor.visitor_language.includes(\'US\') || chatVisitor.visitor_language.includes(\'us\')" data-ng-src="assets/images/flags/us.png">\n                                                          <img data-ng-show="chatVisitor.visitor_language.includes(\'EN\') || chatVisitor.visitor_language.includes(\'en\')" data-ng-src="assets/images/flags/en_EN.png">\n                                                       </td>\n                                                 <td class="centered-td">\n                                                              <span class="label label-sm label-success" data-ng-class="{\'label-warning\': chatVisitor.status == \'pending\', \'label-danger\': chatVisitor.status == \'unserved\'}">\n                                                                      {{ $translate.instant(\'APPLICATION_\' + $filter(\'uppercase\')(chatVisitor.status)) }}\n                                                               </span>\n                                                       </td>\n                                                 <td style="text-align: center;">\n                                                              <time is="relative-time" datetime="{{chatVisitor.createdAt}}">\n                                                                        April 1, 2014\n                                                         </time>\n                                                       </td>\n                                         </tr>\n                                 </tbody>\n                                      <tfoot>\n                                               <tr>\n                                                  <td colspan="9" class="text-center">\n                                                          <div st-pagination class="pagination" st-items-by-page="conf.chatVisitorsByPage" 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<!-- END PAGE CONTENT-->\n'),a.put("app/chat/statistic/statistic.visitor.view.html",'<!-- BEGIN PAGE CONTENT-->\n<div data-ng-init="initVisitorView()">\n  <div class="col-md-6">\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-pin font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_LOCATION\' | translate }}</a> </span>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- BEGIN PAGE CONTENT-->\n                            <map center="{{chatVisitor.latitude}}, {{chatVisitor.longitude}}" zoom="8">\n                                   <marker position="{{chatVisitor.latitude}}, {{chatVisitor.longitude}}" title="{{chatVisitor.fullname}}"></marker>\n                             </map>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n        <div class="col-md-6">\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-user font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VISITOR\' | translate }}:</a> </span>\n                                  <span class="caption-helper">{{chatVisitor.fullname}}</span>\n                          </div>\n                                <div class="actions">\n                                 <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <div class="row static-info" data-ng-show="chatVisitor.longitude && chatVisitor.latitude">\n                            </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.fullname">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_FULLNAME\' | translate}}\n                                      </div>\n                                        <div class="col-md-8 value">\n                                          {{chatVisitor.fullname}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.email">\n                                        <div class="col-md-4 name">\n                                           {{\'APPLICATION_EMAIL\' | translate}}\n                                 </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.email}}\n                                 </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.remote_address">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.remote_address}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.referer">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_REFERER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.referer}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.browser">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_BROWSER\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.browser}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.engine">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_ENGINE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.engine}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.os">\n                                   <div class="col-md-4 name">\n                                           {{\'APPLICATION_OS\' | translate}}\n                                    </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.os}}\n                                    </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.device">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_DEVICE\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.device}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.country">\n                                      <div class="col-md-4 name">\n                                           {{\'APPLICATION_COUNTRY\' | translate}}\n                                       </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.country}}\n                                       </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.region">\n                                       <div class="col-md-4 name">\n                                           {{\'APPLICATION_REGION\' | translate}}\n                                        </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.region}}\n                                        </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.city">\n                                 <div class="col-md-4 name">\n                                           {{\'APPLICATION_CITY\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.city}}\n                                  </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.latitude">\n                                     <div class="col-md-4 name">\n                                           {{\'APPLICATION_LATITUDE\' | translate}}\n                                      </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.latitude}}\n                                      </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.longitude">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_LONGITUDE\' | translate}}\n                                     </div>\n                                        <div class="col-md-4 value">\n                                          {{chatVisitor.longitude}}\n                                     </div>\n                                </div>\n                                <div class="row static-info" data-ng-show="chatVisitor.createdAt">\n                                    <div class="col-md-4 name">\n                                           {{\'APPLICATION_ARRIVAL_TIME\' | translate}}\n                                  </div>\n                                        <div class="col-md-4 value">\n                                          <time is="relative-time" datetime="{{chatVisitor.createdAt}}">\n                                                        April 1, 2014\n                                         </time>\n                                       </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/chat/timeline/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-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-list"></i>\n                                             <a href="/mail/timeline/list"> Timeline</a>\n                                   </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initList()">\n     <div class="col-md-12">\n    <h3 class="page-title">\n                          Timeline\n                      </h3>\n                 <!-- END PAGE HEADER-->\n                       <!-- BEGIN PAGE CONTENT-->\n                    <div class="timeline">\n                                <!-- TIMELINE ITEM -->\n                                <div class="timeline-item" data-ng-repeat="event in events | orderBy:\'-id\'"  ng-animate=" \'animate\' ">\n                                    <div class="timeline-badge">\n                                          <div class="timeline-icon">\n                                                   <i class="icon-envelope font-green-haze"></i>\n                                         </div>\n                                        </div>\n                                        <div class="timeline-body">\n                                           <div class="timeline-body-arrow"></div>\n                                               <div class="timeline-body-head">\n                                                      <div class="timeline-body-head-caption">\n                                                              <span class="timeline-body-alerttitle" data-ng-class="{\'font-red\': event.name == \'INCOMING\', \'font-blue\': event.name == \'ATTEMPT\', \'font-green\': event.name == \'TAKEN\'}">{{event.name | uppercase}}</span>\n                                                                <span class="timeline-body-time font-grey-cascade">at {{event.createdAt | date:\'yyyy-MM-dd HH:mm:ss\'}}</span>\n                                                       </div>\n                                                        <div class="timeline-body-head-actions">\n                                                              <div class="btn-group">\n                                                                       <a class="btn btn-circle btn-sm dropdown-toggle btn-success" href="/mail/inbox/room/{{event.MailRoomId}}">Go To Mail</a>\n                                                              </div>\n                                                        </div>\n                                                </div>\n                                                <div class="timeline-body-content">\n                                                   <span class="font-grey-cascade" data-ng-show="event.User">\n                                                    {{event.MailRoom.subject ? event.MailRoom.subject + \' - \' : \'\'}}<a href="/agents/view/{{event.UserId}}/account">{{event.User.fullname}}</a>\n                                                       </span>\n                                               </div>\n                                        </div>\n                                </div>\n                                <!-- END TIMELINE ITEM -->\n                    </div>\n                        <!-- END PAGE CONTENT-->\n      </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/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="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="/chat/websites/list">{{ \'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">\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="chatWebsites.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_WEB_SITE\' | translate }} <i class="fa fa-angle-down"></i>\n                                             </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <!-- <li>\n                                                             <a href="#" data-ng-click="open()">\n                                                           <i class="icon-user"></i> {{ \'APPLICATION_QUICK\' | translate }} </a>\n                                                        </li> -->\n                                                     <li>\n                                                          <a href="/chat/websites/wizard">\n                                                              <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                                 <!-- <li>\n                                                             <a href="#">\n                                                          <i class="icon-users"></i> {{ \'APPLICATION_BULK\' | translate }} </a>\n                                                        </li> -->\n                                             </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getChatWebsites([\'name\', \'address\', \'description\', \'remote\'])" csv-header="[\'Name\', \'Address\', \'Description\', \'Remote\']" field-separator=";" filename="chat_websites.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="displayedChatWebsites" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                    <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.chatWebsitesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="chatWebsiteByPage in chatWebsitesByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="chatWebsiteByPage.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(agent, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                              <th st-sort="address">{{ \'APPLICATION_WEB_ADDRESS\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="chatWebsite in displayedChatWebsites" class="animate-repeat">\n                                                         <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="chatWebsites.checked" checklist-value="chatWebsite.id"></td>\n                                         <td>{{chatWebsite.name}}</td>\n                                                           <td>{{chatWebsite.description}}</td>\n                                        <td><a ng-href="{{chatWebsite.address}}">{{chatWebsite.address}}</a></td>\n                                             <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/chat/websites/view/{{chatWebsite.id}}/snippet/view">\n                                                                         {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(chatWebsite.name,chatWebsite.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedChatWebsites.length">\n                                                              <td colspan="5" style="text-align:center;">\n                                                                   <i>{{\'MESSAGE_NO_AVAILABLE_WEBSITES\' | translate}}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="address" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_WEB_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.chatWebsitesByPage.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/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">\n                                               <a class="btn green-jungle " href="/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                          <table class="table table-striped table-bordered table-hover">\n                                          <thead>\n                                               <tr>\n                                                    <th class="input-small" align="center">{{\'APPLICATION_APPLICATION\' | translate}}</th>\n                                                           <th class="input-small" align="center">{{\'APPLICATION_TIMEOUT\' | translate}} [s]</th>\n                                                   <th align="center">{{ \'APPLICATION_INTERVAL\' | translate }}</th>\n                                                                <th class="input-small">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                  </tr>\n                                         </thead>\n                                      <tbody ui-sortable="sortableOptions" data-ng-model="chatApplications">\n                                          <tr data-ng-repeat="application in chatApplications">\n                                                             <td align="center">\n                                                                   <span>\n                                                                                <i data-ng-class="application.User ? \'icon-user\' : \'icon-docs\'"></i>\n                                                                      </span>\n                                                               </td>\n                                                         <td align="center">{{application.timeout}}</td>\n                                                               <td align="center">{{application.Interval ? application.Interval.name : application.interval}}</td>\n                                                           <td>\n                                                                  <a class="btn default btn-xs blue-stripe" data-ng-href="/chat/websites/view/{{chatWebsite.id}}/actions/view/{{application.id}}">\n                                                                              {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(application.app, application.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="chatApplications.length">\n                                                           <td colspan="5" style="text-align:center;">\n                                                                   <i>No applications available</i>\n                                                              </td>\n                                                 </tr>\n                                   </tbody>\n                            </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/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                                    <!-- START HOST -->\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="0" 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 HOST -->\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 class="input-medium" 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                                                  <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                                    </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                                                  <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                                    </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>{{$select.selected}}</ui-select-match>\n                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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>{{$select.selected}}</ui-select-match>\n                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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 inpu" 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                                                  <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/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                                                    <!-- START HOST -->\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="0" 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 HOST -->\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                                                                  <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                                                    </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.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                                                                  <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                                                    </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>{{$select.selected}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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>{{$select.selected}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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                                                                  <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                                            <!-- <button class="btn green-haze" type="button" wz-previous><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button> -->\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/chat/website/view/snippet/view/view.html",'<div class="row" data-ng-init="getSnippetCode()">\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_EMBEDDING\' | translate}}</a>\n                                    </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_APPEARANCE\' | translate}}</a>\n                                   </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FORMS\' | translate}}</a>\n                                        </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_LABELS\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_5" data-toggle="tab">{{\'APPLICATION_SETTINGS\' | 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                                                             <!-- EMBEDDING TAB -->\n                                                                <div class="tab-pane active" id="tab_1_1">\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                                                                                               <textarea name="snippet" rows="13" style="resize:none;cursor:text;" class="form-control" readonly data-ng-model="snippetCode"></textarea>\n                                                                                     </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </div>\n                                                                <!-- END EMBEDDING TAB -->\n\n                                                          <!-- APPEARANCE TAB -->\n                                                               <div class="tab-pane" id="tab_1_2">\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_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="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>\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.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="animationToggle in [true, false] | filter: $select.search">\n                                                                                                        <div ng-bind-html="animationToggle ? \'On\' : \'Off\' | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <!-- END ANIMATION TOGGLE -->\n\n\n                                                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                                                  </form>\n                                                               </div>\n                                                                <!-- END APPEARANCE TAB -->\n\n                                                         <!-- FORMS TAB -->\n                                                            <div class="tab-pane" id="tab_1_3">\n                                                                   <form name="forms.formFunctionality" data-ng-submit="forms.formFunctionality.$valid && updateItem()" 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="chatWebsite.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 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_4">\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 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_USERNAME_PLACEHOLDER\' | translate}}</label>\n                                                                                     <input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_USERNAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.username_placeholder"/>\n                                                                              </div>\n                                                                                <!-- END USERNAME PLACEHOLDER -->\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 == \'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.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="chatWebsite.offline_message"/>\n                                                                             </div>\n                                                                                <!-- END OFFLINE MESSAGE -->\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.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="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.startChatButton.$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                                                                         <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_5">\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_REMOTE\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                                      <input type="url" name="remote" placeholder="{{\'APPLICATION_REMOTE\' | 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                                                                               </div>\n                                                                                <!-- END REMOTE IP -->\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                                                     </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\',\'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/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="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="/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.chat.websites.view.snippet\')}">\n                                                   <a ng-href="/chat/websites/view/{{chatWebsite.id}}/snippet/view">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SNIPPET\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.chat.websites.view.actions\')}">\n                                                   <a ng-href="/chat/websites/view/{{chatWebsite.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                        <!-- 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/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="/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">\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_REMOTE\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remote" placeholder="{{\'APPLICATION_REMOTE\' | translate}}" class="form-control" data-ng-model="item.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                                                       </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\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 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_USERNAME_PLACEHOLDER\' | translate}}</label>\n                                                             <input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_USERNAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.username_placeholder"/>\n                                                     </div>\n                                                        <!-- END USERNAME PLACEHOLDER -->\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 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 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.startChatButton.$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                                                 <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 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 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/contactmanager/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="/contactmanager/list">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n                          </li>\n                 </ul>\n         </div>\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="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="contacts.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }} <i class="fa fa-angle-down"></i>\n                                              </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/contactmanager/wizard">\n                                                             <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getContacts([\'mailbox\', \'fullname\', \'email\'])" csv-header="[\'name\', \'surname\', \'description\']" field-separator=";" filename="contacts.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="displayedContacts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                        <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.contactsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="contactByPage in contactsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="contactByPage.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(contact, checked)" checklist-model checklist-value="uniqueid"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="surname">{{ \'APPLICATION_SURNAME\' | translate }}</th>\n                                              <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th\n                                                               <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="contact in displayedContacts" class="animate-repeat">\n                                                         <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="contacts.checked" checklist-value="contact.uniqueid"></td>\n                                                             <td>{{contact.name}} {{}}</td>\n                <td>{{contact.surname}}</td>\n                                        <td>{{contact.description}}</td>\n                                              <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/contactmanager/view/{{contact.uniqueid}}/settings">\n                                                                          {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(contact.mailbox,contact.uniqueid)">\n                                                                                {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedContacts.length">\n                                                          <td colspan="5" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_CONTACTS_AVAILABLE\' | translate }}</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="surname" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_SURNAME\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td>\n                                                  </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.contactsByPage.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-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/view/view.history.html",'<div class="row" data-ng-init="getHistory()">\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_HISTORY\' | translate}}</span>\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_CALLERID\' | translate }}</th>\n                                                   <th>{{ \'APPLICATION_DATE\' | translate }}</th>\n                                             </tr>\n                                         </thead>\n                                      <tbody data-ng-model="contactHistory">\n                                          <tr data-ng-repeat="history in contactHistory">\n                                                           <td>{{history.callerid}}</td>\n                                                         <td>{{history.name}}</td>\n                                         </tr>\n                                                     <tr data-ng-hide="contactHistory.length">\n                                                             <td colspan="2" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_CONTACTS_AVAILABLE\' | translate }}</i>\n                                                            </td>\n                                                 </tr>\n                                   </tbody>\n                            </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/contactmanager/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getContact()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-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="/contactmanager/list">{{ \'APPLICATION_CONTACT\' | translate }}</a>\n                                  <i data-ng-show="contact" class="fa fa-angle-right"></i>\n                              </li>\n                         <li data-ng-show="contact">\n                                   <a href="#">{{contact.mailbox}}</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/contact.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                                          {{contact.mailbox}}\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.view.settings\')}">\n                                                       <a data-ng-href="/contactmanager/view/{{contact.uniqueid}}/settings">\n                                                 <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n            <li data-ng-class="{active: $state.is(\'main.contactmanager.view.history\')}">\n              <a data-ng-href="/contactmanager/view/{{contact.uniqueid}}/history">\n              <i class="icon-speech"></i>\n              {{ \'APPLICATION_HISTORY\' | 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/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_CONTACT\' | 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 && updateContact()" novalidate>\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="contact.mailbox" required/>\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 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="contact.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="contact.rpassword" nx-equal="contact.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 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="contact.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="contact.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 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="contact.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="updateContact()" novalidate>\n\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/contactmanager/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-users"></i>\n                           <a href="/contactmanager/list">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n                          <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-user-follow"></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-envelope-letter font-green-sharp"></i>\n                         <span class="caption-subject">{{ \'APPLICATION_CONTACT\' | 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 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="item.mailbox" required/>\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 PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.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="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}}<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.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 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="item.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="item.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 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="item.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                                          <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/dashboard/dashboard.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="/dashboard/voice">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <div>\n             <nav class="navbar navbar-default" role="navigation">\n                     <div class="navbar-header">\n                       <button type="button" class="navbar-toggle" ng-init="navCollapsed = true" 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                     <!-- <a class="navbar-brand" ui-sref="home">Brand</a> -->\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 dropdown>\n                                                                                    <a href="#" dropdown-toggle>\n                                                                                                  {{ \'APPLICATION_VOICE\' | translate }}\n                                                                                                       <b class=\'caret\'></b>\n                                                                                       </a>\n                                                                                  <tree tree=\'voice\'></tree>\n                                                                  </li>\n                                                                 <li dropdown>\n                                                                                 <a href="#" dropdown-toggle>\n                                                                                                  {{ \'APPLICATION_MAIL\' | translate }}\n                                                                                                        <b class=\'caret\'></b>\n                                                                                       </a>\n                                                                                  <tree tree=\'mail\'></tree>\n                                                                   </li> -->\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                                  <!-- <tree tree=\'voice\'></tree> -->\n                             </li>\n                                                                         <li data-ng-class="{active: $state.is(\'main.dashboard.mail\')}">\n                                 <a href="/dashboard/mail">\n                                                                                                        <b class=\'icon-envelope\'></b>\n                                       {{ \'APPLICATION_MAIL\' | translate }}\n                                    </a>\n                                  <!-- <tree tree=\'mail\'></tree> -->\n                              </li>\n                     </ul>\n                         <!-- <ul class="nav navbar-nav">\n                          <li dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_QUEUES\' | translate }}\n                                      <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'queues\'></tree>\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/mail/mail.html",'<div class="col-md-12">\nThis is the mail view.\n</div>\n'),a.put("app/dashboard/voice/voice.html",'<div class="row" ng-init=\'getQueueStats()\'>\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="fa fa-comments"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.abandonedCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_ABANDONED\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\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="fa fa-bar-chart-o"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.completedCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_COMPLETED\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\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-shopping-cart"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.waitCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_WAIT\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\n    </div>\n  </div>\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="fa fa-globe"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.activeCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_ACTIVE\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\n    </div>\n  </div>\n</div>\n'),a.put("app/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="icon-paper-plane"></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="/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">\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="fax_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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }} <i class="fa fa-angle-down"></i>\n                                              </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/fax/accounts/wizard">\n                                                               <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getFaxAccounts([\'name\', \'description\', \'phone\'])" csv-header="[\'Name\', \'Description\', \'Phone\']" field-separator=";" filename="fax_accounts.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="displayedFaxAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                     <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.faxAccountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="faxAccountByPage in faxAccountsByPage | filter: $select.search">\n                                                                                                   <div ng-bind-html="faxAccountByPage.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(faxAccount, checked)" checklist-model checklist-value="id"></th>\n                                               <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="phone">{{ \'APPLICATION_PHONE\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="faxAccount in displayedFaxAccounts" class="animate-repeat">\n                                                           <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="fax_accounts.checked" checklist-value="faxAccount.id"></td>\n                                          <td>{{faxAccount.name}}</td>\n                                                            <td>{{faxAccount.description}}</td>\n                                                           <td>{{faxAccount.phone}}</td>\n                                       <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/fax/accounts/view/{{faxAccount.id}}/settings">\n                                                                               {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(faxAccount.name,faxAccount.id)">\n                                                                           {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedFaxAccounts.length">\n                                                               <td colspan="5" style="text-align:center;">\n                                                                   <i>No fax account available</i>\n                                                               </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td></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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="phone" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_PHONE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                  </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.faxAccountsByPage.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/fax/account/view/view.applications.html",'<div class="row" data-ng-init="initApplication()">\n  <div class="col-md-12">\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_SETTINGS\' | translate}}" canexit="formValidation(forms.info.$valid)">\n                                                        <form name="forms.info" novalidate>\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}}</label>\n                                                                      <ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n                                         <ui-select-match placeholder="{{\'APPLICATION_APPLICATION\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n                                         <ui-select-choices repeat="filter in [\'queue\', \'agent\'] | filter: $select.search">\n                                          <div ng-bind-html="filter | uppercase | 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\n                                                            <!-- START APPADATA -->\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                                                                        <ui-select data-ng-model="application.appdata" name="appdata" theme="bootstrap" required>\n                                         <ui-select-match placeholder="{{\'APPLICATION_ARGUMENTS\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                          <ui-select-choices repeat="item in items | filter: $select.search">\n                                             <div data-ng-bind-html="item.name | highlight: $select.search"></div>\n                                       </ui-select-choices>\n                                        </ui-select>\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 APPADATA -->\n\n                                                               <!-- START TIMEOUT -->\n                                                                <div class="form-group"  data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n                                                                      <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                                                  <input type="text" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.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                                                               </div>\n                                                                <!-- END TIMEOUT -->\n\n                                                                <!-- START INTERVAL -->\n                                                               <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.info.interval.$touched || forms.info.$submitted) && forms.info.interval.$invalid}">\n                                                                        <label class="control-label">{{\'APPLICATION_INTERVAL\' | translate}}</label>\n                                                                 <input type="text" name="interval" placeholder="*|*|*|*" class="form-control" data-ng-model="application.interval">\n                                                                   <span data-ng-show="(forms.info.info.interval.$touched || forms.info.$submitted) && forms.info.interval.$invalid && forms.info.interval.$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 -->\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 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/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="icon-paper-plane"></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="/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.fax.accounts.view.settings\')}">\n                                                 <a href="/fax/accounts/view/{{account.id}}/settings">\n                                                 <i class="icon-settings"></i>\n                                                 {{\'APPLICATION_SETTINGS\' | translate}} </a>\n                                         </li>\n                                         <li data-ng-class="{active: $state.is(\'main.fax.accounts.view.routes\') || $state.is(\'main.fax.accounts.view.applications\')}">\n                                                     <a href="/fax/accounts/view/{{account.id}}/routes">\n                                                   <i class="icon-directions"></i>\n                                                       {{\'APPLICATION_ROUTES\' | 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/fax/account/view/view.routes.html",'<div class="row" data-ng-init="getFaxApplications()">\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_ROUTES\' | translate}}</span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group">\n                                               <a class="btn green-jungle " href="/fax/accounts/view/{{account.id}}/applications" 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                          <table class="table table-striped table-bordered table-hover">\n                                          <thead>\n                                               <tr>\n                                                                <!-- <th width="5%">{{ \'APPLICATION_ID\' | translate }}</th> -->\n                                                 <th>{{\'APPLICATION_APPLICATION\' | translate}}</th>\n                                                  <th>{{\'APPLICATION_ARGUMENTS\' | translate}}</th>\n                                                                <th>{{\'APPLICATION_TIMEOUT\' | translate}}</th>\n                                                  <!-- <th>{{\'APPLICATION_INTERVAL\' | translate}}</th> -->\n                                                                <th width="5%">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                           </tr>\n                                         </thead>\n                                            <tbody ui-sortable="sortableOptions" data-ng-model="faxApplications">\n                                     <tr data-ng-repeat="application in faxApplications | orderBy:\'priority\'">\n                                                               <td><span data-ng-class="{\'label-info\': application.app == \'agent\', \'label-success\': application.app == \'queue\'}" class="label label-sm"> {{application.app}} </span></td>\n                                                            <td>{{getAppdata(application.app, application.appdata)}}</td>\n                                                         <td>{{application.timeout}}</td>\n                                                              <!-- <td>{{application.interval}}</td> -->\n                                          <td>\n                                            <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(application.app,application.id)">\n                                                                          {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="faxApplications.length">\n                                                            <td colspan="5" style="text-align:center;">\n                                                                   <i>No applications available</i>\n                                                              </td>\n                                                 </tr>\n                                   </tbody>\n                            </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/fax/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.formSetting" data-ng-submit="forms.formSetting.$valid && updateItemFaxAccount()" 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\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 TRUNKS -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.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.TrunkId" 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.id 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                                                          <span data-ng-show="forms.formSetting.trunk.$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 TRUNKS -->\n\n                                                       <!-- START PHONE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.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="account.phone" required/>\n                                                             <span data-ng-show="forms.formSetting.phone.$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 PHONE -->\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                                                              <!-- <button type="button" name="ecm" class="btn btn-default form-control" data-ng-model="account.ecm" bs-checkbox>{{account.ecm ? \'ENABLED\' : \'DISABLED\'}}</button> -->\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                                                      </div>\n                                                        <!-- END ECM -->\n\n                                                    <!-- START FAXHEADER -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.faxheader.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_FAXHEADER\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="faxheader" placeholder="{{\'APPLICATION_FAXHEADER\' | translate}}" class="form-control" data-ng-model="account.faxheader" required/>\n                                                         <span data-ng-show="forms.formSetting.faxheader.$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 FAXHEADER -->\n\n                                                      <!-- START LOCALID -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.localid.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_LOCALID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="localid" placeholder="{{\'APPLICATION_LOCALID\' | translate}}" class="form-control" data-ng-model="account.localid" required/>\n                                                               <span data-ng-show="forms.formSetting.localid.$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 LOCALID -->\n\n                                                        <!-- START MAXRATE -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.maxrate.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}}</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 [\'9600\', \'14400\', \'33600\'] | filter: $select.search">\n                                                                             <div data-ng-bind="maxrate | highlight: $select.search"></div>\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.maxrate.$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 MAXRATE -->\n\n                                                      <!-- START MINRATE -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.minrate.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}}</label>\n                                                          <ui-select data-ng-model="account.minrate" name="minrate" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n                                                                 <ui-select-choices repeat="minrate in [\'9600\', \'14400\', \'33600\'] | filter: $select.search">\n                                                                             <div data-ng-bind="minrate | highlight: $select.search"></div>\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.minrate.$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 MINRATE -->\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/contactmanager/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-users"></i>\n                           <a href="/contactmanager/list">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n                          <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-user-follow"></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-envelope-letter font-green-sharp"></i>\n                         <span class="caption-subject">{{ \'APPLICATION_CONTACT\' | 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 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="item.mailbox" required/>\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 PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.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="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}}<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.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 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="item.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="item.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 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="item.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                                          <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/dashboard/dashboard.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="/dashboard/voice">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <div>\n             <nav class="navbar navbar-default" role="navigation">\n                     <div class="navbar-header">\n                       <button type="button" class="navbar-toggle" ng-init="navCollapsed = true" 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                     <!-- <a class="navbar-brand" ui-sref="home">Brand</a> -->\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 dropdown>\n                                                                                    <a href="#" dropdown-toggle>\n                                                                                                  {{ \'APPLICATION_VOICE\' | translate }}\n                                                                                                       <b class=\'caret\'></b>\n                                                                                       </a>\n                                                                                  <tree tree=\'voice\'></tree>\n                                                                  </li>\n                                                                 <li dropdown>\n                                                                                 <a href="#" dropdown-toggle>\n                                                                                                  {{ \'APPLICATION_MAIL\' | translate }}\n                                                                                                        <b class=\'caret\'></b>\n                                                                                       </a>\n                                                                                  <tree tree=\'mail\'></tree>\n                                                                   </li> -->\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                                  <!-- <tree tree=\'voice\'></tree> -->\n                             </li>\n                                                                         <li data-ng-class="{active: $state.is(\'main.dashboard.mail\')}">\n                                 <a href="/dashboard/mail">\n                                                                                                        <b class=\'icon-envelope\'></b>\n                                       {{ \'APPLICATION_MAIL\' | translate }}\n                                    </a>\n                                  <!-- <tree tree=\'mail\'></tree> -->\n                              </li>\n                     </ul>\n                         <!-- <ul class="nav navbar-nav">\n                          <li dropdown>\n                             <a href="#" dropdown-toggle>\n                                      {{ \'APPLICATION_QUEUES\' | translate }}\n                                      <b class=\'caret\'></b>\n                                   </a>\n                                  <tree tree=\'queues\'></tree>\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/mail/mail.html",'<div class="col-md-12">\nThis is the mail view2.\n</div>\n'),a.put("app/dashboard/voice/voice.html",'<div class="row" ng-init=\'getQueueStats()\'>\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="fa fa-comments"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.abandonedCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_ABANDONED\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\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="fa fa-bar-chart-o"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.completedCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_COMPLETED\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\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-shopping-cart"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.waitCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_WAIT\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\n    </div>\n  </div>\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="fa fa-globe"></i>\n      </div>\n      <div class="details">\n        <div class="number">\n          {{queueStats.activeCalls}}\n        </div>\n        <div class="desc">\n          {{\'APPLICATION_DASHBOARD_ACTIVE\' | translate}}\n        </div>\n      </div>\n      <a class="more" href="/voice/realtime/view/queues">\n      {{\'APPLICATION_VIEW_MORE\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n      </a>\n    </div>\n  </div>\n</div>\n'),a.put("app/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="icon-paper-plane"></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="/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">\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="fax_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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }} <i class="fa fa-angle-down"></i>\n                                              </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/fax/accounts/wizard">\n                                                               <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getFaxAccounts([\'name\', \'description\', \'phone\'])" csv-header="[\'Name\', \'Description\', \'Phone\']" field-separator=";" filename="fax_accounts.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="displayedFaxAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                     <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.faxAccountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="faxAccountByPage in faxAccountsByPage | filter: $select.search">\n                                                                                                   <div ng-bind-html="faxAccountByPage.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(faxAccount, checked)" checklist-model checklist-value="id"></th>\n                                               <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="phone">{{ \'APPLICATION_PHONE\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="faxAccount in displayedFaxAccounts" class="animate-repeat">\n                                                           <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="fax_accounts.checked" checklist-value="faxAccount.id"></td>\n                                          <td>{{faxAccount.name}}</td>\n                                                            <td>{{faxAccount.description}}</td>\n                                                           <td>{{faxAccount.phone}}</td>\n                                       <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/fax/accounts/view/{{faxAccount.id}}/settings">\n                                                                               {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(faxAccount.name,faxAccount.id)">\n                                                                           {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedFaxAccounts.length">\n                                                               <td colspan="5" style="text-align:center;">\n                                                                   <i>No fax account available</i>\n                                                               </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td></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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="phone" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_PHONE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                  </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.faxAccountsByPage.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/fax/account/view/view.applications.html",'<div class="row" data-ng-init="initApplication()">\n  <div class="col-md-12">\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_SETTINGS\' | translate}}" canexit="formValidation(forms.info.$valid)">\n                                                        <form name="forms.info" novalidate>\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}}</label>\n                                                                      <ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n                                         <ui-select-match placeholder="{{\'APPLICATION_APPLICATION\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n                                         <ui-select-choices repeat="filter in [\'queue\', \'agent\'] | filter: $select.search">\n                                          <div ng-bind-html="filter | uppercase | 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\n                                                            <!-- START APPADATA -->\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                                                                        <ui-select data-ng-model="application.appdata" name="appdata" theme="bootstrap" required>\n                                         <ui-select-match placeholder="{{\'APPLICATION_ARGUMENTS\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                          <ui-select-choices repeat="item in items | filter: $select.search">\n                                             <div data-ng-bind-html="item.name | highlight: $select.search"></div>\n                                       </ui-select-choices>\n                                        </ui-select>\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 APPADATA -->\n\n                                                               <!-- START TIMEOUT -->\n                                                                <div class="form-group"  data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n                                                                      <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                                                  <input type="text" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.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                                                               </div>\n                                                                <!-- END TIMEOUT -->\n\n                                                                <!-- START INTERVAL -->\n                                                               <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.info.interval.$touched || forms.info.$submitted) && forms.info.interval.$invalid}">\n                                                                        <label class="control-label">{{\'APPLICATION_INTERVAL\' | translate}}</label>\n                                                                 <input type="text" name="interval" placeholder="*|*|*|*" class="form-control" data-ng-model="application.interval">\n                                                                   <span data-ng-show="(forms.info.info.interval.$touched || forms.info.$submitted) && forms.info.interval.$invalid && forms.info.interval.$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 -->\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 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/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="icon-paper-plane"></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="/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.fax.accounts.view.settings\')}">\n                                                 <a href="/fax/accounts/view/{{account.id}}/settings">\n                                                 <i class="icon-settings"></i>\n                                                 {{\'APPLICATION_SETTINGS\' | translate}} </a>\n                                         </li>\n                                         <li data-ng-class="{active: $state.is(\'main.fax.accounts.view.routes\') || $state.is(\'main.fax.accounts.view.applications\')}">\n                                                     <a href="/fax/accounts/view/{{account.id}}/routes">\n                                                   <i class="icon-directions"></i>\n                                                       {{\'APPLICATION_ROUTES\' | 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/fax/account/view/view.routes.html",'<div class="row" data-ng-init="getFaxApplications()">\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_ROUTES\' | translate}}</span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group">\n                                               <a class="btn green-jungle " href="/fax/accounts/view/{{account.id}}/applications" 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                          <table class="table table-striped table-bordered table-hover">\n                                          <thead>\n                                               <tr>\n                                                                <!-- <th width="5%">{{ \'APPLICATION_ID\' | translate }}</th> -->\n                                                 <th>{{\'APPLICATION_APPLICATION\' | translate}}</th>\n                                                  <th>{{\'APPLICATION_ARGUMENTS\' | translate}}</th>\n                                                                <th>{{\'APPLICATION_TIMEOUT\' | translate}}</th>\n                                                  <!-- <th>{{\'APPLICATION_INTERVAL\' | translate}}</th> -->\n                                                                <th width="5%">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                           </tr>\n                                         </thead>\n                                            <tbody ui-sortable="sortableOptions" data-ng-model="faxApplications">\n                                     <tr data-ng-repeat="application in faxApplications | orderBy:\'priority\'">\n                                                               <td><span data-ng-class="{\'label-info\': application.app == \'agent\', \'label-success\': application.app == \'queue\'}" class="label label-sm"> {{application.app}} </span></td>\n                                                            <td>{{getAppdata(application.app, application.appdata)}}</td>\n                                                         <td>{{application.timeout}}</td>\n                                                              <!-- <td>{{application.interval}}</td> -->\n                                          <td>\n                                            <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(application.app,application.id)">\n                                                                          {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="faxApplications.length">\n                                                            <td colspan="5" style="text-align:center;">\n                                                                   <i>No applications available</i>\n                                                              </td>\n                                                 </tr>\n                                   </tbody>\n                            </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/fax/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.formSetting" data-ng-submit="forms.formSetting.$valid && updateItemFaxAccount()" 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\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 TRUNKS -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.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.TrunkId" 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.id 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                                                          <span data-ng-show="forms.formSetting.trunk.$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 TRUNKS -->\n\n                                                       <!-- START PHONE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.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="account.phone" required/>\n                                                             <span data-ng-show="forms.formSetting.phone.$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 PHONE -->\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                                                              <!-- <button type="button" name="ecm" class="btn btn-default form-control" data-ng-model="account.ecm" bs-checkbox>{{account.ecm ? \'ENABLED\' : \'DISABLED\'}}</button> -->\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                                                      </div>\n                                                        <!-- END ECM -->\n\n                                                    <!-- START FAXHEADER -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.faxheader.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_FAXHEADER\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="faxheader" placeholder="{{\'APPLICATION_FAXHEADER\' | translate}}" class="form-control" data-ng-model="account.faxheader" required/>\n                                                         <span data-ng-show="forms.formSetting.faxheader.$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 FAXHEADER -->\n\n                                                      <!-- START LOCALID -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.localid.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_LOCALID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="localid" placeholder="{{\'APPLICATION_LOCALID\' | translate}}" class="form-control" data-ng-model="account.localid" required/>\n                                                               <span data-ng-show="forms.formSetting.localid.$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 LOCALID -->\n\n                                                        <!-- START MAXRATE -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.maxrate.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}}</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 [\'9600\', \'14400\', \'33600\'] | filter: $select.search">\n                                                                             <div data-ng-bind="maxrate | highlight: $select.search"></div>\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.maxrate.$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 MAXRATE -->\n\n                                                      <!-- START MINRATE -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.minrate.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}}</label>\n                                                          <ui-select data-ng-model="account.minrate" name="minrate" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n                                                                 <ui-select-choices repeat="minrate in [\'9600\', \'14400\', \'33600\'] | filter: $select.search">\n                                                                             <div data-ng-bind="minrate | highlight: $select.search"></div>\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.minrate.$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 MINRATE -->\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/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="icon-paper-plane"></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="/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_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 TRUNKS -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.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.TrunkId" 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.id 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                                                          <span data-ng-show="forms.formSetting.trunk.$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 TRUNKS -->\n\n                                                       <!-- START PHONE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.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="forms.formSetting.phone.$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 PHONE -->\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                                                              <!-- <button type="button" name="ecm" class="btn btn-default form-control" data-ng-model="item.ecm" bs-checkbox>{{item.ecm ? \'ENABLED\' : \'DISABLED\'}}</button> -->\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                                                      </div>\n                                                        <!-- END ECM -->\n\n                                                    <!-- START FAXHEADER -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.faxheader.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_FAXHEADER\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="faxheader" placeholder="{{\'APPLICATION_FAXHEADER\' | translate}}" class="form-control" data-ng-model="item.faxheader" required/>\n                                                            <span data-ng-show="forms.formSetting.faxheader.$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 FAXHEADER -->\n\n                                                      <!-- START LOCALID -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.localid.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_LOCALID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="localid" placeholder="{{\'APPLICATION_LOCALID\' | translate}}" class="form-control" data-ng-model="item.localid" required/>\n                                                          <span data-ng-show="forms.formSetting.localid.$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 LOCALID -->\n\n                                                        <!-- START MAXRATE -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.maxrate.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}}</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 [\'9600\', \'14400\', \'33600\'] | filter: $select.search">\n                                                                             <div data-ng-bind="maxrate | highlight: $select.search"></div>\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.maxrate.$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 MAXRATE -->\n\n                                                      <!-- START MINRATE -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.minrate.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}}</label>\n                                                          <ui-select data-ng-model="item.minrate" name="minrate" theme="bootstrap" required>\n                                                                    <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n                                                                 <ui-select-choices repeat="minrate in [\'9600\', \'14400\', \'33600\'] | filter: $select.search">\n                                                                             <div data-ng-bind="minrate | highlight: $select.search"></div>\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.minrate.$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 MINRATE -->\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 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/fax/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-envelope"></i>\n                                         <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n                                         <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-settings"></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">\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_AUTOMATIONS\' | translate }}</a> </span>\n                               </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="faxAutomations.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }} <i class="fa fa-angle-down"></i>\n                                           </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/fax/automations/wizard">\n                                                            <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getFaxAutomations([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="fax_automations.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="displayedFaxAutomations" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.faxAutomationsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="faxAutomationByPage in faxAutomationsByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="faxAutomationByPage.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 st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th> -->\n                                                              <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(faxAutomation, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                             <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="faxAutomation in displayedFaxAutomations">\n                                                            <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="faxAutomations.checked" checklist-value="faxAutomation.id"></td>\n                                             <td>{{faxAutomation.name}}</td>\n                                                         <td>{{faxAutomation.description}}</td>\n                                                                <td>\n                                                                  <input\n                                                                                data-ng-change="updateItem(faxAutomation.id, faxAutomation.status)",\n                                                              bs-switch\n                                                             ng-model="faxAutomation.status"\n                                                               type="checkbox"\n                                                               switch-active="{{ isActive }}"\n                                                                switch-on-text="{{ onText }}"\n                                                                 switch-off-text="{{ offText }}"\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                                                          </td>\n                                       <td>\n                                                                    <a class="btn default btn-xs blue-stripe" data-ng-href="/fax/automations/view/{{faxAutomation.id}}/settings">\n                                                                         {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(faxAutomation.name, faxAutomation.id)">\n                                                                            {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedFaxAutomations.length">\n                                                            <td colspan="6" class="text-center">\n                                                                  <i>{{\'MESSAGE_NO_AVAILABLE_AUTOMATIONS\' | translate}}</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_USERNAME\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\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="conf.faxAutomationsByPage.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/fax/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-envelope"></i>\n                                 <a href="/">{{ \'APPLICATION_FAX\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="/fax/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.fax.automations.view.settings\')}">\n                                                      <a href="/fax/automations/view/{{automation.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                </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/fax/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">OR {{\'APPLICATION_CONDITIONS\' | translate}}</a>\n                                        </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab">AND {{\'APPLICATION_CONDITIONS\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_ACTIONS\' | 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 && updateAutomation()" 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="automation.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="automation.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                                    <!-- IMAP TAB -->\n                                     <div class="tab-pane" id="tab_1_2">\n                                           <div class="row">\n                                                     <div class="col-md-12">\n                                                               <a href="#" data-ng-click="addNewCondition(\'or\')">\n                                                                  <i class="icon-plus"></i>\n                                                             </a>\n                                                          <i class="icon-people"></i>\n                                                           <span class="caption-subject">Meet <strong>all</strong> of the following conditions:</a> </span>\n                                                      </div>\n                                                </div>\n                                                <div class="row" data-ng-repeat="condition in automation.BusinessConditions | filter: {type: \'or\'}">\n                                                        <div class="col-md-12">\n                                                               <div class="row">\n                                                                     <div class="col-md-12">\n                                                                               <hr>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="row">\n                                                                     <div class="col-md-4">\n                                                                                <div class="form-group">\n                                                                                      <ui-select data-ng-model="condition.condition" theme="bootstrap" on-select="updateCondition(condition.id, \'condition\', $item.key)" required>\n                                                                                                <ui-select-match placeholder="-- Click to select condition. --">{{$select.selected.value}}</ui-select-match>\n                                                                                          <ui-select-choices repeat="condition.key as condition in automations.conditions | filter: $select.search">\n                                                                                                    <div data-ng-bind="condition.value | highlight: $select.search"></div>\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="col-md-3">\n                                                                                <div class="form-group">\n                                                                                      <ui-select data-ng-model="condition.operator" theme="bootstrap" on-select="updateCondition(condition.id, \'operator\', $item.key)" required>\n                                                                                          <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                         <ui-select-choices repeat="operator.key as operator in getOperatorsByCondition(condition.condition) | filter: $select.search">\n                                                                                                        <div data-ng-bind="operator.value | highlight: $select.search"></div>\n                                                                                         </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="col-md-4" data-ng-switch="condition.condition">\n                                                                           <div class="form-group" data-ng-switch-when="status">\n                                                                                 <ui-select data-ng-model="condition.attribute" theme="bootstrap" on-select="updateCondition(condition.id, \'attribute\', $item.key)" required>\n                                                                                                <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                         <ui-select-choices repeat="attribute.key as attribute in getAttributesByCondition(condition.condition) | filter: $select.search">\n                                                                                                     <div data-ng-bind="attribute.value | highlight: $select.search"></div>\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="form-group" data-ng-switch-when="createdAt">\n                                                                                      <input class="form-control" type="text" name="attributeOr{{$index}}" value="" data-ng-model="condition.attribute" ng-blur="updateCondition(condition.id, \'attribute\', condition.attribute)" data-ng-class="{\'has-error\': forms.and.attributeAnd{{$index}}.$invalid}" required>\n                                                                            </div>\n                                                                        </div>\n                                                                        <div class="col-md-1">\n                                                                                <a href="#" data-ng-click="removeCondition(condition.id)">\n                                                                                    <i class="icon-close"></i>\n                                                                            </a>\n                                                                  </div>\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                                <div class="row" data-ng-hide="automation.BusinessConditions.length">\n                                                 <div class="col-md-12 text-center">\n                                                           <hr>\n                                                          <i>Add condition</i>\n                                                  </div>\n                                                </div>\n                                        </div>\n                                        <!-- END IMAP TAB -->\n\n                                       <div class="tab-pane" id="tab_1_3">\n                                           <div class="row">\n                                                     <div class="col-md-12">\n                                                               <a href="#" data-ng-click="addNewCondition(\'and\')">\n                                                                 <i class="icon-plus"></i>\n                                                             </a>\n                                                          <i class="icon-people"></i>\n                                                           <span class="caption-subject">Meet <strong>all</strong> of the following conditions:</a> </span>\n                                                      </div>\n                                                </div>\n                                                <div class="row" data-ng-repeat="condition in automation.BusinessConditions | filter: {type: \'and\'}">\n                                                       <div class="col-md-12">\n                                                               <div class="row">\n                                                                     <div class="col-md-12">\n                                                                               <hr>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="row">\n                                                                     <div class="col-md-4">\n                                                                                <div class="form-group">\n                                                                                      <ui-select data-ng-model="condition.condition" name="conditionAnd{{$index}}" theme="bootstrap" on-select="updateCondition(condition.id, \'condition\', $item.key)" required>\n                                                                                          <ui-select-match placeholder="-- Click to select condition. --">{{$select.selected.value}}</ui-select-match>\n                                                                                          <ui-select-choices repeat="condition.key as condition in automations.conditions | filter: $select.search">\n                                                                                                    <div data-ng-bind="condition.value | highlight: $select.search"></div>\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="col-md-3">\n                                                                                <div class="form-group">\n                                                                                      <ui-select data-ng-model="condition.operator" name="operatorAnd{{$index}}" theme="bootstrap" on-select="updateCondition(condition.id, \'operator\', $item.key)" required>\n                                                                                             <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                         <ui-select-choices repeat="operator.key as operator in getOperatorsByCondition(condition.condition) | filter: $select.search">\n                                                                                                        <div data-ng-bind="operator.value | highlight: $select.search"></div>\n                                                                                         </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="col-md-4" data-ng-switch="condition.condition">\n                                                                           <div class="form-group" data-ng-switch-when="status">\n                                                                                 <ui-select data-ng-model="condition.attribute" name="attributeAnd{{$index}}" theme="bootstrap" on-select="updateCondition(condition.id, \'attribute\', $item.key)" required>\n                                                                                          <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                         <ui-select-choices repeat="attribute.key as attribute in getAttributesByCondition(condition.condition) | filter: $select.search">\n                                                                                                     <div data-ng-bind="attribute.value | highlight: $select.search"></div>\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="form-group" data-ng-switch-when="createdAt">\n                                                                                      <input class="form-control" type="text" name="attributeOr{{$index}}" value="" data-ng-model="condition.attribute" data-ng-blur="updateCondition(condition.id, \'attribute\', condition.attribute)" data-ng-class="{\'has-error\': forms.and.attributeAnd{{$index}}.$invalid}" required>\n                                                                                       <span data-ng-show="forms.and.attributeAnd{{$index}}.$invalid && forms.and.attributeAnd{{$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>\n                                                                        <div class="col-md-1">\n                                                                                <a href="#" data-ng-click="removeCondition(condition.id)">\n                                                                                    <i class="icon-close"></i>\n                                                                            </a>\n                                                                  </div>\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                                <div class="row" data-ng-hide="automation.BusinessConditions.length">\n                                                 <div class="col-md-12 text-center">\n                                                           <hr>\n                                                          <i>Add condition</i>\n                                                  </div>\n                                                </div>\n                                        </div>\n\n                                      <!-- SMTP TAB -->\n                                     <div class="tab-pane" id="tab_1_4">\n                                           <div class="row">\n                                                     <div class="col-md-12">\n                                                               <a href="#" data-ng-click="addNewAction()">\n                                                                   <i class="icon-plus"></i>\n                                                             </a>\n                                                          <i class="icon-people"></i>\n                                                           <span class="caption-subject">Meet <strong>all</strong> of the following conditions:</a> </span>\n                                                      </div>\n                                                </div>\n                                                <div class="row" data-ng-repeat="action in automation.BusinessActions">\n                                                       <div class="col-md-12">\n                                                               <div class="row">\n                                                                     <div class="col-md-12">\n                                                                               <hr>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="row">\n                                                                     <div class="col-md-4">\n                                                                                <div class="form-group">\n                                                                                      <ui-select data-ng-model="action.condition" theme="bootstrap" on-select="updateAction(action.id, \'condition\', $item.key)" required>\n                                                                                         <ui-select-match placeholder="-- Click to select condition. --">{{$select.selected.value}}</ui-select-match>\n                                                                                          <ui-select-choices repeat="action.key as action in automations.actions | filter: $select.search">\n                                                                                                     <div data-ng-bind="action.value | highlight: $select.search"></div>\n                                                                                           </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="col-md-3" data-ng-switch="action.condition">\n                                                                              <div class="form-group" data-ng-switch-when="status">\n                                                                                 <ui-select data-ng-model="action.attribute" theme="bootstrap" on-select="updateAction(action.id, \'attribute\', $item.key)" required>\n                                                                                         <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                         <ui-select-choices repeat="attribute.key as attribute in getAttributesByCondition(action.condition) | filter: $select.search">\n                                                                                                        <div data-ng-bind="attribute.value | highlight: $select.search"></div>\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="form-group" data-ng-switch-when="createdAt">\n                                                                                      <input class="form-control" type="text" data-ng-model="action.attribute" data-ng-blur="updateAction(action.id, \'attribute\', action.attribute)" data-ng-class="{\'has-error\': forms.and.attributeAnd{{$index}}.$invalid}" required>\n                                                                         </div>\n                                                                        </div>\n                                                                        <div class="col-md-4">\n                                                                        </div>\n                                                                        <div class="col-md-1">\n                                                                                <a href="#" data-ng-click="removeAction(action.id)">\n                                                                                  <i class="icon-close"></i>\n                                                                            </a>\n                                                                  </div>\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                                <div class="row" data-ng-hide="automation.BusinessActions.length">\n                                                    <div class="col-md-12 text-center">\n                                                           <hr>\n                                                          <i>Add condition</i>\n                                                  </div>\n                                                </div>\n\n                                      </div>\n                                        <!-- END SMTP TAB -->\n                         </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/fax/automation/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_FAX\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="/fax/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-settings 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_NEW_AUTOMATION\' | translate}}" canexit="formValidation(forms.automation.$valid && forms.automation.$valid)">\n                                         <form name="forms.automation" novalidate>\n                                                     <div class="row">\n                                                             <div class="col-md-12">\n                                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.automation.name.$invalid && forms.automation.$submitted}">\n                                                                               <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                         <input class="form-control" type="text" name="name" value="" data-ng-model="automations.name" required>\n                                                                               <span data-ng-show="forms.automation.name.$invalid && forms.automation.name.$error.required && forms.automation.$submitted" 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.automation.description.$invalid && forms.automation.$submitted}">\n                                                                                <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                              <input class="form-control" type="text" name="description" value="" data-ng-model="automations.description">\n                                                                          <span data-ng-show="forms.automation.description.$invalid && forms.automation.description.$error.required && forms.automation.$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\n                                                      <div class="row">\n                                                             <div class="col-md-12">\n                                                                       <hr>\n                                                          </div>\n                                                        </div>\n\n                                                      <div class="row">\n                                                             <div class="col-md-12">\n                                                                       <a href="#" data-ng-click="addNewChoice(\'or\')">\n                                                                             <i class="icon-plus"></i>\n                                                                     </a>\n                                                                  <i class="icon-user"></i>\n                                                                     <span class="caption-subject">Meet <strong>any</strong> of the following conditions:</a> </span>\n                                                              </div>\n                                                        </div>\n                                                        <div class="row" data-ng-repeat="automation in automations.or">\n                                                               <div class="col-md-12">\n                                                                       <div class="row">\n                                                                             <div class="col-md-12">\n                                                                                       <hr>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="row">\n                                                                             <div class="col-md-4">\n                                                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.automation.conditionOr{{$index}}.$invalid && forms.automation.$submitted && forms.automation.$submitted}">\n                                                                                               <ui-select data-ng-model="automations.or[$index].condition" name="conditionOr{{$index}}" theme="bootstrap" required>\n                                                                                                  <ui-select-match placeholder="-- Click to select condition. --">{{$select.selected.value}}</ui-select-match>\n                                                                                                  <ui-select-choices repeat="condition in automations.or[$index].conditions | filter: $select.search">\n                                                                                                          <div data-ng-bind="condition.value | highlight: $select.search"></div>\n                                                                                                        </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.automation.conditionOr{{$index}}.$invalid && forms.automation.conditionOr{{$index}}.$error.required && forms.automation.$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 class="col-md-3">\n                                                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.automation.operatorOr{{$index}}.$invalid && forms.automation.$submitted}">\n                                                                                               <ui-select data-ng-model="automations.or[$index].operator" name="operatorOr{{$index}}" theme="bootstrap" required>\n                                                                                                    <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                                 <ui-select-choices repeat="operator.key as operator in automations.or[$index].condition.operators | filter: $select.search">\n                                                                                                          <div data-ng-bind="operator.value | highlight: $select.search"></div>\n                                                                                                 </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.automation.operatorOr{{$index}}.$invalid && forms.automation.operatorOr{{$index}}.$error.required && forms.automation.$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 class="col-md-4" data-ng-switch="automations.or[$index].condition.input">\n                                                                                        <div class="form-group" data-ng-switch-when="ui-select" data-ng-class="{\'has-error\': forms.automation.attributeOr{{$index}}.$invalid && forms.automation.attributeOr{{$index}}.$error.required && forms.automation.$submitted}">\n                                                                                            <ui-select data-ng-model="automations.or[$index].attribute" name="attributeOr{{$index}}" theme="bootstrap" required>\n                                                                                                  <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                                 <ui-select-choices repeat="attribute.key as attribute in automations.or[$index].condition.attributes | filter: $select.search">\n                                                                                                               <div data-ng-bind="attribute.value | highlight: $select.search"></div>\n                                                                                                        </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.automation.attributeOr{{$index}}.$invalid && forms.automation.attributeOr{{$index}}.$error.required && forms.automation.$submitted" 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-switch-when="number">\n                                                                                         <input class="form-control" type="text" min="0" name="attributeOr{{$index}}" value="" data-ng-model="automations.or[$index].attribute" required>\n                                                                                              <span data-ng-show="forms.automation.attributeOr{{$index}}.$invalid && forms.automation.attributeOr{{$index}}.$error.required && forms.automation.$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 class="col-md-1">\n                                                                                        <a href="#" data-ng-click="removeChoice(\'or\', $index)">\n                                                                                             <i class="icon-close"></i>\n                                                                                    </a>\n                                                                          </div>\n                                                                        </div>\n                                                                </div>\n                                                        </div>\n                                                        <div class="row" data-ng-hide="automations.or.length">\n                                                                <div class="col-md-12 text-center">\n                                                                   <hr>\n                                                                  <i>Add condition</i>\n                                                          </div>\n                                                        </div>\n\n                                                      <div class="row">\n                                                             <div class="col-md-12">\n                                                                       <a href="#" data-ng-click="addNewChoice(\'and\')">\n                                                                            <i class="icon-plus"></i>\n                                                                     </a>\n                                                                  <i class="icon-people"></i>\n                                                                   <span class="caption-subject">Meet <strong>all</strong> of the following conditions:</a> </span>\n                                                              </div>\n                                                        </div>\n                                                        <div class="row" data-ng-repeat="automation in automations.and">\n                                                              <div class="col-md-12">\n                                                                       <div class="row">\n                                                                             <div class="col-md-12">\n                                                                                       <hr>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="row">\n                                                                             <div class="col-md-4">\n                                                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.automation.conditionAnd{{$index}}.$invalid && forms.automation.$submitted}">\n                                                                                             <ui-select data-ng-model="automations.and[$index].condition" name="conditionAnd{{$index}}" theme="bootstrap" required>\n                                                                                                        <ui-select-match placeholder="-- Click to select condition. --">{{$select.selected.value}}</ui-select-match>\n                                                                                                  <ui-select-choices repeat="condition in automations.and[$index].conditions | filter: $select.search">\n                                                                                                         <div data-ng-bind="condition.value | highlight: $select.search"></div>\n                                                                                                        </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.automation.conditionAnd{{$index}}.$invalid && forms.automation.conditionAnd{{$index}}.$error.required && forms.automation.$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 class="col-md-3">\n                                                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.automation.operatorAnd{{$index}}.$invalid && forms.automation.$submitted}">\n                                                                                              <ui-select data-ng-model="automations.and[$index].operator" name="operatorAnd{{$index}}" theme="bootstrap" required>\n                                                                                                  <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                                 <ui-select-choices repeat="operator.key as operator in automations.and[$index].condition.operators | filter: $select.search">\n                                                                                                         <div data-ng-bind="operator.value | highlight: $select.search"></div>\n                                                                                                 </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.automation.operatorAnd{{$index}}.$invalid && forms.automation.operatorAnd{{$index}}.$error.required && forms.automation.$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 class="col-md-4" data-ng-switch="automations.and[$index].condition.input">\n                                                                                       <div class="form-group" data-ng-switch-when="ui-select" data-ng-class="{\'has-error\': forms.automation.attributeAnd{{$index}}.$invalid && forms.automation.$submitted}">\n                                                                                             <ui-select data-ng-model="automations.and[$index].attribute" name="attributeAnd{{$index}}" theme="bootstrap" required>\n                                                                                                        <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                                 <ui-select-choices repeat="attribute.key as attribute in automations.and[$index].condition.attributes | filter: $select.search">\n                                                                                                              <div data-ng-bind="attribute.value | highlight: $select.search"></div>\n                                                                                                        </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.automation.attributeAnd{{$index}}.$invalid && forms.automation.attributeAnd{{$index}}.$error.required && forms.automation.$submitted" 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-switch-when="number">\n                                                                                         <input class="form-control" type="text" min="0" name="attributeAnd{{$index}}" value="" data-ng-model="automations.and[$index].attribute" data-ng-class="{\'has-error\': forms.automation.attributeAnd{{$index}}.$invalid}" required>\n                                                                                          <span data-ng-show="forms.automation.attributeAnd{{$index}}.$invalid && forms.automation.attributeAnd{{$index}}.$error.required && forms.automation.$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 class="col-md-1">\n                                                                                        <a href="#" data-ng-click="removeChoice(\'and\', $index)">\n                                                                                            <i class="icon-close"></i>\n                                                                                    </a>\n                                                                          </div>\n                                                                        </div>\n                                                                </div>\n                                                        </div>\n                                                        <div class="row" data-ng-hide="automations.and.length">\n                                                               <div class="col-md-12 text-center">\n                                                                   <hr>\n                                                                  <i>Add condition</i>\n                                                          </div>\n                                                        </div>\n\n                                                      <div class="row">\n                                                             <div class="col-md-12">\n                                                                       <a href="#" data-ng-click="addNewChoice(\'actions\')">\n                                                                                <i class="icon-plus"></i>\n                                                                     </a>\n                                                                  <i class="icon-magic-wand"></i>\n                                                                       <span class="caption-subject">Perform these actions:</a> </span>\n                                                              </div>\n                                                        </div>\n                                                        <div class="row" data-ng-repeat="automation in automations.actions">\n                                                          <div class="col-md-12">\n                                                                       <div class="row">\n                                                                             <div class="col-md-12">\n                                                                                       <hr>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="row">\n                                                                             <div class="col-md-4">\n                                                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.actions.conditionAction{{$index}}.$invalid && forms.automation.$submitted}">\n                                                                                             <ui-select data-ng-model="automations.actions[$index].condition" name="conditionAction{{$index}}" theme="bootstrap" required>\n                                                                                                 <ui-select-match placeholder="-- Click to select condition. --">{{$select.selected.value}}</ui-select-match>\n                                                                                                  <ui-select-choices repeat="action in automations.actions[$index].actions | filter: $select.search">\n                                                                                                           <div data-ng-bind="action.value | highlight: $select.search"></div>\n                                                                                                   </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.actions.conditionAction{{$index}}.$invalid && forms.actions.conditionAction{{$index}}.$error.required && forms.automation.$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 class="col-md-3" data-ng-switch="automations.actions[$index].condition.input">\n                                                                                   <div class="form-group" data-ng-switch-when="ui-select" data-ng-class="{\'has-error\': forms.actions.attributeAction{{$index}}.$invalid && forms.automation.$submitted}">\n                                                                                             <ui-select data-ng-model="automations.actions[$index].attribute" name="attributeAction{{$index}}" theme="bootstrap" required>\n                                                                                                 <ui-select-match>{{$select.selected.value}}</ui-select-match>\n                                                                                                 <ui-select-choices repeat="attribute.key as attribute in automations.actions[$index].condition.attributes | filter: $select.search">\n                                                                                                          <div data-ng-bind="attribute.value | highlight: $select.search"></div>\n                                                                                                        </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span data-ng-show="forms.actions.attributeAction{{$index}}.$invalid && forms.actions.attributeAction{{$index}}.$error.required && forms.automation.$submitted" 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-switch-when="number" data-ng-class="{\'has-error\': forms.actions.attributeAction{{$index}}.$invalid}">\n                                                                                               <input class="form-control" type="text" min="0" name="attributeAction{{$index}}" value="" data-ng-model="automations.actions[$index].attribute" required>\n                                                                                             <span data-ng-show="forms.actions.attributeAction{{$index}}.$invalid && forms.actions.attributeAction{{$index}}.$error.required && forms.automation.$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 class="col-md-4">\n                                                                                </div>\n                                                                                <div class="col-md-1">\n                                                                                        <a href="#" data-ng-click="removeChoice(\'actions\', $index)">\n                                                                                                <i class="icon-close"></i>\n                                                                                    </a>\n                                                                          </div>\n                                                                        </div>\n                                                                </div>\n                                                        </div>\n                                                        <div class="row" data-ng-hide="automations.actions.length">\n                                                           <div class="col-md-12 text-center">\n                                                                   <hr>\n                                                                  <i>Add action</i>\n                                                             </div>\n                                                        </div>\n                                                        <div class="row">\n                                                             <div class="col-md-12">\n                                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                               </div>\n                                                        </div>\n                                                </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\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/fax/inbox/inbox.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-paper-plane"></i>\n                                              <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n                                         <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-note"></i>\n                                             <a href="/fax/inbox/incoming">{{ \'APPLICATION_INBOX\' | translate }}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE CONTENT-->\n<div class="row inbox">\n     <div class="col-md-12" ui-view>\n       </div>\n</div>\n'),a.put("app/fax/inbox/incoming/incoming.html",'<!-- END PAGE HEADER-->\n<div data-ng-init="getRooms()">\n     <!-- <pre>\n            {{faxRooms | json}}\n   </pre> -->\n    <div class="inbox-header">\n            <h1 class="pull-left">Inbox</h1>\n      </div>\n        <div class="inbox-content">\n           <table class="table table-advance" st-table="displayedFaxRooms" st-safe-src="faxRooms">\n                       <thead>\n                               <tr>\n                                  <th colspan="8" style="background: #eef4f7; border: none; border-bottom: solid 5px #fff;">\n                                            <div class="row">\n                                                     <div class="col-md-6">\n                                                                <input type="checkbox" class="mail-checkbox mail-group-checkbox checker" data-ng-model="checked" data-ng-change="switchCheckbox(displayedFaxRooms, checked)">\n                                                         <div class="btn-group">\n                                                                       <a data-ng-href="/fax/inbox/compose" class="btn btn-sm blue">{{\'APPLICATION_NEW_MESSAGE\' | translate}} <i class="fa fa-plus"></i></a>\n                                                                       <!-- <a class="btn btn-sm blue dropdown-toggle" href="#" data-toggle="dropdown">\n                                                                              {{\'APPLICATION_MORE\' | translate}} <i class="fa fa-angle-down"></i>\n                                                                 </a> -->\n                                                                      <ul class="dropdown-menu">\n                                                                            <li>\n                                                                                  <a href="#" data-ng-click="markAsRead(true)">\n                                                                                 <i class="icon-paper-plane-open"></i> {{\'APPLICATION_MARK_AS_READ\' | translate}} </a>\n                                                                               </li>\n                                                                         <li>\n                                                                                  <a href="#" data-ng-click="markAsRead(false)">\n                                                                                        <i class="icon-paper-plane"></i> {{\'APPLICATION_MARK_AS_UNREAD\' | translate}} </a>\n                                                                          </li>\n                                                                         <li class="divider">\n                                                                          </li>\n                                                                         <li>\n                                                                                  <a href="#" data-ng-click="deleteMessage()">\n                                                                                  <i class="icon-trash"></i> {{\'APPLICATION_DELETE\' | translate}} </a>\n                                                                                </li>\n                                                                 </ul>\n                                                         </div>\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 btn green" style="cursor: default;">\n                                                                           <i class="icon-magnifier" style="color: white;"></i>\n                                                                  </span>\n                                                               </div>\n                                                                <ui-select data-ng-model="conf.faxRoomsByPage" theme="bootstrap" style="width: 100px;" class="pull-right margin-right-10">\n                                                                    <ui-select-match placeholder="{{ \'APPLICATION_SEARCH\' | translate }}">{{$select.selected}}</ui-select-match>\n                                                                        <ui-select-choices repeat="p in [10, 20, 35, 50] | filter: $select.search">\n                                                                           <span ng-bind-html="p | highlight: $select.search"></span>\n                                                                    </ui-select-choices>\n                                                          </ui-select>\n                                                  </div>\n                                                </div>\n                                        </th>\n                         </tr>\n                 </thead>\n                      <tbody>\n                               <tr data-ng-repeat="faxRoom in displayedFaxRooms | orderBy:\'-updatedAt\'" data-ng-class="{unread: !faxRoom.read}" data-ng-click="go(\'/fax/inbox/room/\' + faxRoom.id, faxRoom.id, \'OPEN\')" class="animate-repeat">\n                                        <td class="inbox-small-cells" style="border: none;">\n                                          <input type="checkbox" class="checker" checklist-model="checkedMailMessages.id" checklist-value="faxRoom.id">\n                                 </td>\n                                 <!-- <td class="inbox-small-cells" style="border: none;">\n                                             <i class="fa fa-star" data-ng-class="{\'inbox-started\': faxRoom.favorite}" data-ng-click="markAsFavorite(faxRoom.id, faxRoom.favorite)"></i>\n                                 </td> -->\n                                     <td class="view-message hidden-xs" style="cursor:pointer; border:none;">\n                                              #{{faxRoom.id}}\n                                       </td>\n                                 <!-- <td class="inbox-small-cells" style="border: none;">\n                                             <i class="fa fa-star" data-ng-class="{\'inbox-started\': faxRoom.favorite}" data-ng-click="markAsFavorite(faxRoom.id, faxRoom.favorite)"></i>\n                                 </td> -->\n                                     <!-- <td class="view-message hidden-xs" style="cursor:pointer; border:none;">\n                                         {{faxRoom.subject}}\n                                   </td> -->\n                                     <td class="view-message" style="cursor:pointer; border:none;">\n                                                {{faxRoom.from}}\n                                      </td>\n                                 <td class="view-message" style="cursor:pointer; border:none;">\n                                                {{faxRoom.MailAccount.description ? faxRoom.MailAccount.description : faxRoom.MailAccount.name}}\n                                      </td>\n                                 <td class="view-message" style="cursor:pointer; border:none;" data-ng-switch="faxRoom.status">\n                                                <span class="badge badge-default" data-ng-class="{\n                                            \'badge-danger\': faxRoom.status == \'NEW\',\n                                          \'badge-warning\': faxRoom.status == \'OPEN\',\n                                                \'badge-info\': faxRoom.status == \'PENDING\',\n                                                \'badge-success\': faxRoom.status == \'CLOSED\'}"> {{faxRoom.status | uppercase}} </span>\n                                     </td>\n                                 <td class="view-message" style="cursor:pointer; border:none;">\n                                                <span class="badge badge-success badge-roundless" data-ng-show="faxRoom.User.fullname"> {{faxRoom.User.fullname}} </span>\n                                             <span class="badge badge-default badge-roundless" data-ng-hide="faxRoom.User.fullname"> {{\'APPLICATION_UNASSIGNED\' | translate}} </span>\n                                    </td>\n                                 <td class="view-message text-right" context-menu="menuOptions" style="border: none;">\n                                         <time is="relative-time" datetime="{{faxRoom.updatedAt}}">\n                                                    April 1, 2014\n                                         </time>\n                                       </td>\n                         </tr>\n                         <tr data-ng-hide="faxRooms.length">\n                                   <td colspan="6" class="text-center">\n                                          <i>{{\'MESSAGE_NO_AVAILABLE_MESSAGES\' | translate}}</i>\n                                      </td>\n                         </tr>\n                         <tr>\n                                  <td colspan="8" class="text-center" style="border: none;">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.faxRoomsByPage" st-displayed-pages="7"></div>\n                                    </td>\n                         </tr>\n                 </tbody>\n              </table>\n      </div>\n</div>\n'),a.put("app/fax/inbox/room/room.html",'<!-- BEGIN TODO CONTENT -->\n<div class="todo-content" data-ng-init="initRoomView()">\n        <div class="portlet light">\n           <!-- PROJECT HEAD -->\n         <div class="portlet-title">\n                   <div class="caption" data-ng-show="faxRoom">\n                          <i class="icon-bar-chart font-green-sharp hide"></i>\n                          <span class="badge badge-default" data-ng-class="{\'badge-error\': faxRoom.status == \'NEW\',\n                         \'badge-warning\': faxRoom.status == \'OPEN\',\n                                \'badge-info\': faxRoom.status == \'PENDING\',\n                                \'badge-success\': faxRoom.status == \'CLOSED\'}"> {{faxRoom.status | uppercase}} </span>\n                     </div>\n                        <div class="actions" data-ng-show="faxRoom">\n                          <div class="btn-group" data-ng-show="Auth.isAdmin()">\n                                 <a class="btn grey-salsa btn-circle btn-sm" href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                                   {{ \'APPLICATION_ASSIGN\' | translate }} <i class="fa fa-angle-down"></i>\n                                     </a>\n                                  <ul class="dropdown-menu pull-right">\n                                         <li data-ng-repeat="agent in agents">\n                                                 <a href="#" data-ng-click="assignAgent(agent.id)">\n                                                    {{agent.fullname}} <span class="badge badge-default"> {{agent.fullname | uppercase | limitTo : 1}} </span>\n                                                    </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <div class="btn-group">\n                                       <a class="btn green-haze btn-circle btn-sm" href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                                   {{ \'APPLICATION_STATUS\' | translate }} <i class="fa fa-angle-down"></i>\n                                     </a>\n                                  <ul class="dropdown-menu pull-right">\n                                         <li>\n                                                  <a href="#" data-ng-click="updateStatus(\'PENDING\')">\n                                                        {{\'STATUS_PENING\' | translate}} <span class="badge badge-danger">\n                                                   P </span>\n                                                     </a>\n                                          </li>\n                                         <li>\n                                                  <a href="#" data-ng-click="updateStatus(\'CLOSED\')">\n                                                 {{\'STATUS_CLOSED\' | translate}} <span class="badge badge-success">\n                                                  C </span>\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                        </div>\n                </div>\n                <!-- end PROJECT HEAD -->\n             <div class="portlet-body">\n                    <div class="row">\n                             <div data-ng-show="faxRoom" data-ng-class="{\'col-md-7 col-sm-7\': faxRoom}">\n                                 <div class="scroller" id="faxMessages" style="height: 500px; overflow-y: scroll; width: auto;" data-always-visible="1" data-rail-visible1="1" data-initialized="1">\n                                           <ul class="chats">\n                                                    <li data-ng-class="{\'in\': faxMessage.status == \'RECEIVED\', \'out\': (faxMessage.status == \'SENT\' || faxMessage.status == \'SENDING\' || faxMessage.status == \'FAILED\' || faxMessage.status == \'NOT SENT\')}" data-ng-repeat="faxMessage in faxRoom.FaxMessages | orderBy:\'createdAt\'">\n                                                     <img class="avatar" alt="" data-ng-src="api/users/avatar/{{getCurrentUser().userpic && faxMessage.status === \'SENT\' ? getCurrentUser().userpic : \'unknown_avatar\'}}">\n                                                     <div class="message">\n                                                         <span class="arrow">\n                                                          </span>\n                                                               <span class="bold">{{\'APPLICATION_FROM\' | translate}}: </span>\n                                                              <span>{{faxMessage.From.fullname}} </span>\n                                                            <span> &#60;{{faxMessage.From.phone}}&#62; </span>\n                                                            <br>\n                                                          <span class="bold">{{\'APPLICATION_TO\' | translate}}: </span>\n                                                                <span>{{faxMessage.To.fullname}} </span>\n                                                              <span> &#60;{{faxMessage.To.phone}}&#62; </span>\n                                                              <br>\n                                                          <span class="todo-tasklist-date">\n                                                                     <i class="fa fa-calendar"></i>\n                                                                        <time is="relative-time" datetime="{{faxMessage.createdAt}}">\n                                                                         April 1, 2014\n                                                                 </time>\n                                                               </span>\n                                                               <span data-ng-show="faxMessage.status == \'FAILED\' || faxMessage.status == \'SENDING\'" class="badge badge-default" data-ng-class="{\'badge-error\': faxMessage.status == \'FAILED\', \'badge-warning\': faxMessage.status == \'SENDING\'}"> {{faxMessage.status | uppercase}} </span>\n                                                               <br>\n                                                          <br>\n                                                          <span class="body">\n                                                                   <div class="wrapper" ng-controller="FaxInboxRoomCtrl" style="max-height:600px; overflow:auto;">\n                                                 <ng-pdf pdf-url="/api/fax/messages/{{faxMessage.id}}/content" template-url="/assets/plugins/angular-pdf/example/partials/viewer.html" scale="0.5" page=1></ng-pdf>\n                                          </div>\n                                                                </span>\n                                                               <br>\n                                                  </div>\n                                                </li>\n                                         </ul>\n                                 </div>\n                                </div>\n                                <div data-ng-class="{\'col-md-5 col-sm-5\': faxRoom, \'col-md-12 col-sm-12\': !faxRoom}">\n                                     <form name="forms.compose" data-ng-submit="forms.compose.$valid && sendFax()" class="form-horizontal" novalidate>\n                                             <!-- TASK HEAD -->\n                                            <div class="form">\n                                                    <div class="form-group">\n                                                              <div class="col-md-12 col-sm-12">\n                                                                     <div class="todo-taskbody-user">\n                                                                              <img class="todo-userpic pull-left" data-ng-src="api/users/avatar/{{getCurrentUser().userpic ? getCurrentUser().userpic : \'unknown_avatar\'}}" width="50px" height="50px">\n                                                                           <span class="todo-username pull-left">{{ getCurrentUser().fullname }}</span>\n                                                                  </div>\n                                                                </div>\n                                                        </div>\n                                                        <!-- END TASK HEAD -->\n\n                                                      <!-- FAX FROM -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.compose.from.$invalid && forms.compose.$submitted}">\n                                                             <div class="col-md-12">\n                                                                       <div class="row">\n                                                                             <div class="col-md-1">\n                                                                                        <label class="control-label">{{\'APPLICATION_FROM\' | translate}}:</label>\n                                                                            </div>\n                                                                                <div class="col-md-11">\n                                                                                       <ui-select data-ng-model="form.from" theme="bootstrap" name="from" required ng-disabled="disabled">\n                                                                                           <ui-select-match placeholder="{{\'APPLICATION_FROM\' | translate}}...">{{$select.selected.name}} - {{$select.selected.phone}}</ui-select-match>\n                                                                                               <ui-select-choices repeat="faxAccount in faxAccounts | filter: $select.search">\n                                                                                                       <div ng-bind-html="faxAccount.name | highlight: $select.search"></div>\n                                                                                                        <small ng-bind-html="faxAccount.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\n                                                      <!-- FAX TO -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.compose.to.$invalid && forms.compose.$submitted}">\n                                                               <div class="col-md-12">\n                                                                       <div class="row">\n                                                                             <div class="col-md-1">\n                                                                                        <label class="control-label">{{\'APPLICATION_TO\' | translate}}:</label>\n                                                                              </div>\n                                                                                <div class="col-md-11">\n                                                                                       <ui-select tagging tagging-label="" multiple required data-ng-model="form.sto" theme="bootstrap" name="to" ng-disabled="disabled">\n                                                                                            <ui-select-match placeholder="{{\'APPLICATION_TO\' | translate}}...">{{$item}}</ui-select-match>\n                                                                                              <ui-select-choices repeat="to in form.to | filter:$select.search">\n                                                                                                    {{to}}\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\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\n                                                      <!-- TASK DESC -->\n                                                    <div class="form-group">\n                                                              <div class="col-md-12">\n                                                                       <!-- <textarea class="form-control todo-taskbody-taskdesc" rows="8" data-ng-model="form.text" name="text" style="resize: none;"></textarea> -->\n                                                                       <div class="inbox-editor inbox-wysihtml5" text-angular data-ng-model="form.html" name="html"></div>\n                                                           </div>\n                                                        </div>\n                                                        <!-- END TASK DESC -->\n\n                                                      <!-- START ATTACH -->\n                                                 <div class="form-group">\n                                                              <div class="col-md-6">\n                                                                        <input type="file" nv-file-select uploader="uploader" name="file">\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 class="col-md-6">\n                                                                        <div class="form-actions right todo-form-actions">\n                                                                            <button class="btn btn-circle btn-sm green-haze">{{ \'APPLICATION_SEND\' | translate }}</button>\n                                                                              <input type="button" name="cancel" value="{{ \'APPLICATION_CANCEL\' | translate }}" class="btn btn-circle btn-sm btn-default" data-ng-click="cancel()">\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/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="icon-paper-plane"></i>\n                                              <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n                                         <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-layers"></i>\n                                           <a href="/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">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-layers 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="faxQueues.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/fax/queues/wizard">\n                                                         <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getFaxQueues([\'name\', \'description\', \'timeout\', \'strategy\'])" csv-header="[\'Name\', \'Description\', \'Timeout\', \'Strategy\']" field-separator=";" filename="fax_queues.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="displayedFaxQueues" 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.queuesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="queueByPage in queuesByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="queueByPage.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(queue, checked)" checklist-model checklist-value="id"></th>\n                                                                <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="strategy">{{ \'APPLICATION_STRATEGY\' | translate}}</th>\n                                                         <th st-sort="timeout">{{ \'APPLICATION_AGENT_TIMEOUT\' | translate }}</th>\n                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                  </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="queue in displayedFaxQueues" class="animate-repeat">\n                                                          <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="faxQueues.checked" checklist-value="queue.id"></td>\n                                          <td>{{queue.name}}</td>\n                                                         <td>{{queue.description}}</td>\n                                                                <td>{{queue.strategy | uppercase}}</td>\n                                                               <td>{{queue.timeout}}</td>\n                                          <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/fax/queues/view/{{queue.id}}/settings">\n                                                                              {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(queue.name, queue.id)">\n                                                                            {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedFaxQueues.length">\n                                                         <td colspan="6" class="text-center">\n                                                                  <i>No available queues</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="strategy" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_STRATEGY\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                             <td/>\n                                                         <td/>\n                                           </tr>\n                                           <tr>\n                                            <td colspan="67" class="text-center">\n                                           <div st-pagination class="pagination" st-items-by-page="conf.queuesByPage.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/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" style="width: 50%; margin: 0 auto;">\n                                <!-- BEGIN FORM-->\n                            <form action="index.html" class="form-horizontal form-row-seperated">\n                                 <div class="form-body text-center">\n                                           <div class="form-group last">\n                                                 <div class="col-md-9" 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/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="icon-paper-plane"></i>\n                                      <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-layers"></i>\n                                   <a href="/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.fax.queues.view.settings\')}">\n                                                   <a data-ng-href="/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.fax.queues.view.agents\')}">\n                                                     <a data-ng-href="/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/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" 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 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">{{\'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 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                                         <!-- <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="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 [\'rrmemory\',\'beepall\'] | 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 HEADER SHAPE -->\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/fax/queue/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-paper-plane"></i>\n                              <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n        <i class="fa fa-angle-right"></i>\n                      </li>\n      <li>\n                             <i class="icon-layers"></i>\n                           <a href="/fax/queues/list">{{ \'APPLICATION_QUEUES\' | 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-layers font-green-sharp"></i>\n                          <span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }} WIZARD</a> </span>\n             </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                                        <form name="forms.general" data-ng-submit="forms.general.$valid && createItem()" 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.$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 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 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_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/>\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                                               </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}}<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 [\'rrmemory\',\'beepall\'] | 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="(forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid && 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                                         <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </form>\n                         </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\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/fax/timeline/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-paper-plane"></i>\n                                              <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n                                         <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-list"></i>\n                                             <a href="/fax/timeline/list"> {{\'APPLICATION_TIMELINE\' | translate}}</a>\n                                    </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initList()">\n     <div class="col-md-12">\n    <h3 class="page-title">\n                          {{\'APPLICATION_TIMELINE\' | translate}}\n                      </h3>\n                 <!-- END PAGE HEADER-->\n                       <!-- BEGIN PAGE CONTENT-->\n                    <div class="timeline">\n                                <!-- TIMELINE ITEM -->\n                                <div class="timeline-item" data-ng-repeat="event in events | orderBy:\'-id\'">\n                                        <div class="timeline-badge">\n                                          <div class="timeline-icon">\n                                                   <i class="icon-paper-plane font-green-haze"></i>\n                                              </div>\n                                        </div>\n                                        <div class="timeline-body">\n                                           <div class="timeline-body-arrow"></div>\n                                               <div class="timeline-body-head">\n                                                      <div class="timeline-body-head-caption">\n                                                              <span class="timeline-body-alerttitle" data-ng-class="{\'font-red\': event.name == \'INCOMING\', \'font-blue\': event.name == \'ATTEMPT\', \'font-green\': event.name == \'TAKEN\'}">{{event.name | uppercase}}</span>\n                                                                <span class="timeline-body-time font-grey-cascade">{{\'APPLICATION_AT\' | translate}} {{event.createdAt | date:\'yyyy-MM-dd HH:mm:ss\'}}</span>\n                                                       </div>\n                                                        <div class="timeline-body-head-actions">\n                                                              <div class="btn-group">\n                                                                       <a class="btn btn-circle btn-sm dropdown-toggle btn-success" href="/fax/inbox/room/{{event.FaxRoomId}}">{{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_FAX\' | translate}}</a>\n                                                         </div>\n                                                        </div>\n                                                </div>\n                                                <div class="timeline-body-content">\n                                                   <span class="font-grey-cascade" data-ng-show="event.User">\n                                                    {{event.FaxRoom.subject ? event.FaxRoom.subject + \' - \' : \'\'}}<a href="/agents/view/{{event.UserId}}/account">{{event.User.fullname}}</a>\n                                                 </span>\n                                               </div>\n                                        </div>\n                                </div>\n                                <!-- END TIMELINE ITEM -->\n                    </div>\n                        <!-- END PAGE CONTENT-->\n      </div>\n</div>\n<!-- END PAGE CONTENT-->\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/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-clock"></i>\n                                    <a href="/intervals/list">{{ \'APPLICATION_INTERVALS\' | 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-clock 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="intervals.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }} <i class="fa fa-angle-down"></i>\n                                             </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/intervals/wizard">\n                                                          <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getIntervals([\'name\'])" csv-header="[\'Name\']" field-separator=";" filename="intervals.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="displayedIntervals" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                       <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="3">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.intervalsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                             <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="intervalByPage in intervalsByPage | filter: $select.search">\n                                                                                                       <div ng-bind-html="intervalByPage.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(interval, checked)" checklist-model checklist-value="id"></th>\n                                                 <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="interval in displayedIntervals">\n                                                              <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="intervals.checked" checklist-value="interval.id"></td>\n                                                         <td>{{interval.name}}</td>\n                                          <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/intervals/view/{{interval.id}}/settings">\n                                                                            {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(interval.name,interval.id)">\n                                                                               {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedIntervals.length">\n                                                         <td colspan="3" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}</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                                                  </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="3" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.intervalsByPage.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/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-clock"></i>\n                                    <a href="/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.intervals.view.settings\')}">\n                                                    <a data-ng-href="/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.intervals.view.subintervals\') || $state.is(\'main.intervals.view.subinterval\') || $state.is(\'main.intervals.view.subintervals.settings\')}">\n                                                  <a data-ng-href="/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/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                                                   <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/interval/view/view.subinterval.html",'\n<div class="row" data-ng-init="initSubInterval()">\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="createItem()">\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"><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="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\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="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\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}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{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}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\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="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\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/interval/view/view.subintervalSettings.html",'\n<div class="row" data-ng-init="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="updateItem()">\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="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"><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="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\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="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\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}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{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}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\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="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\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="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\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/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="/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                          <table class="table table-striped table-bordered table-hover">\n                                          <thead>\n                                               <tr>\n                                                    <th>{{ \'APPLICATION_NAME\' | translate }}</th>\n                                               <th>{{ \'APPLICATION_TIME\' | translate }}</th>\n                                                           <th width="20%">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                  </tr>\n                                         </thead>\n                                      <tbody data-ng-model="subIntervals">\n                                            <tr data-ng-repeat="subinterval in subIntervals">\n                                                         <td>{{subinterval.name}}</td>\n                                                         <td>{{subinterval.interval}}</td>\n                                           <td>\n                                                                    <a class="btn default btn-xs blue-stripe" data-ng-href="/intervals/view/{{interval.id}}/subintervals/settings/{{subinterval.id}}">\n                                                                            {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(subinterval.name+\' interval\',subinterval.id)">\n                                                                           {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="subIntervals.length">\n                                                               <td colspan="3" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_SUBINTERVALS_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'),
@@ -28,7 +27,7 @@ a.put("app/mail/template/view/view.agents.html",'<div class="row" data-ng-init="
 a.put("app/motionbar/motionbar.chat.html",'<div data-ng-include="\'components/quickSidebar/quickSidebar.html\'" data-ng-controller="QuickSidebarController" class="page-quick-sidebar-wrapper" style="margin-top: -92px;"></div>\n'),a.put("app/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      <a href="" class="fullscreen">\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 controls ng-src="{{getSecureSrc(audioSources[sound.id])}}" preload="none">\n            {{ \'MESSAGE_AUDIO_NOT_SUPPORTED\' | translate }}\n          </audio>\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" tooltip-html-unsafe="<ul class=\'list-unstyled\'><li><b>Format : </b>{{sound.original_format}}</li><li><b>Duration : </b>{{sound.original_duration | date: \'mm:ss\'}}</li><li><b>Channels : </b>{{sound.original_channelCount}}</li><li><b>Bitrate : </b>{{sound.original_bitRate/1024}} kbs</li><li><b>Sample Rate : </b>{{sound.original_sampleRate/1000}} KHz</li></ul>"><i class="icon-list"></i></button>\n            <a class="btn btn-xs blue-hoki" href="{{getSecureDownloadSrc(audioSources[sound.id])}}" download="{{sound.name+\'.\'+sound.original_format}}" target="_self" tooltip="Download"><i class="icon-cloud-download"></i></a>\n            <button 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</div>\n<!-- End Audio Portlets -->\n'),a.put("app/sound/sound.html","<!-- BEGIN PAGE CONTENT-->\n<div ui-view></div>\n<!-- END PAGE CONTENT-->\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="icon-docs"></i>\n                                     <a href="/square/odbcs/list">{{ \'APPLICATION_ODBCS\' | 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-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="Odbcs.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ODBC\' | translate }} <i class="fa fa-angle-down"></i>\n                                         </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/square/odbcs/wizard">\n                                                               <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getOdbcs([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="square_odbcs.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="displayedOdbcs" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                   <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="4">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.odbcsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="odbcByPage in odbcsByPage | filter: $select.search">\n                                                                                                       <div ng-bind-html="odbcByPage.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(odbc, checked)" checklist-model checklist-value="id"></th>\n                                             <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="odbc in displayedOdbcs" class="animate-repeat">\n                                                               <td style="text-align: center; vertical-align: middle"><input data-ng-hide="odbc.defaultEntry" type="checkbox" checklist-model="Odbcs.checked" checklist-value="odbc.id"></td>\n                                                                <td>{{odbc.name}}</td>\n                                              <td>{{odbc.description}}</td>\n                                         <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/square/odbcs/view/{{odbc.id}}/settings" data-ng-class="{\'disabled\': odbc.defaultEntry}">\n                                                                           {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(odbc.name,odbc.id)" data-ng-class="{\'disabled\': odbc.defaultEntry}">\n                                                                             {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedOdbcs.length">\n                                                             <td colspan="4" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_ODBCS_AVAILABLE\' | translate }}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="4" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.odbcsByPage.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/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="icon-docs"></i>\n                                     <a href="/square/odbcs/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.odbcs.view.settings\')}">\n                                                 <a data-ng-href="/square/odbcs/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_DSN\' | 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                                                              <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/odbc/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-docs"></i>\n                             <a href="/square/odbcs/list">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n                              <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/square/odbcs/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">\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_ODBC\' | translate }} WIZARD</a> </span>\n               </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.odbc.$valid)">\n                            <form name="forms.odbc" novalidate>\n\n                           <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.odbc.name.$touched || forms.odbc.$submitted) && forms.odbc.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.odbc.name.$touched || forms.odbc.$submitted) && forms.odbc.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_DSN\' | 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="item.dsn" required/>\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="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\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/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-slack"></i>\n          <a href="/square/projects/list">{{ \'APPLICATION_PROJECTS\' | 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-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="Projects.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }} <i class="fa fa-angle-down"></i>\n                                              </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/square/projects/wizard">\n                                                            <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getProjects([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="square_projects.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="displayedProjects" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                        <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="4">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.projectsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="projectByPage in projectsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="projectByPage.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(agent, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="project in displayedProjects" class="animate-repeat">\n                                                         <td style="text-align: center; vertical-align: middle"><input data-ng-hide="project.defaultEntry" type="checkbox" checklist-model="Projects.checked" checklist-value="project.id"></td>\n                                                               <td>{{project.name}}</td>\n                                           <td>{{project.description}}</td>\n                                              <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/square/projects/view/{{project.id}}" data-ng-class="{\'disabled\': project.defaultEntry}">\n                                                                           {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(project.name,project.id)" data-ng-class="{\'disabled\': project.defaultEntry}">\n                                                                            {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedProjects.length">\n                                                          <td colspan="4" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="4" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.projectsByPage.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/square/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-superscript"></i>\n                                             <a href="/square/projects">{{ \'APPLICATION_CALLYSQUARE\' | translate }}</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">{{ \'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                </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/square/project/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-docs"></i>\n                             <a href="/square/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n                                <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/square/projects/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">\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_PROJECT\' | translate }} WIZARD</a> </span>\n            </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.project.$valid)">\n                         <form name="forms.project" novalidate>\n\n                        <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.project.name.$touched || forms.project.$submitted) && forms.project.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.project.name.$touched || forms.project.$submitted) && forms.project.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                            <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/tag/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="forms.tag" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.tag.name.$touched || forms.tag.$submitted) && forms.tag.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.tag.name.$touched || forms.tag.$submitted) && forms.tag.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.tag.$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/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-tag"></i>\n                                      <a href="/tags/list">{{ \'APPLICATION_TAGS\' | 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-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="Tags.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                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TAG\' | translate }}\n                                           </button>\n                                     </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getTags([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="tags.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="displayedTags" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                    <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="4">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.tagsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="tagByPage in tagsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="tagByPage.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(tag, checked)" checklist-model checklist-value="id"></th>\n                                              <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="tag in displayedTags" class="animate-repeat">\n                                                         <td style="text-align: center; vertical-align: middle"><input data-ng-hide="tag.defaultEntry" type="checkbox" checklist-model="Tags.checked" checklist-value="tag.id"></td>\n                                                           <td>{{tag.name}}</td>\n                                       <td>{{tag.description}}</td>\n                                          <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/tags/view/{{tag.id}}/settings" data-ng-class="{\'disabled\': tag.defaultEntry}">\n                                                                             {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(tag.name,tag.id)" data-ng-class="{\'disabled\': tag.defaultEntry}">\n                                                                                {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedTags.length">\n                                                              <td colspan="4" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_TAGS_AVAILABLE\' | translate }}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="4" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.tagsByPage.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/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-tag"></i>\n                                      <a href="/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.tags.view.settings\')}">\n                                                 <a data-ng-href="/tags/view/{{tag.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/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                            <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/>\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="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/team/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-shield"></i>\n                                           <a href="#">{{ \'APPLICATION_TEAMS\' | 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">\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="teams.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEAM\' | translate }} <i class="fa fa-angle-down"></i>\n                                         </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <!-- <li>\n                                                             <a href="#">\n                                                          <i class="icon-user"></i> {{ \'APPLICATION_QUICK\' | translate }} </a>\n                                                        </li> -->\n                                                     <li>\n                                                          <a href="/teams/wizard">\n                                                              <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                                 <!-- <li>\n                                                             <a href="#">\n                                                          <i class="icon-users"></i> {{ \'APPLICATION_BULK\' | translate }} </a>\n                                                        </li> -->\n                                             </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getTeams([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="teams.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="displayedTeams" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                   <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="5">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.teamsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="teamByPage in teamsByPage | filter: $select.search">\n                                                                                                       <div ng-bind-html="teamByPage.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(agent, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="team in displayedTeams" class="animate-repeat">\n                                                               <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="teams.checked" checklist-value="team.id"></td>\n                                       <td>{{team.name}}</td>\n                                                          <td>{{team.description}}</td>\n                                       <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/teams/view/{{team.id}}/settings" data-ng-class="{\'disabled\': team.defaultEntry}">\n                                                                          {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(team.name, team.id)" data-ng-class="{\'disabled\': team.defaultEntry}">\n                                                                            {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n              <tr data-ng-hide="displayedTeams.length">\n                                                            <td colspan="5" style="text-align:center;">\n                                                                   <i>No teams 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td>\n                                                  </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="5" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.teamsByPage.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/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-9" 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/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-shield"></i>\n                                   <a href="/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.teams.view.settings\')}">\n                                                        <a data-ng-href="/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.teams.view.agents\')}">\n                                                  <a data-ng-href="/teams/view/{{team.id}}/agents">\n                                                     <i class="icon-users"></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/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/team/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-shield"></i>\n                                           <a href="/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n                                      </li>\n          <li>\n                                         <i class="icon-user-following"></i>\n                                           <a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                                      </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div id="team" class="row" data-ng-init="getAgents()">\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_TEAM\' | translate }} WIZARD</a> </span>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_TEAM_INFO\' | translate}}" canexit="formValidation(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.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\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 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/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-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">\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="Triggers.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRIGGER\' | translate }} <i class="fa fa-angle-down"></i>\n                                              </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/triggers/wizard">\n                                                           <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getTriggers([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="triggers.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="displayedTriggers" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.TriggersByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="TriggerByPage in TriggersByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="TriggerByPage.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 st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th> -->\n                                                              <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(Trigger, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                            <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                          <th st-sort="channel">{{ \'APPLICATION_CHANNEL\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_STATUS\' | translate }}</th>\n                                                             <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="Trigger in displayedTriggers">\n                                                                <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="Triggers.checked" checklist-value="Trigger.id"></td>\n                                         <td>{{Trigger.name}}</td>\n                                                               <td>{{Trigger.description}}</td>\n                                                              <td>{{Trigger.channel | capitalize}}</td>\n                                                             <td>\n                                                                  <input\n                                                                                data-ng-change="updateItem(Trigger.id, Trigger.status)",\n                                                                  bs-switch\n                                                             ng-model="Trigger.status"\n                                                             type="checkbox"\n                                                               switch-active="{{ isActive }}"\n                                                                switch-on-text="{{ onText }}"\n                                                                 switch-off-text="{{ offText }}"\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                                                          </td>\n                                       <td>\n                                                                    <a class="btn default btn-xs blue-stripe" data-ng-href="/triggers/view/{{Trigger.id}}/settings">\n                                                                              {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(Trigger.name, Trigger.id)">\n                                                                                {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedTriggers.length">\n                                                          <td colspan="6" class="text-center">\n                                                                  <i>No available triggers</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_USERNAME\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="channel" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_CHANNEL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\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="conf.TriggersByPage.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/trigger/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView();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-bulb"></i>\n                                     <a href="/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.triggers.view.settings\')}">\n                                                     <a href="/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/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                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\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 && updateTrigger()" 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="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 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                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n                                      <!-- <pre>\n                                            {{conditionsFilter | json}}\n                                   </pre> -->\n\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_CONDITIONS\' | translate }}</a> </span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="conditionsFilter.group" fields="fields.conditions" operators="$triggers.operators"></query-builder>\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="actionsFilter.group" fields="fields.actions" properties="properties[trigger.channel]"></query-builder>\n                                                  </div>\n                                                </div>\n\n                                              <input class="btn green-haze" type="button" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-click="updateTrigger()"/>\n                                  </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/trigger/wizard/wizard.html",'\n<div class="row" data-ng-init="getProperties()">\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-bulb"></i>\n                                     <a href="/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</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                                                        <!-- 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 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                                                    <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            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}">\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group"  >\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                                                          </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_CONDITIONS\' | translate }}</a> </span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="conditionsFilter.group" fields="fields.conditions" operators="$triggers.operators"></query-builder>\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 }}</a> </span>\n                                                           </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <query-builder group="actionsFilter.group" fields="fields.actions" properties="properties[item.channel]"></query-builder>\n                                                     </div>\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="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\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/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-link"></i>\n                                     <a href="/trunks/list">{{ \'APPLICATION_TRUNKS\' | 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-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="trunks.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRUNK\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/trunks/wizard">\n                                                             <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getTrunks([\'name\', \'host\', \'context\', \'description\'])" csv-header="[\'Name\', \'Host\', \'Context\', \'Description\']" field-separator=";" filename="trunks.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="displayedTrunks" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.trunksByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="trunkByPage in trunksByPage | filter: $select.search">\n                                                                                                     <div ng-bind-html="trunkByPage.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(trunk, checked)" checklist-model checklist-value="id"></th>\n                                                    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="host">{{ \'APPLICATION_HOST\' | translate }}</th>\n                                                            <th st-sort="context">{{ \'APPLICATION_CONTEXT\' | translate }}</th>\n                                              <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="trunk in displayedTrunks" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="trunks.checked" checklist-value="trunk.id"></td>\n                                                               <td>{{trunk.name}}</td>\n                <td>{{trunk.host}}</td>\n                                                              <td>{{trunk.context}}</td>\n                                          <td>{{trunk.description}}</td>\n                                        <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/trunks/view/{{trunk.id}}/settings">\n                                                                          {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(trunk.name,trunk.id)">\n                                                                             {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedTrunks.length">\n                                                            <td colspan="6" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}</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="host" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_HOST\' | 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="context" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_CONTEXT\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\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="conf.trunksByPage.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/trunk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTrunk()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-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-link"></i>\n                                     <a href="/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                                        <!-- <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.trunks.view.settings\')}">\n                                                       <a data-ng-href="/trunks/view/{{trunk.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/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                         </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" 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                                                     <div class="row">\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_NEW_SECRET\' | translate}}</label>\n                                                               <input type="password" name="secret" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | 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 CONFIRM SECRET -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.rsecret.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_CONFIRM_SECRET\' | translate}}</label>\n                                                           <input type="password" name="rsecret" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="trunk.rsecret" nx-equal="trunk.secret"/>\n                                                             <span data-ng-show="forms.general.$submitted && (forms.general.rsecret.$invalid || forms.general.rsecret.$invalid)" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONFIRM 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" placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="trunk.callerid" required/>\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                                                <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}}<span class="required" aria-required="true">*</span></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                                                               <span data-ng-show="(forms.general.call-limit.$touched || forms.general.$submitted) && forms.general.call-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 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                                                        <!-- START LIMITONPEERS -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.limitonpeers.$touched || forms.advanced.$submitted) && forms.advanced.limitonpeers.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_LIMITONPEERS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <ui-select data-ng-model="trunk.limitonpeers" name="limitonpeers" 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_LIMITONPEERS\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.advanced.limitonpeers.$touched || forms.advanced.$submitted) && forms.advanced.limitonpeers.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END LIMITONPEERS -->\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                                        <!-- START OTHER FIELDS-->\n                                    <div class="form-group">\n                                              <label class="control-label">{{\'APPLICATION_OTHER_FIELDS\' | translate}}</label>\n                                             <textarea type="text" name="otherFields" placeholder="{{\'APPLICATION_OTHER_FIELDS\' | translate}}" class="form-control" 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\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/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-link"></i>\n                             <a href="/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}">\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.$submitted && forms.general.name.$invalid" 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 ROLE -->\n                                           <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.general.role.$touched || forms.general.$submitted) && forms.general.role.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_USAGE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <ui-select data-ng-model="item.role" name="role" theme="bootstrap" required>\n                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.value}}</ui-select-match>\n                                                             <ui-select-choices repeat="type.key as type in types | filter: $select.search">\n                                                                       <div ng-bind-html="type.value | highlight: $select.search"></div>\n                                                             </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_ROLE\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="(forms.general.role.$touched || forms.general.$submitted) && forms.general.role.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div> -->\n                                            <!-- END ROLE -->\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}}<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.secret" required/>\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 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_SECRET\' | 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.secret" required/>\n                                                  <span data-ng-show="forms.general.$submitted && (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 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/update/list/checkout/checkout.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("app/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-cloud-download"></i>\n                                   <a href="/updates/list">{{ \'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-icon-only btn-default" href="#" data-ng-click="pull()">\n                                             <i class="icon-cloud-download"></i>\n                                   </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body" data-ng-init="initList()">\n                          <!-- BEGIN TABLE -->\n                                  <table st-table="displayedUpdates" st-safe-src="updates" class="table table-striped table-bordered table-hover">\n                                              <div class="table-responsive">\n                                                  <thead>\n                                                             <tr>\n                                                                  <th colspan="3">\n                                                                              <div class="row">\n                                                                                     <div class="col-md-12">\n                                                                                               <ui-select class="input-xsmall" ng-model="conf.updatesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                                     <ui-select-choices repeat="updateByPage in updatesByPage | filter: $select.search">\n                                                                                                           <div ng-bind-html="updateByPage.name | highlight: $select.search"></div>\n                                                                                                      </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                  </div>\n                                                                                </div>\n                                                                        </th>\n                                                         </tr>\n                                                         <tr>\n                                                                  <th st-sort="message">{{ \'APPLICATION_MESSAGE\' | translate }}</th>\n                                                                  <th>{{ \'APPLICATION_DATE\' | translate }}</th>\n                                                                       <!-- <th class="small-cells"></th> -->\n                                                          </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="update in displayedUpdates">\n                                                                  <td>\n                                                                          {{update.message | truncate: 30 : \'...\': true}}\n                                                                     </td>\n                                                                 <td>\n                                                                          <time is="relative-time" datetime="{{update.date}}">\n                                                                                  April 1, 2014\n                                                                         </time>\n                                                                       </td>\n                                                                 <!-- <td>\n                                                     <a class="btn default btn-xs green-stripe" href="#" data-ng-click="checkout(update.hash)">\n                                                                                    <i class="icon-cloud-download"></i> {{ \'APPLICATION_CHECKOUT\' | translate }}\n                                                        </a>\n                                                </td> -->\n                                                   </tr>\n                                                             <tr data-ng-hide="displayedUpdates.length">\n                                                                   <td colspan="9" style="text-align:center;">\n                                                                           <i>{{\'MESSAGE_NO_AVAILABLE_UPDATES\' | translate}}</i>\n                                                                       </td>\n                                                         </tr>\n                                           </tbody>\n                                              <tfoot>\n                                                             <tr>\n                                                                  <td colspan="1">\n                                                                              <div class="input-icon right">\n                                                                                        <i class="fa fa-search"></i>\n                                                                                  <input st-search="message" placeholder="{{ \'APPLICATION_MESSAGE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                            </div>\n                                                                        <td colspan="9"></td>\n                                                   </tr>\n                                                   <tr>\n                                                    <td colspan="10" class="text-center">\n                                                                           <div class="pagination" st-pagination st-items-by-page="conf.updatesByPage.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/update/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 data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\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()">\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() || update.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && update.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()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\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.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | 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="update.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="update.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 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="update.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 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="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="update.internal" required disabled/>\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                                                       <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()" 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 src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" 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() || update.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && update.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()" 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="update.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="update.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 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="update.reNewPwd" nx-equal="update.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/update/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-people"></i>\n                                   <a href="/updates/list">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{update.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/{{update.userpic ? update.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                                          {{update.fullname}}\n                                   </div>\n                                        <div class="profile-usertitle-job">\n                                           {{update.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.updates.view.account\')}">\n                                                       <a data-ng-href="/updates/view/{{update.id}}/account">\n                                                        <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | 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/update/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-people"></i>\n                           <a href="/updates/list">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n                         <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/updates/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" 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_UPDATE\' | 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_NAME\' | 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" required ng-remote-validate="/api/updates/validate/name"/>\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                             </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 ng-remote-validate="/api/updates/validate/email"/>\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                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.ngRemoteValidate" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_EMAIL\' | 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" required/>\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" ng-remote-validate="/api/updates/validate/internal"/>\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                                                       <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                             <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 ACCOUNTCODE -->\n                                            <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_ACCOUNTCODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                  <input type="number" name="accountcode" placeholder="{{\'APPLICATION_ACCOUNTCODE\' | translate}}" class="form-control" data-ng-model="item.accountcode" required/>\n                                                    <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="(forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div> -->\n                                            <!-- END ACCOUNTCODE -->\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 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="item.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 ng-model="item.nat" name="nat" theme="bootstrap" ng-disabled="disabled">\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\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="item.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="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 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/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-link"></i>\n                             <a href="/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}">\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.$submitted && forms.general.name.$invalid" 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 ROLE -->\n                                           <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.general.role.$touched || forms.general.$submitted) && forms.general.role.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_USAGE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <ui-select data-ng-model="item.role" name="role" theme="bootstrap" required>\n                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.value}}</ui-select-match>\n                                                             <ui-select-choices repeat="type.key as type in types | filter: $select.search">\n                                                                       <div ng-bind-html="type.value | highlight: $select.search"></div>\n                                                             </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_ROLE\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="(forms.general.role.$touched || forms.general.$submitted) && forms.general.role.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div> -->\n                                            <!-- END ROLE -->\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}}<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.secret" required/>\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 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_SECRET\' | 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.secret" required/>\n                                                  <span data-ng-show="forms.general.$submitted && (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 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/update/list/checkout/checkout.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("app/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-cloud-download"></i>\n                                   <a href="/updates/list">{{ \'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="initList()">\n                          <!-- BEGIN TABLE -->\n                                  <table st-table="displayedUpdates" st-safe-src="updates" class="table table-striped table-bordered table-hover">\n                                              <div class="table-responsive">\n                                                  <thead>\n                                                             <tr>\n                                                                  <th colspan="3">\n                                                                              <div class="row">\n                                                                                     <div class="col-md-12">\n                                                                                               <ui-select class="input-xsmall" ng-model="conf.updatesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                                     <ui-select-choices repeat="updateByPage in updatesByPage | filter: $select.search">\n                                                                                                           <div ng-bind-html="updateByPage.name | highlight: $select.search"></div>\n                                                                                                      </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                  </div>\n                                                                                </div>\n                                                                        </th>\n                                                         </tr>\n                                                         <tr>\n                                                                  <th st-sort="message">{{ \'APPLICATION_MESSAGE\' | translate }}</th>\n                                                                  <th>{{ \'APPLICATION_DATE\' | translate }}</th>\n                                                                       <!-- <th class="small-cells"></th> -->\n                                                          </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="update in displayedUpdates">\n                                                                  <td>\n                                                                          {{update.message | truncate: 30 : \'...\': true}}\n                                                                     </td>\n                                                                 <td>\n                                                                          <time is="relative-time" datetime="{{update.date}}">\n                                                                                  April 1, 2014\n                                                                         </time>\n                                                                       </td>\n                                                                 <!-- <td>\n                                                     <a class="btn default btn-xs green-stripe" href="#" data-ng-click="checkout(update.hash)">\n                                                                                    <i class="icon-cloud-download"></i> {{ \'APPLICATION_CHECKOUT\' | translate }}\n                                                        </a>\n                                                </td> -->\n                                                   </tr>\n                                                             <tr data-ng-hide="displayedUpdates.length">\n                                                                   <td colspan="9" style="text-align:center;">\n                                                                           <i>{{\'MESSAGE_NO_AVAILABLE_UPDATES\' | translate}}</i>\n                                                                       </td>\n                                                         </tr>\n                                           </tbody>\n                                              <tfoot>\n                                                             <tr>\n                                                                  <td colspan="1">\n                                                                              <div class="input-icon right">\n                                                                                        <i class="fa fa-search"></i>\n                                                                                  <input st-search="message" placeholder="{{ \'APPLICATION_MESSAGE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                            </div>\n                                                                        <td colspan="9"></td>\n                                                   </tr>\n                                                   <tr>\n                                                    <td colspan="10" class="text-center">\n                                                                           <div class="pagination" st-pagination st-items-by-page="conf.updatesByPage.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/update/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 data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\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()">\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() || update.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && update.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()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\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.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | 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="update.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="update.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 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="update.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 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="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="update.internal" required disabled/>\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                                                       <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()" 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 src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" 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() || update.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && update.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()" 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="update.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="update.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 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="update.reNewPwd" nx-equal="update.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/update/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-people"></i>\n                                   <a href="/updates/list">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{update.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/{{update.userpic ? update.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                                          {{update.fullname}}\n                                   </div>\n                                        <div class="profile-usertitle-job">\n                                           {{update.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.updates.view.account\')}">\n                                                       <a data-ng-href="/updates/view/{{update.id}}/account">\n                                                        <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | 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/update/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-people"></i>\n                           <a href="/updates/list">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n                         <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/updates/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" 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_UPDATE\' | 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_NAME\' | 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" required ng-remote-validate="/api/updates/validate/name"/>\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                             </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 ng-remote-validate="/api/updates/validate/email"/>\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                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.ngRemoteValidate" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_EMAIL\' | 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" required/>\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" ng-remote-validate="/api/updates/validate/internal"/>\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                                                       <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                             <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 ACCOUNTCODE -->\n                                            <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_ACCOUNTCODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                  <input type="number" name="accountcode" placeholder="{{\'APPLICATION_ACCOUNTCODE\' | translate}}" class="form-control" data-ng-model="item.accountcode" required/>\n                                                    <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="(forms.voice.accountcode.$touched || forms.voice.$submitted) && forms.voice.accountcode.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div> -->\n                                            <!-- END ACCOUNTCODE -->\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 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="item.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 ng-model="item.nat" name="nat" theme="bootstrap" ng-disabled="disabled">\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\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="item.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="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 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/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-eye"></i>\n                                      <a href="/users/list">{{ \'APPLICATION_USERS\' | 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-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="users.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_USER\' | translate }} <i class="fa fa-angle-down"></i>\n                                         </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/users/wizard">\n                                                              <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getUsers([\'name\', \'fullname\', \'email\'])" csv-header="[\'Username\', \'Fullname\', \'Email\']" field-separator=";" filename="users.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 id="table" st-table="displayedUsers" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.usersByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="userByPage in usersByPage | filter: $select.search">\n                                                                                                       <div ng-bind-html="userByPage.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(user, checked)" checklist-model checklist-value="id"></th>\n                                             <th st-sort="fullname">{{ \'APPLICATION_FULLNAME\' | translate }}</th>\n                                                <th st-sort="name">{{ \'APPLICATION_USERNAME\' | translate }}</th>\n                                                    <th st-sort="email">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                          <th st-sort="role">{{ \'APPLICATION_ROLE\' | translate }}</th>\n                                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="user in displayedUsers" class="animate-repeat">\n                                                               <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="users.checked" checklist-value="user.id"></td>\n                                                         <td>{{user.fullname}}</td>\n                                          <td>{{user.name}}</td>\n                                        <td><a ng-href="mailto:{{user.email}}">{{user.email}}</a></td>\n                                                          <td>{{user.role}}</td>\n                                              <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/users/view/{{user.id}}/account">\n                                                                             {{ \'APPLICATION_PROFILE\' | translate }}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(user.fullname, user.id)">\n                                                                          {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedUsers.length">\n                                                             <td colspan="6" style="text-align:center;">\n                                                                   <i>No users 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="fullname" 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="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_USERNAME\' | 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="role" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_ROLE\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\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="conf.usersByPage.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/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                                                     <!-- 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_NAME\' | 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}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="user.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 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                                                  <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" 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 src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" 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" 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 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                                               <!-- <form action="#">\n                                                        <div class="form-group">\n                                                              <label class="control-label">Current Password</label>\n                                                         <input type="password" class="form-control"/>\n                                                 </div>\n                                                        <div class="form-group">\n                                                              <label class="control-label">New Password</label>\n                                                             <input type="password" class="form-control"/>\n                                                 </div>\n                                                        <div class="form-group">\n                                                              <label class="control-label">Re-type New Password</label>\n                                                             <input type="password" class="form-control"/>\n                                                 </div>\n                                                        <div class="margin-top-10">\n                                                           <a href="#" class="btn green-haze">Change Password </a>\n                                                               <a href="#" class="btn default">Cancel </a>\n                                                   </div>\n                                                </form> -->\n                                   </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/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-eye"></i>\n                                      <a href="/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.users.view.account\')}">\n                                                 <a data-ng-href="/users/view/{{user.id}}/account">\n                                                    <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | 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/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-eye"></i>\n                              <a href="/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="/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">\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 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_NAME\' | 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" required ng-remote-validate="/api/users/validate/name"/>\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                             </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 ng-remote-validate="/api/users/validate/email"/>\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                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.ngRemoteValidate" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_EMAIL\' | 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" required/>\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                            <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 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/variable/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="forms.variable" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.variable.name.$touched || forms.variable.$submitted) && forms.variable.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.variable.name.$touched || forms.variable.$submitted) && forms.variable.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.variable.$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/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-eye"></i>\n                                      <a href="/variables/list">{{ \'APPLICATION_VARIABLES\' | 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-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="Variables.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                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_VARIABLE\' | translate }}\n                                              </button>\n                                     </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getVariables([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="variables.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="displayedVariables" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                       <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="4">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.variablesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                             <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="variableByPage in variablesByPage | filter: $select.search">\n                                                                                                       <div ng-bind-html="variableByPage.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(variable, checked)" checklist-model checklist-value="id"></th>\n                                                 <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="variable in displayedVariables" class="animate-repeat">\n                                                               <td style="text-align: center; vertical-align: middle"><input data-ng-hide="variable.defaultEntry" type="checkbox" checklist-model="Variables.checked" checklist-value="variable.id"></td>\n                                                            <td>{{variable.name}}</td>\n                                          <td>{{variable.description}}</td>\n                                             <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/variables/view/{{variable.id}}/settings" data-ng-class="{\'disabled\': variable.defaultEntry}">\n                                                                              {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(variable.name,variable.id)" data-ng-class="{\'disabled\': variable.defaultEntry}">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedVariables.length">\n                                                         <td colspan="4" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_VARIABLES_AVAILABLE\' | translate }}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="4" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.variablesByPage.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/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-eye"></i>\n                                      <a href="/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.variables.view.settings\')}">\n                                                    <a data-ng-href="/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/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/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="icon-docs"></i>\n                                     <a href="/voice/contexts/list">{{ \'APPLICATION_CONTEXTS\' | 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-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="voiceContexts.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTEXT\' | translate }} <i class="fa fa-angle-down"></i>\n                                              </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/voice/contexts/wizard">\n                                                             <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getVoiceContexts([\'name\', \'description\'])" csv-header="[\'Name\', \'Description\']" field-separator=";" filename="voice_contexts.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="displayedContexts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                        <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="4">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.contextsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="contextByPage in contextsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="contextByPage.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(context, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="context in displayedVoiceContexts" class="animate-repeat">\n                                                            <td style="text-align: center; vertical-align: middle"><input data-ng-hide="context.defaultEntry" type="checkbox" checklist-model="voiceContexts.checked" checklist-value="context.id"></td>\n                                                          <td>{{context.name}}</td>\n                                           <td>{{context.description}}</td>\n                                              <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/voice/contexts/view/{{context.id}}/settings" data-ng-class="{\'disabled\': context.defaultEntry}">\n                                                                           {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(context.name,context.id)" data-ng-class="{\'disabled\': context.defaultEntry}">\n                                                                            {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedVoiceContexts.length">\n                                                             <td colspan="4" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_CONTEXTS_AVAILABLE\' | translate }}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td/>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="4" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="conf.contextsByPage.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/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="icon-docs"></i>\n                                     <a href="/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 -->\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 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.voice.contexts.view.settings\')}">\n                                                       <a data-ng-href="/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 -->\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/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 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/voice/context/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-docs"></i>\n                             <a href="/voice/contexts/list">{{ \'APPLICATION_CONTEXTS\' | translate }}</a>\n                         <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/voice/contexts/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">\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_CONTEXT\' | translate }} WIZARD</a> </span>\n            </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.context.$valid)">\n                         <form name="forms.context" novalidate>\n\n                        <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.context.name.$touched || forms.context.$submitted) && forms.context.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.context.name.$touched || forms.context.$submitted) && forms.context.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                            <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/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="icon-music-tone"></i>\n                                       <a href="/voice/mohs/list">{{ \'APPLICATION_MOHS\' | 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-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="mohs.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_MOH_CLASS\' | translate }} <i class="fa fa-angle-down"></i>\n                                            </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/voice/mohs/wizard">\n                                                         <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getMohs([\'name\', \'directory\', \'sort\', \'description\'])" csv-header="[\'Name\', \'Directory\', \'Sort\', \'Description\']" field-separator=";" filename="musiconholds_classes.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="displayedMohs" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.mohsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="mohByPage in mohsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="mohByPage.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(moh, checked)" checklist-model checklist-value="id"></th>\n                                              <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                <th st-sort="directory">{{ \'APPLICATION_PATH\' | translate }}</th>\n                <th st-sort="sort">{{ \'APPLICATION_SORT\' | translate }}</th>\n                                                   <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                              <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="moh in displayedMohs" class="animate-repeat">\n                                                         <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="mohs.checked" checklist-value="moh.id" data-ng-hide="moh.defaultEntry"></td>\n                                                           <td>{{moh.name}}</td>\n                <td>{{moh.directory}}</td>\n                                                             <td>{{moh.sort | capitalize}}</td>\n                                          <td>{{moh.description}}</td>\n                                          <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-class="{\'disabled\': moh.defaultEntry}" data-ng-href="/voice/mohs/view/{{moh.id}}/settings">\n                                                                               {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-class="{\'disabled\': moh.defaultEntry}" data-ng-click="deleteItem(moh.name,moh.id)">\n                                                                                {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedMohs.length">\n                                                              <td colspan="6" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_MOHS_AVAILABLE\' | translate }}</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="directory" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_PATH\' | 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="sort" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_SORT\' | 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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\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="conf.mohsByPage.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/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                          </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/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="/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/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="icon-music-tone"></i>\n                                       <a href="/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 -->\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 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.voice.mohs.view.settings\')}">\n                                                   <a data-ng-href="/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.voice.mohs.view.audios\') || $state.is(\'main.voice.mohs.view.add\')}">\n                                                  <a data-ng-href="/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 -->\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/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\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/voice/moh/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard();getContexts();">\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-music-tone"></i>\n                               <a href="/voice/mohs/list">{{ \'APPLICATION_MOHS\' | 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-music-tone font-green-sharp"></i>\n                      <span class="caption-subject">{{ \'APPLICATION_MOH_CLASS\' | 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}">\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.$submitted && forms.general.name.$invalid" 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 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="item.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="item.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\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/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="icon-layers"></i>\n                                   <a href="/voice/queues/list">{{ \'APPLICATION_QUEUES\' | 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-layers 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="queues.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="#" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }} <i class="fa fa-angle-down"></i>\n                                                </a>\n                                          <ul class="dropdown-menu pull-right">\n                                                 <li>\n                                                          <a href="/voice/queues/wizard">\n                                                               <i class="icon-user-following"></i> {{ \'APPLICATION_WIZARD\' | translate }} </a>\n                                                     </li>\n                                         </ul>\n                                 </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getQueues([\'name\', \'description\', \'strategy\', \'context\'])" csv-header="[\'Name\', \'Description\', \'Strategy\', \'Context\']" field-separator=";" filename="queues.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="displayedQueues" st-pipe="initList" 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                                                                                        <ui-select class="input-xsmall" ng-model="conf.voiceQueuesByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="voiceQueueByPage in voiceQueuesByPage | filter: $select.search">\n                                                                                                   <div ng-bind-html="voiceQueueByPage.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(queue, checked)" checklist-model checklist-value="name"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="description">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                  <th st-sort="strategy">{{ \'APPLICATION_STRATEGY\' | translate }}</th>\n                                                            <th st-sort="context">{{ \'APPLICATION_CONTEXT\' | translate }}</th>\n                                                          <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="queue in displayedQueues" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="queues.checked" checklist-value="queue.name"></td>\n                                                             <td>{{queue.name}}</td>\n                                             <td>{{queue.description}}</td>\n                                        <td>{{queue.strategy}}</td>\n                                                             <td>{{queue.context}}</td>\n                                          <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/voice/queues/view/{{queue.name}}/settings">\n                                                                          {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(queue.name,queue.name)">\n                                                                           {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedQueues.length">\n                                                            <td colspan="6" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}</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="description" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_DESCRIPTION\' | 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="strategy" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_STRATEGY\' | 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="context" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_CONTEXT\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                  </div>\n                                                    </td>\n                                                 <td>\n                                                  </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="6" class="text-center">\n                                            <div class="pagination" st-pagination st-items-by-page="conf.voiceQueuesByPage.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/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>\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 text-center">\n                                           <div class="form-group last">\n                                                 <div class="col-md-9" 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/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="icon-layers"></i>\n                                   <a href="/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 -->\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.voice.queues.view.settings\')}">\n                                                 <a data-ng-href="/voice/queues/view/{{queue.name}}/settings">\n                                                 <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.voice.queues.view.agents\')}">\n                                                   <a data-ng-href="/voice/queues/view/{{queue.name}}/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/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 && 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" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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 && 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}}<span class="required" aria-required="true">*</span></label>\n                                                            <ui-select multiple data-ng-model="queue.periodic_announce" name="periodic_announce" theme="bootstrap" required>\n                                                                      <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.display_name}}</ui-select-match>\n                                                                 <ui-select-choices repeat="returnAnnouncePath(announce) as announce in periodicAnnounces | 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_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}}<span class="required" aria-required="true">*</span></label>\n                                                                     <ui-select data-ng-model="queue.queue_reporthold" name="queue_reporthold" theme="bootstrap" required>\n                                                                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                              <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                                     <ui-select data-ng-model="queue.queue_youarenext" name="queue_youarenext" theme="bootstrap" required>\n                                                                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                              <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                               <ui-select data-ng-model="queue.queue_thereare" name="queue_thereare" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                           <ui-select data-ng-model="queue.queue_callswaiting" name="queue_callswaiting" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                               <ui-select data-ng-model="queue.queue_holdtime" name="queue_holdtime" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                                <ui-select data-ng-model="queue.queue_minutes" name="queue_minutes" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                         <ui-select data-ng-model="queue.queue_minute" name="queue_minute" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                                <ui-select data-ng-model="queue.queue_seconds" name="queue_seconds" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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}}<span class="required" aria-required="true">*</span></label>\n                                                               <ui-select data-ng-model="queue.queue_thankyou" name="QUEUE_THANKYOU" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="returnAnnouncePath(announce) 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.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>\n                                                                <ui-select data-ng-model="queue.autopause" name="autopause" 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\',\'all\'] | 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_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                                             </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                                                </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'),
diff --git a/public/assets/plugins/angular-elastic-builder-back/.bower.json b/public/assets/plugins/angular-elastic-builder-back/.bower.json
deleted file mode 100644 (file)
index 1b348aa..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "name": "angular-elastic-builder",
-  "homepage": "https://github.com/dncrews/angular-elastic-builder",
-  "authors": [
-    "Dan Crews <crewsd@gmail.com>"
-  ],
-  "description": "Angular Module for building an Elasticsearch Query",
-  "main": "dist/angular-elastic-builder.js",
-  "keywords": [
-    "elasticsearch",
-    "angular"
-  ],
-  "license": "MIT",
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "bower_components",
-    "test",
-    "tests"
-  ],
-  "version": "1.4.0",
-  "_release": "1.4.0",
-  "_resolution": {
-    "type": "version",
-    "tag": "1.4.0",
-    "commit": "5794b36762eb825433a836dbae055be841ee057c"
-  },
-  "_source": "git://github.com/dncrews/angular-elastic-builder.git",
-  "_target": "~1.4.0",
-  "_originalSource": "angular-elastic-builder",
-  "_direct": true
-}
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder-back/LICENSE.md b/public/assets/plugins/angular-elastic-builder-back/LICENSE.md
deleted file mode 100644 (file)
index ea15051..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright Â© 2014 by Intellectual Reserve, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
diff --git a/public/assets/plugins/angular-elastic-builder-back/README.md b/public/assets/plugins/angular-elastic-builder-back/README.md
deleted file mode 100644 (file)
index d05655b..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-# Angular Elasticsearch Query Builder
-
-[![NPM version][npm-image]][npm-url]
-![Bower version][bower-image]
-[![Downloads][downloads-image]][downloads-url]
-[![Tips][gratipay-image]][gratipay-url]
-
-This is an Angular.js directive for building an [Elasticsearch](https://www.elastic.co/) query.
-You just give it the fields and can generate a query for it. Its layout is defined using [Bootstrap](http://getbootstrap.com/) classes, but you may also choose to just style it yourself.
-
-It's still pretty early on, as it doesn't support a whole lot of use-cases, but we need to make it awesome. Contributions accepted.
-
-## Try it Out
-[View an example here](http://dncrews.com/angular-elastic-builder/examples/)
-
-## Usage
-
-### Dependency
-Notice: this plugin requires the [Angular Recursion](https://github.com/marklagendijk/angular-recursion) module.
-
-### Installation
-First you'll need to download the [dist](https://github.com/dncrews/angular-elastic-builder/tree/master/dist) files and include this JS file to your app (don't forget to substitute `x.x.x` with the current version number), along with the RecursionHelper, if you're not already using it.
-```html
-<script type="text/javascript" src="/angular-recursion.min.js"></script>
-<script type="text/javascript" src="/angular-elastic-builder.min.js"></script>
-```
-
-Then make sure that it's included in your app's dependencies during module creation.
-
-```js
-angularmodule('appName', [ 'angular-elastic-builder' ]);
-```
-
-Then you can use it in your app
-```js
-/* Controller code */
-
-/**
- * The elasticBuilderData object will be modified in place so that you can use
- * your own $watch, and/or your own saving mechanism
- */
-$scope.elasticBuilderData = {};
-$scope.elasticBuilderData.query = [];
-
-/**
- * This object is the lookup for what fields
- * are available in your database, as well as definitions of what kind
- * of data they are
- */
-$scope.elasticBuilderData.fields = {
-  'some.number.field': { type: 'number' },
-  'some.term.field': { type: 'term' },
-  'some.boolean.field': { type: 'term', subType: 'boolean' },
-  'multi.selector': { type: 'multi', choices: [ 'AZ', 'CA', 'CT' ]}
-};
-```
-
-```html
-<div data-elastic-builder="elasticBuilderData"></div>
-```
-
-The above elasticFields would allow you create the following form:
-![Screenshot][screenshot-image]
-
-Which represents the following Elasticsearch Query:
-```json
-[
-  {
-    "terms": {
-      "multi.selector": [
-        "AZ",
-        "CT"
-      ]
-    }
-  },
-  {
-    "term": {
-      "some.boolean.field": "0"
-    }
-  },
-  {
-    "not": {
-      "filter": {
-        "term": {
-          "some.term.field": "Hello World"
-        }
-      }
-    }
-  },
-  {
-    "and": [
-      {
-        "range": {
-          "some.number.field": {
-            "gte": 0
-          }
-        }
-      },
-      {
-        "range": {
-          "some.number.field": {
-            "lt": 100
-          }
-        }
-      }
-    ]
-  }
-]
-```
-
-
-### Field Options
-  - `type`: This determines how the fields are displayed in the form.
-    - Currently supported:
-      - `'number'`: in addition to Generic Options, gets "&gt;", "&ge;", "&lt;", "&le;", "="
-      - `'term'`: in addition to Generic Options, gets "Equals" and "! Equals"
-      - `'boolean'`: Does not get Generic Options. Gets `true` and `false`
-        - These are actually "equals 0" and "equals 1" for the database query
-
-Generic Options
-  - In addition to any specific options for fields, all fields also get a "Exists" and "! Exists" option
-
-
-## External Changes && Initial State
-If you want to pass in an initial state (or if you make changes to the query externally), you'll need to
-set the configuration flag `needsUpdate` to `true`. Any time this flag changes to `true`, this directive
-will overwrite the current state and data with whatever is now defined in your configuration object.
-
-
-## Local Development
-To work on this module locally, you will need to clone it and run `gulp watch`. This will ensure that your changes get compiled properly. You will also need to make sure you run `gulp` to build the "dist" files before commit.
-
-
-[npm-image]: https://img.shields.io/npm/v/angular-elastic-builder.svg
-[npm-url]: https://www.npmjs.org/package/angular-elastic-builder
-[bower-image]: https://img.shields.io/bower/v/angular-elastic-builder.svg
-[downloads-image]: https://img.shields.io/npm/dm/angular-elastic-builder.svg
-[downloads-url]: https://www.npmjs.org/package/angular-elastic-builder
-[gratipay-image]: https://img.shields.io/gratipay/dncrews.svg
-[gratipay-url]: https://www.gratipay.com/dncrews/
-[screenshot-image]: https://raw.githubusercontent.com/dncrews/angular-elastic-builder/master/screenshot.png
diff --git a/public/assets/plugins/angular-elastic-builder-back/bower.json b/public/assets/plugins/angular-elastic-builder-back/bower.json
deleted file mode 100644 (file)
index 43641b1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "name": "angular-elastic-builder",
-  "homepage": "https://github.com/dncrews/angular-elastic-builder",
-  "authors": [
-    "Dan Crews <crewsd@gmail.com>"
-  ],
-  "description": "Angular Module for building an Elasticsearch Query",
-  "main": "dist/angular-elastic-builder.js",
-  "keywords": [
-    "elasticsearch",
-    "angular"
-  ],
-  "license": "MIT",
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "bower_components",
-    "test",
-    "tests"
-  ]
-}
diff --git a/public/assets/plugins/angular-elastic-builder-back/dist/angular-elastic-builder.js b/public/assets/plugins/angular-elastic-builder-back/dist/angular-elastic-builder.js
deleted file mode 100644 (file)
index 352ab2e..0000000
+++ /dev/null
@@ -1,608 +0,0 @@
-/**
- * # angular-elastic-builder
- * ## Angular Module for building an Elasticsearch Query
- *
- * @version v1.4.0
- * @link https://github.com/dncrews/angular-elastic-builder.git
- * @license MIT
- * @author Dan Crews <crewsd@gmail.com>
- */
-
-/**
- * angular-elastic-builder
- *
- * /src/module.js
- *
- * Angular Module for building an Elasticsearch query
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder', [
-    'RecursionHelper',
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/BuilderDirective.js
- *
- * Angular Directive for injecting a query builder form.
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .directive('elasticBuilder', [
-      'elasticQueryService',
-
-      function EB(elasticQueryService) {
-
-        return {
-          scope: {
-            data: '=elasticBuilder',
-          },
-
-          templateUrl: 'angular-elastic-builder/BuilderDirective.html',
-
-          link: function(scope) {
-            var data = scope.data;
-
-            scope.filters = [];
-
-            /**
-             * Removes either Group or Rule
-             */
-            scope.removeChild = function(idx) {
-              scope.filters.splice(idx, 1);
-            };
-
-            /**
-             * Adds a Single Rule
-             */
-            scope.addRule = function() {
-              scope.filters.push({});
-            };
-
-            /**
-             * Adds a Group of Rules
-             */
-            scope.addGroup = function() {
-              scope.filters.push({
-                type: 'group',
-                subType: '$and',
-                rules: [],
-              });
-            };
-
-            /**
-             * Any time "outside forces" change the query, they should tell us so via
-             * `data.needsUpdate`
-             */
-            scope.$watch('data.needsUpdate', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              scope.filters = elasticQueryService.toFilters(data.query, scope.data.fields);
-              scope.data.needsUpdate = false;
-            });
-
-            /**
-             * Changes on the page update the Query
-             */
-            scope.$watch('filters', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              data.query = elasticQueryService.toQuery(scope.filters, scope.data.fields);
-            }, true);
-          }
-        };
-      }
-
-    ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Chooser.js
- *
- * This file is to help recursively, to decide whether to show a group or rule
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderChooser', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderChooser(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          item: '=elasticBuilderChooser',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/ChooserDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+attrs.depth);
-            var item = scope.item;
-
-            scope.getGroupClassName = function() {
-              var level = depth;
-              if (item.type === 'group') {
-                level++;
-              }
-
-              return groupClassHelper(level);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Group.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderGroup', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderGroup(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          group: '=elasticBuilderGroup',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/GroupDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+attrs.depth);
-            var group = scope.group;
-
-            scope.addRule = function() {
-              group.rules.push({});
-            };
-            scope.addGroup = function() {
-              group.rules.push({
-                type: 'group',
-                subType: '$and',
-                rules: [],
-              });
-            };
-
-            scope.removeChild = function(idx) {
-              group.rules.splice(idx, 1);
-            };
-
-            scope.getGroupClassName = function() {
-              return groupClassHelper(depth + 1);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Rule.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderRule', [
-
-    function elasticBuilderRule() {
-      return {
-        scope: {
-          elasticFields: '=',
-          rule: '=elasticBuilderRule',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/RuleDirective.html',
-
-        link: function(scope) {
-          scope.getType = function() {
-            var fields = scope.elasticFields;
-            var field = scope.rule.field;
-
-            if (!fields || !field) {
-              return;
-            }
-
-            if (fields[field].subType === 'boolean') {
-              return 'boolean';
-            }
-
-            return fields[field].type;
-          };
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/RuleTypes.js
- *
- * Determines which Rule type should be displayed
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticType', [
-
-    function() {
-      return {
-        scope: {
-          type: '=elasticType',
-          rule: '=',
-          guide: '=',
-        },
-
-        template: '<ng-include src="getTemplateUrl()" />',
-
-        link: function(scope) {
-          scope.getTemplateUrl = function() {
-            var type = scope.type;
-            if (!type) {
-              return;
-            }
-
-            type = type.charAt(0).toUpperCase() + type.slice(1);
-
-            return 'angular-elastic-builder/types/' + type + '.html';
-          };
-
-          // This is a weird hack to make sure these are numbers
-          scope.booleans = ['False', 'True'];
-          scope.booleansOrder = ['True', 'False'];
-
-          scope.inputNeeded = function() {
-            var needs = [
-              'equals',
-              'notEquals',
-
-              '$gt',
-              '$gte',
-              '$lt',
-              '$lte',
-            ];
-
-            return ~needs.indexOf(scope.rule.subType);
-          };
-        },
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/services/GroupClassHelper.js
- *
- * This keeps all of the groups colored correctly
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('groupClassHelper', function groupClassHelper() {
-
-      return function(level) {
-        var levels = [
-          '',
-          // 'list-group-item-info',
-          // 'list-group-item-success',
-          // 'list-group-item-warning',
-          // 'list-group-item-danger',
-        ];
-
-        return levels[level % levels.length];
-      };
-    });
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/services/QueryService.js
- *
- * This file is used to convert filters into queries, and vice versa
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('elasticQueryService', [
-      function() {
-
-        return {
-          toFilters: toFilters,
-          toQuery: toQuery,
-        };
-      }
-    ]);
-
-  function toFilters(query, fieldMap) {
-    var filters = query.map(parseQueryGroup.bind(query, fieldMap));
-    return filters;
-  }
-
-  function toQuery(filters, fieldMap) {
-    var query = filters.map(parseFilterGroup.bind(filters, fieldMap)).filter(function(item) {
-      return !!item;
-    });
-    return query;
-  }
-
-  function parseQueryGroup(fieldMap, group, truthy) {
-    if (truthy !== false) {
-      truthy = true;
-    }
-
-    var key = Object.keys(group)[0];
-    var typeMap = {
-      or: 'group',
-      and: 'group',
-      range: 'number',
-    };
-    var type = typeMap[key] || 'item';
-    var obj = getFilterTemplate(type);
-
-    switch (key) {
-      case '$or':
-      case '$and':
-        obj.rules = group[key].map(parseQueryGroup.bind(group, fieldMap));
-        obj.subType = key;
-        break;
-      case 'missing':
-      case 'exists':
-        obj.field = group[key].field;
-        obj.subType = {
-          exists: 'exists',
-          missing: 'notExists',
-        }[key];
-        delete obj.value;
-        break;
-      case 'term':
-      case 'terms':
-        obj.field = Object.keys(group[key])[0];
-        var fieldData = fieldMap[Object.keys(group[key])[0]];
-
-        if (fieldData.type === 'multi') {
-          var vals = group[key][obj.field];
-          if (typeof vals === 'string') {
-            vals = [vals];
-          }
-          obj.values = fieldData.choices.reduce(function(prev, choice) {
-            prev[choice] = truthy === (group[key][obj.field].indexOf(choice) > -1);
-            return prev;
-          }, {});
-        } else {
-          obj.subType = truthy ? 'equals' : 'notEquals';
-          obj.value = group[key][obj.field];
-
-          if (typeof obj.value === 'number') {
-            obj.subType = 'boolean';
-          }
-        }
-        break;
-      case 'range':
-        obj.field = Object.keys(group[key])[0];
-        obj.subType = Object.keys(group[key][obj.field])[0];
-        obj.value = group[key][obj.field][obj.subType];
-        break;
-      case 'not':
-        obj = parseQueryGroup(fieldMap, group[key].filter, false);
-        break;
-      default:
-        obj.field = Object.keys(group[key])[0];
-        break;
-    }
-
-    return obj;
-  }
-
-  function parseFilterGroup(fieldMap, group) {
-    var obj = {};
-    if (group.type === 'group') {
-      obj[group.subType] = group.rules.map(parseFilterGroup.bind(group, fieldMap)).filter(function(item) {
-        return !!item;
-      });
-      return obj;
-    }
-
-    var fieldName = group.field;
-    var fieldData = fieldMap[fieldName];
-
-    if (!fieldName) {
-      return;
-    }
-
-    switch (fieldData.type) {
-      case 'term':
-        if (fieldData.subType === 'boolean') {
-          group.subType = 'boolean';
-        }
-
-        if (!group.subType) {
-          return;
-        }
-        switch (group.subType) {
-          case 'equals':
-          case 'boolean':
-            if (group.value === undefined) {
-              return;
-            }
-            obj[fieldName] = group.value;
-            break;
-          case 'notEquals':
-            if (group.value === undefined) {
-              return;
-            }
-            obj[fieldName] = {
-              $ne: group.value
-            };
-            break;
-          case 'exists':
-            obj.exists = {
-              field: fieldName
-            };
-            break;
-          case 'notExists':
-            obj.missing = {
-              field: fieldName
-            };
-            break;
-          default:
-            throw new Error('unexpected subtype ' + group.subType);
-        }
-        break;
-
-      case 'select':
-
-      case 'number':
-        obj[fieldName] = {};
-
-        switch (group.subType) {
-          case 'equals':
-            obj[fieldName] = group.value;
-            break;
-          default:
-            obj[fieldName][group.subType] = group.value;
-        }
-
-        break;
-
-      case 'date':
-        if (group.subType === 'exists') {
-          obj.exists = {
-            field: fieldName
-          };
-        } else if (group.subType === 'notExists') {
-          obj.missing = {
-            field: fieldName
-          };
-        } else {
-          throw new Error('unexpected subtype');
-        }
-
-        break;
-
-      case 'multi':
-        obj.terms = {};
-        obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-          if (group.values[key]) {
-            prev.push(key);
-          }
-
-          return prev;
-        }, []);
-        break;
-
-        // case 'multi':
-        //   obj.terms = {};
-        //   obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-        //     if (group.values[key]) {
-        //       prev.push(key);
-        //     }
-        //
-        //     return prev;
-        //   }, []);
-        //   break;
-
-      default:
-        throw new Error('unexpected type');
-    }
-
-    return obj;
-  }
-
-  function getFilterTemplate(type) {
-    var templates = {
-      group: {
-        type: 'group',
-        subType: '',
-        rules: [],
-      },
-      item: {
-        field: '',
-        subType: '',
-        value: '',
-      },
-      number: {
-        field: '',
-        subType: '',
-        value: null,
-      }
-    };
-
-    return angular.copy(templates[type]);
-  }
-
-})(window.angular);
-
-(function(angular) {"use strict"; angular.module("angular-elastic-builder").run(["$templateCache", function($templateCache) {$templateCache.put("angular-elastic-builder/BuilderDirective.html","<!-- <div class=\"elastic-builder\">\n  <div class=\"filter-panels\"> -->\n    <div class=\"list-group form-inline list-group-item-custom\">\n      <div\n        data-ng-repeat=\"filter in filters\"\n        data-elastic-builder-chooser=\"filter\"\n        data-elastic-fields=\"data.fields\"\n        data-on-remove=\"removeChild($index)\"\n        data-depth=\"0\"></div>\n      <div class=\"list-group-item actions\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n                           <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n                         </a>\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\n                            <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                             </a>\n      </div>\n    </div>\n  <!-- </div>\n</div> -->\n");
-$templateCache.put("angular-elastic-builder/ChooserDirective.html","<div class=\"list-group-item elastic-builder-chooser list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\n  <div data-ng-if=\"item.type === \'group\'\"\n    data-elastic-builder-group=\"item\"\n    data-depth=\"{{ depth }}\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n  <div data-ng-if=\"item.type !== \'group\'\"\n    data-elastic-builder-rule=\"item\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n</div>\n");
-$templateCache.put("angular-elastic-builder/GroupDirective.html","<!-- 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-people font-green-sharp\"></i> -->\n      <h5><span class=\"caption-subject\">If</span>\n        <select data-ng-model=\"group.subType\" class=\"form-control\">\n          <option value=\"$and\"><strong>all</strong></option>\n          <option value=\"$or\"><strong>any</strong></option>\n        </select>\n        <span class=\"caption-subject\">of these conditions are met</span>\n      </h5>\n    </div>\n  </div>\n  <div class=\"portlet-body\">\n    <div class=\"elastic-builder-group\">\n      <div\n        data-ng-repeat=\"rule in group.rules\"\n        data-elastic-builder-chooser=\"rule\"\n        data-elastic-fields=\"elasticFields\"\n        data-depth=\"{{ +depth + 1 }}\"\n        data-on-remove=\"removeChild($index)\"></div>\n\n      <div class=\"list-group-item actions list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n          <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n        </a>\n        <a class=\"btn red btn-sm remover\" data-ng-click=\"onRemove()\">\n          <i class=\"icon-trash\"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\n        </a>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END Portlet PORTLET-->\n");
-$templateCache.put("angular-elastic-builder/RuleDirective.html","<!-- <div class=\"elastic-builder-rule\"> -->\n  <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select>\n\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\n\n  <!-- <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\n    <i class=\"fa fa-minus\"></i>\n  </a> -->\n\n  <a class=\"btn remover\" data-ng-click=\"onRemove()\">\n    <i class=\"icon-trash\"></i>\n  </a>\n\n<!-- </div> -->\n");
-$templateCache.put("angular-elastic-builder/types/Boolean.html","<span class=\"boolean-rule\">\n  Equals\n\n  <!-- This is a weird hack to make sure these are numbers -->\n  <select\n    data-ng-model=\"rule.value\"\n    class=\"form-control\"\n    data-ng-options=\"booleans.indexOf(choice) as choice for choice in booleansOrder\">\n  </select>\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Date.html","<span class=\"date-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n\n    <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup>\n  </select>\n\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Multi.html","<span class=\"multi-rule\">\n  <span data-ng-repeat=\"choice in guide.choices\">\n    <label class=\"checkbox\">\n      <input type=\"checkbox\" data-ng-model=\"rule.values[choice]\">\n      {{ choice }}\n    </label>\n  </span>\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Number.html","<span class=\"number-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option value=\"equals\">=</option>\n      <option value=\"$gt\">&gt;</option>\n      <option value=\"$gte\">&ge;</option>\n      <option value=\"$lt\">&lt;</option>\n      <option value=\"$lte\">&le;</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <input data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"number\"\n    min=\"{{ guide.minimum }}\"\n    max=\"{{ guide.maximum }}\">\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Select.html","<span class=\"number-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option value=\"equals\">=</option>\n      <!-- <option value=\"$gt\">&gt;</option>\n      <option value=\"$gte\">&ge;</option>\n      <option value=\"$lt\">&lt;</option>\n      <option value=\"$lte\">&le;</option> -->\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option data-ng-repeat=\"choice in guide.choices\" value=\"{{choice.value}}\">{{choice.key}}</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- <input data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"number\"\n    min=\"{{ guide.minimum }}\"\n    max=\"{{ guide.maximum }}\"> -->\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Term.html","<span class=\"elastic-term\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- Term Options -->\n    <!-- <optgroup label=\"Text\"> -->\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n    <!-- </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n\n  </select>\n  <input\n    data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"text\">\n</span>\n");}]);})(window.angular);
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder-back/dist/angular-elastic-builder.min.js b/public/assets/plugins/angular-elastic-builder-back/dist/angular-elastic-builder.min.js
deleted file mode 100644 (file)
index a9d67a8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){"use strict";e.module("angular-elastic-builder",["RecursionHelper"])}(window.angular),function(e){"use strict";e.module("angular-elastic-builder").directive("elasticBuilder",["elasticQueryService",function(e){return{scope:{data:"=elasticBuilder"},templateUrl:"angular-elastic-builder/BuilderDirective.html",link:function(n){var t=n.data;n.filters=[],n.removeChild=function(e){n.filters.splice(e,1)},n.addRule=function(){n.filters.push({})},n.addGroup=function(){n.filters.push({type:"group",subType:"$and",rules:[]})},n.$watch("data.needsUpdate",function(a){a&&(n.filters=e.toFilters(t.query,n.data.fields),n.data.needsUpdate=!1)}),n.$watch("filters",function(a){a&&(t.query=e.toQuery(n.filters,n.data.fields))},!0)}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticBuilderChooser",["RecursionHelper","groupClassHelper",function(e,n){return{scope:{elasticFields:"=",item:"=elasticBuilderChooser",onRemove:"&"},templateUrl:"angular-elastic-builder/ChooserDirective.html",compile:function(t){return e.compile(t,function(e,t,a){var l=e.depth=+a.depth,i=e.item;e.getGroupClassName=function(){var e=l;return"group"===i.type&&e++,n(e)}})}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticBuilderGroup",["RecursionHelper","groupClassHelper",function(e,n){return{scope:{elasticFields:"=",group:"=elasticBuilderGroup",onRemove:"&"},templateUrl:"angular-elastic-builder/GroupDirective.html",compile:function(t){return e.compile(t,function(e,t,a){var l=e.depth=+a.depth,i=e.group;e.addRule=function(){i.rules.push({})},e.addGroup=function(){i.rules.push({type:"group",subType:"$and",rules:[]})},e.removeChild=function(e){i.rules.splice(e,1)},e.getGroupClassName=function(){return n(l+1)}})}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticBuilderRule",[function(){return{scope:{elasticFields:"=",rule:"=elasticBuilderRule",onRemove:"&"},templateUrl:"angular-elastic-builder/RuleDirective.html",link:function(e){e.getType=function(){var n=e.elasticFields,t=e.rule.field;return n&&t?"boolean"===n[t].subType?"boolean":n[t].type:void 0}}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticType",[function(){return{scope:{type:"=elasticType",rule:"=",guide:"="},template:'<ng-include src="getTemplateUrl()" />',link:function(e){e.getTemplateUrl=function(){var n=e.type;if(n)return n=n.charAt(0).toUpperCase()+n.slice(1),"angular-elastic-builder/types/"+n+".html"},e.booleans=["False","True"],e.booleansOrder=["True","False"],e.inputNeeded=function(){var n=["equals","notEquals","$gt","$gte","$lt","$lte"];return~n.indexOf(e.rule.subType)}}}}])}(window.angular),function(e){"use strict";e.module("angular-elastic-builder").factory("groupClassHelper",function(){return function(e){var n=[""];return n[e%n.length]}})}(window.angular),function(e){"use strict";function n(e,n){var t=e.map(a.bind(e,n));return t}function t(e,n){var t=e.map(l.bind(e,n)).filter(function(e){return!!e});return t}function a(e,n,t){t!==!1&&(t=!0);var l=Object.keys(n)[0],s={or:"group",and:"group",range:"number"},r=s[l]||"item",o=i(r);switch(l){case"$or":case"$and":o.rules=n[l].map(a.bind(n,e)),o.subType=l;break;case"missing":case"exists":o.field=n[l].field,o.subType={exists:"exists",missing:"notExists"}[l],delete o.value;break;case"term":case"terms":o.field=Object.keys(n[l])[0];var u=e[Object.keys(n[l])[0]];if("multi"===u.type){var c=n[l][o.field];"string"==typeof c&&(c=[c]),o.values=u.choices.reduce(function(e,a){return e[a]=t===n[l][o.field].indexOf(a)>-1,e},{})}else o.subType=t?"equals":"notEquals",o.value=n[l][o.field],"number"==typeof o.value&&(o.subType="boolean");break;case"range":o.field=Object.keys(n[l])[0],o.subType=Object.keys(n[l][o.field])[0],o.value=n[l][o.field][o.subType];break;case"not":o=a(e,n[l].filter,!1);break;default:o.field=Object.keys(n[l])[0]}return o}function l(e,n){var t={};if("group"===n.type)return t[n.subType]=n.rules.map(l.bind(n,e)).filter(function(e){return!!e}),t;var a=n.field,i=e[a];if(a){switch(i.type){case"term":if("boolean"===i.subType&&(n.subType="boolean"),!n.subType)return;switch(n.subType){case"equals":case"boolean":if(void 0===n.value)return;t[a]=n.value;break;case"notEquals":if(void 0===n.value)return;t[a]={$ne:n.value};break;case"exists":t.exists={field:a};break;case"notExists":t.missing={field:a};break;default:throw new Error("unexpected subtype "+n.subType)}break;case"select":case"number":switch(t[a]={},n.subType){case"equals":t[a]=n.value;break;default:t[a][n.subType]=n.value}break;case"date":if("exists"===n.subType)t.exists={field:a};else{if("notExists"!==n.subType)throw new Error("unexpected subtype");t.missing={field:a}}break;case"multi":t.terms={},t.terms[a]=Object.keys(n.values||{}).reduce(function(e,t){return n.values[t]&&e.push(t),e},[]);break;default:throw new Error("unexpected type")}return t}}function i(n){var t={group:{type:"group",subType:"",rules:[]},item:{field:"",subType:"",value:""},number:{field:"",subType:"",value:null}};return e.copy(t[n])}e.module("angular-elastic-builder").factory("elasticQueryService",[function(){return{toFilters:n,toQuery:t}}])}(window.angular),function(e){"use strict";e.module("angular-elastic-builder").run(["$templateCache",function(e){e.put("angular-elastic-builder/BuilderDirective.html",'<!-- <div class="elastic-builder">\n  <div class="filter-panels"> -->\n    <div class="list-group form-inline list-group-item-custom">\n      <div\n        data-ng-repeat="filter in filters"\n        data-elastic-builder-chooser="filter"\n        data-elastic-fields="data.fields"\n        data-on-remove="removeChild($index)"\n        data-depth="0"></div>\n      <div class="list-group-item actions">\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\n                                <i class="icon-plus"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n                           </a>\n        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">\n                                  <i class="icon-plus"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                               </a>\n      </div>\n    </div>\n  <!-- </div>\n</div> -->\n'),e.put("angular-elastic-builder/ChooserDirective.html",'<div class="list-group-item elastic-builder-chooser list-group-item-custom" data-ng-class="getGroupClassName()">\n  <div data-ng-if="item.type === \'group\'"\n    data-elastic-builder-group="item"\n    data-depth="{{ depth }}"\n    data-elastic-fields="elasticFields"\n    data-on-remove="onRemove()"></div>\n  <div data-ng-if="item.type !== \'group\'"\n    data-elastic-builder-rule="item"\n    data-elastic-fields="elasticFields"\n    data-on-remove="onRemove()"></div>\n</div>\n'),e.put("angular-elastic-builder/GroupDirective.html",'<!-- 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-people font-green-sharp"></i> -->\n      <h5><span class="caption-subject">If</span>\n        <select data-ng-model="group.subType" class="form-control">\n          <option value="$and"><strong>all</strong></option>\n          <option value="$or"><strong>any</strong></option>\n        </select>\n        <span class="caption-subject">of these conditions are met</span>\n      </h5>\n    </div>\n  </div>\n  <div class="portlet-body">\n    <div class="elastic-builder-group">\n      <div\n        data-ng-repeat="rule in group.rules"\n        data-elastic-builder-chooser="rule"\n        data-elastic-fields="elasticFields"\n        data-depth="{{ +depth + 1 }}"\n        data-on-remove="removeChild($index)"></div>\n\n      <div class="list-group-item actions list-group-item-custom" data-ng-class="getGroupClassName()">\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\n          <i class="icon-plus"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n        </a>\n        <a class="btn red btn-sm remover" data-ng-click="onRemove()">\n          <i class="icon-trash"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\n        </a>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END Portlet PORTLET-->\n'),e.put("angular-elastic-builder/RuleDirective.html",'<!-- <div class="elastic-builder-rule"> -->\n  <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select>\n\n  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>\n\n  <!-- <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\n    <i class="fa fa-minus"></i>\n  </a> -->\n\n  <a class="btn remover" data-ng-click="onRemove()">\n    <i class="icon-trash"></i>\n  </a>\n\n<!-- </div> -->\n'),e.put("angular-elastic-builder/types/Boolean.html",'<span class="boolean-rule">\n  Equals\n\n  <!-- This is a weird hack to make sure these are numbers -->\n  <select\n    data-ng-model="rule.value"\n    class="form-control"\n    data-ng-options="booleans.indexOf(choice) as choice for choice in booleansOrder">\n  </select>\n</span>\n'),e.put("angular-elastic-builder/types/Date.html",'<span class="date-rule">\n  <select data-ng-model="rule.subType" class="form-control">\n\n    <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup>\n  </select>\n\n</span>\n'),e.put("angular-elastic-builder/types/Multi.html",'<span class="multi-rule">\n  <span data-ng-repeat="choice in guide.choices">\n    <label class="checkbox">\n      <input type="checkbox" data-ng-model="rule.values[choice]">\n      {{ choice }}\n    </label>\n  </span>\n</span>\n'),e.put("angular-elastic-builder/types/Number.html",'<span class="number-rule">\n  <select data-ng-model="rule.subType" class="form-control">\n    <!-- <optgroup label="Numeral"> -->\n      <option value="equals">=</option>\n      <option value="$gt">&gt;</option>\n      <option value="$gte">&ge;</option>\n      <option value="$lt">&lt;</option>\n      <option value="$lte">&le;</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <input data-ng-if="inputNeeded()"\n    class="form-control"\n    data-ng-model="rule.value"\n    type="number"\n    min="{{ guide.minimum }}"\n    max="{{ guide.maximum }}">\n</span>\n'),e.put("angular-elastic-builder/types/Select.html",'<span class="number-rule">\n  <select data-ng-model="rule.subType" class="form-control">\n    <!-- <optgroup label="Numeral"> -->\n      <option value="equals">=</option>\n      <!-- <option value="$gt">&gt;</option>\n      <option value="$gte">&ge;</option>\n      <option value="$lt">&lt;</option>\n      <option value="$lte">&le;</option> -->\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <select data-ng-model="rule.value" class="form-control">\n    <!-- <optgroup label="Numeral"> -->\n      <option data-ng-repeat="choice in guide.choices" value="{{choice.value}}">{{choice.key}}</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- <input data-ng-if="inputNeeded()"\n    class="form-control"\n    data-ng-model="rule.value"\n    type="number"\n    min="{{ guide.minimum }}"\n    max="{{ guide.maximum }}"> -->\n</span>\n'),e.put("angular-elastic-builder/types/Term.html",'<span class="elastic-term">\n  <select data-ng-model="rule.subType" class="form-control">\n    <!-- Term Options -->\n    <!-- <optgroup label="Text"> -->\n      <option value="equals">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value="notEquals">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n    <!-- </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label="Generic">\n      <option value="exists">Exists</option>\n      <option value="notExists">! Exists</option>\n    </optgroup> -->\n\n  </select>\n  <input\n    data-ng-if="inputNeeded()"\n    class="form-control"\n    data-ng-model="rule.value"\n    type="text">\n</span>\n')}])}(window.angular);
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder-back/examples/index.html b/public/assets/plugins/angular-elastic-builder-back/examples/index.html
deleted file mode 100644 (file)
index 0d0ad23..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Angular Elastic Builder</title>
-    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
-    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
-  </head>
-  <body data-ng-app="exampleApp">
-
-    <div data-ng-controller="BasicController as example">
-      <div class="container">
-        <div class="row">
-          <div class="col-md-6">
-            <h3>Filters</h3>
-            <div data-elastic-builder="example.data"></div>
-          </div>
-          <div class="col-md-6">
-            <h3>Query</h3>
-            <pre data-ng-bind="example.showQuery()"></pre>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
-    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
-    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
-    <script src="angular/angular-recursion.min.js"></script>
-    <script src="js/angular-elastic-builder.min.js"></script>
-    <script src="js/exampleApp.js"></script>
-  </body>
-</html>
diff --git a/public/assets/plugins/angular-elastic-builder-back/examples/index.js b/public/assets/plugins/angular-elastic-builder-back/examples/index.js
deleted file mode 100644 (file)
index d39b589..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-var path = require('path');
-var express = require('express');
-
-var app = express();
-
-app.use(express.static(__dirname));
-app.use('/js', express.static(path.join(__dirname, '../dist')));
-app.use('/angular', express.static(path.join(__dirname, '../node_modules/angular-recursion')));
-
-app.listen(process.env.PORT || 3000, function() {
-  console.log('listening on ' + ( process.env.PORT || 3000));
-});
diff --git a/public/assets/plugins/angular-elastic-builder-back/examples/js/exampleApp.js b/public/assets/plugins/angular-elastic-builder-back/examples/js/exampleApp.js
deleted file mode 100644 (file)
index ee4a7e8..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function(angular) {
-
-  var app = angular.module('exampleApp', [
-    'angular-elastic-builder',
-  ]);
-
-  app.controller('BasicController', function() {
-
-    var data = this.data = {};
-
-    data.query = [
-      {
-        'and': [
-          {
-            'range': {
-              'test.number': {
-                'gte': 650
-              }
-            }
-          },
-          {
-            'range': {
-              'test.number': {
-                'lt': 850
-              }
-            }
-          }
-        ]
-      },
-      {
-        'term': {
-          'test.boolean': 0
-        }
-      },
-      {
-        'terms': {
-          'test.state.multi': [ 'AZ', 'CT' ]
-        }
-      },
-      {
-        'not': {
-          'filter': {
-            'term': {
-              'test.term': 'asdfasdf'
-            }
-          }
-        }
-      },
-      {
-        'exists': {
-          'field': 'test.term'
-        }
-      }
-    ];
-
-    data.fields = {
-      'test.number': { type: 'number', minimum: 650 },
-      'test.term': { type: 'term' },
-      'test.boolean': { type: 'term', subType: 'boolean' },
-      'test.state.multi': { type: 'multi', choices: [ 'AZ', 'CA', 'CT' ]}
-    };
-
-    data.needsUpdate = true;
-
-    this.showQuery = function() {
-      var queryToShow = {
-        size: 0,
-        filter: { and : data.query }
-      };
-
-      return JSON.stringify(queryToShow, null, 2);
-    };
-
-  });
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/gulpfile.js b/public/assets/plugins/angular-elastic-builder-back/gulpfile.js
deleted file mode 100644 (file)
index 9194d1a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Package Dependencies
- */
-var concat = require('gulp-concat')
-  , del = require('del')
-  , header = require('gulp-header')
-  , gulp = require('gulp')
-  , templateCache = require('gulp-angular-templatecache')
-  , rename = require('gulp-rename')
-  , uglify = require('gulp-uglifyjs')
-  , util = require('util');
-
-/**
- * Local Dependencies
- */
-var pkg = require('./package.json');
-var banner = ['/**'
-  , ' * # <%= pkg.name %>'
-  , ' * ## <%= pkg.description %>'
-  , ' *'
-  , ' * @version v<%= pkg.version %>'
-  , ' * @link <%= pkg.repository.url %>'
-  , ' * @license <%= pkg.license %>'
-  , ' * @author <%= pkg.author %>'
-  , ' */'
-  , ''
-  , ''].join('\n');
-
-var filename = util.format('%s.js', pkg.name)
-  , dest = 'dist/' + filename;
-
-gulp.task('build', ['uglify']);
-gulp.task('default', ['uglify']);
-
-
-gulp.task('clean', function(done) {
-  del('./dist', done);
-});
-
-gulp.task('concat', [ 'templatecache' ], function() {
-  return gulp.src(['./src/module.js', './src/**/*.js'])
-    .pipe(concat(filename))
-    .pipe(gulp.dest('./dist'));
-});
-
-gulp.task('header', [ 'concat' ], function() {
-  return gulp.src('./dist/*.js')
-    .pipe(header(banner, { pkg: pkg }))
-    .pipe(gulp.dest('./dist'));
-});
-
-gulp.task('uglify', [ 'header' ], function() {
-  return gulp.src('./dist/*.js')
-    .pipe(uglify(dest.replace(/\.js$/, '.min.js')))
-    .pipe(gulp.dest('./'));
-});
-
-gulp.task('templatecache', [ 'clean' ], function() {
-  var TEMPLATE_HEADER = '(function(angular) {"use strict"; angular.module("<%= module %>"<%= standalone %>).run(["$templateCache", function($templateCache) {'
-    , TEMPLATE_FOOTER = '}]);})(window.angular);';
-
-  return gulp.src('src/tmpl/**/*.html')
-    .pipe(templateCache({
-      root: 'angular-elastic-builder',
-      module: 'angular-elastic-builder',
-      templateHeader: TEMPLATE_HEADER,
-      templateFooter: TEMPLATE_FOOTER,
-    }))
-    .pipe(rename('ElasticBuilderTemplates.js'))
-    .pipe(gulp.dest('src/tmpl'));
-});
-
-gulp.task('watch', [ 'templatecache', 'build' ], function() {
-  gulp.watch('src/tmpl/**/*.html', [ 'templatecache', 'build' ]);
-  gulp.watch(['src/**/**.js','!src/tmpl/ElasticBuilderTemplates.js'], [ 'build' ]);
-});
diff --git a/public/assets/plugins/angular-elastic-builder-back/package.json b/public/assets/plugins/angular-elastic-builder-back/package.json
deleted file mode 100644 (file)
index 987e3f9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "name": "angular-elastic-builder",
-  "version": "1.4.0",
-  "description": "Angular Module for building an Elasticsearch Query",
-  "author": "Dan Crews <crewsd@gmail.com>",
-  "license": "MIT",
-  "keywords": [
-    "angular",
-    "elasticsearch"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/dncrews/angular-elastic-builder.git"
-  },
-  "devDependencies": {
-    "angular-recursion": "^1.0.5",
-    "del": "^1.1.1",
-    "express": "^4.12.3",
-    "gulp": "^3.8.11",
-    "gulp-angular-templatecache": "^1.6.0",
-    "gulp-concat": "^2.5.2",
-    "gulp-header": "^1.2.2",
-    "gulp-rename": "^1.2.2",
-    "gulp-uglifyjs": "^0.6.1"
-  },
-  "scripts": {
-    "example": "node examples",
-    "test": "echo \"Error: no test specified\" && exit 1"
-  }
-}
diff --git a/public/assets/plugins/angular-elastic-builder-back/screenshot.png b/public/assets/plugins/angular-elastic-builder-back/screenshot.png
deleted file mode 100644 (file)
index ca8d57d..0000000
Binary files a/public/assets/plugins/angular-elastic-builder-back/screenshot.png and /dev/null differ
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/directives/BuilderDirective.js b/public/assets/plugins/angular-elastic-builder-back/src/directives/BuilderDirective.js
deleted file mode 100644 (file)
index 8a72214..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/BuilderDirective.js
- *
- * Angular Directive for injecting a query builder form.
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .directive('elasticBuilder', [
-      'elasticQueryService',
-
-      function EB(elasticQueryService) {
-
-        return {
-          scope: {
-            data: '=elasticBuilder',
-          },
-
-          templateUrl: 'angular-elastic-builder/BuilderDirective.html',
-
-          link: function(scope) {
-            var data = scope.data;
-
-            scope.filters = [];
-
-            /**
-             * Removes either Group or Rule
-             */
-            scope.removeChild = function(idx) {
-              scope.filters.splice(idx, 1);
-            };
-
-            /**
-             * Adds a Single Rule
-             */
-            scope.addRule = function() {
-              scope.filters.push({});
-            };
-
-            /**
-             * Adds a Group of Rules
-             */
-            scope.addGroup = function() {
-              scope.filters.push({
-                type: 'group',
-                subType: '$and',
-                rules: [],
-              });
-            };
-
-            /**
-             * Any time "outside forces" change the query, they should tell us so via
-             * `data.needsUpdate`
-             */
-            scope.$watch('data.needsUpdate', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              scope.filters = elasticQueryService.toFilters(data.query, scope.data.fields);
-              scope.data.needsUpdate = false;
-            });
-
-            /**
-             * Changes on the page update the Query
-             */
-            scope.$watch('filters', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              data.query = elasticQueryService.toQuery(scope.filters, scope.data.fields);
-            }, true);
-          }
-        };
-      }
-
-    ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/directives/Chooser.js b/public/assets/plugins/angular-elastic-builder-back/src/directives/Chooser.js
deleted file mode 100644 (file)
index 1787461..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/Chooser.js
- *
- * This file is to help recursively, to decide whether to show a group or rule
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderChooser', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderChooser(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          item: '=elasticBuilderChooser',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/ChooserDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+attrs.depth);
-            var item = scope.item;
-
-            scope.getGroupClassName = function() {
-              var level = depth;
-              if (item.type === 'group') {
-                level++;
-              }
-
-              return groupClassHelper(level);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/directives/Group.js b/public/assets/plugins/angular-elastic-builder-back/src/directives/Group.js
deleted file mode 100644 (file)
index d6b93a6..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/Group.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderGroup', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderGroup(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          group: '=elasticBuilderGroup',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/GroupDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+attrs.depth);
-            var group = scope.group;
-
-            scope.addRule = function() {
-              group.rules.push({});
-            };
-            scope.addGroup = function() {
-              group.rules.push({
-                type: 'group',
-                subType: '$and',
-                rules: [],
-              });
-            };
-
-            scope.removeChild = function(idx) {
-              group.rules.splice(idx, 1);
-            };
-
-            scope.getGroupClassName = function() {
-              return groupClassHelper(depth + 1);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/directives/Rule.js b/public/assets/plugins/angular-elastic-builder-back/src/directives/Rule.js
deleted file mode 100644 (file)
index 53268ab..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/Rule.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderRule', [
-
-    function elasticBuilderRule() {
-      return {
-        scope: {
-          elasticFields: '=',
-          rule: '=elasticBuilderRule',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/RuleDirective.html',
-
-        link: function(scope) {
-          scope.getType = function() {
-            var fields = scope.elasticFields;
-            var field = scope.rule.field;
-
-            if (!fields || !field) {
-              return;
-            }
-
-            if (fields[field].subType === 'boolean') {
-              return 'boolean';
-            }
-
-            return fields[field].type;
-          };
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/directives/RuleTypes.js b/public/assets/plugins/angular-elastic-builder-back/src/directives/RuleTypes.js
deleted file mode 100644 (file)
index 6b12536..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/RuleTypes.js
- *
- * Determines which Rule type should be displayed
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticType', [
-
-    function() {
-      return {
-        scope: {
-          type: '=elasticType',
-          rule: '=',
-          guide: '=',
-        },
-
-        template: '<ng-include src="getTemplateUrl()" />',
-
-        link: function(scope) {
-          scope.getTemplateUrl = function() {
-            var type = scope.type;
-            if (!type) {
-              return;
-            }
-
-            type = type.charAt(0).toUpperCase() + type.slice(1);
-
-            return 'angular-elastic-builder/types/' + type + '.html';
-          };
-
-          // This is a weird hack to make sure these are numbers
-          scope.booleans = ['False', 'True'];
-          scope.booleansOrder = ['True', 'False'];
-
-          scope.inputNeeded = function() {
-            var needs = [
-              'equals',
-              'notEquals',
-
-              '$gt',
-              '$gte',
-              '$lt',
-              '$lte',
-            ];
-
-            return ~needs.indexOf(scope.rule.subType);
-          };
-        },
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/module.js b/public/assets/plugins/angular-elastic-builder-back/src/module.js
deleted file mode 100644 (file)
index a4f9a9c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/module.js
- *
- * Angular Module for building an Elasticsearch query
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder', [
-    'RecursionHelper',
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/services/GroupClassHelper.js b/public/assets/plugins/angular-elastic-builder-back/src/services/GroupClassHelper.js
deleted file mode 100644 (file)
index bfd45b5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/services/GroupClassHelper.js
- *
- * This keeps all of the groups colored correctly
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('groupClassHelper', function groupClassHelper() {
-
-      return function(level) {
-        var levels = [
-          '',
-          // 'list-group-item-info',
-          // 'list-group-item-success',
-          // 'list-group-item-warning',
-          // 'list-group-item-danger',
-        ];
-
-        return levels[level % levels.length];
-      };
-    });
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/services/QueryService.js b/public/assets/plugins/angular-elastic-builder-back/src/services/QueryService.js
deleted file mode 100644 (file)
index 2354ca5..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/services/QueryService.js
- *
- * This file is used to convert filters into queries, and vice versa
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('elasticQueryService', [
-      function() {
-
-        return {
-          toFilters: toFilters,
-          toQuery: toQuery,
-        };
-      }
-    ]);
-
-  function toFilters(query, fieldMap) {
-    var filters = query.map(parseQueryGroup.bind(query, fieldMap));
-    return filters;
-  }
-
-  function toQuery(filters, fieldMap) {
-    var query = filters.map(parseFilterGroup.bind(filters, fieldMap)).filter(function(item) {
-      return !!item;
-    });
-    return query;
-  }
-
-  function parseQueryGroup(fieldMap, group, truthy) {
-    if (truthy !== false) {
-      truthy = true;
-    }
-
-    var key = Object.keys(group)[0];
-    var typeMap = {
-      or: 'group',
-      and: 'group',
-      range: 'number',
-    };
-    var type = typeMap[key] || 'item';
-    var obj = getFilterTemplate(type);
-
-    switch (key) {
-      case '$or':
-      case '$and':
-        obj.rules = group[key].map(parseQueryGroup.bind(group, fieldMap));
-        obj.subType = key;
-        break;
-      case 'missing':
-      case 'exists':
-        obj.field = group[key].field;
-        obj.subType = {
-          exists: 'exists',
-          missing: 'notExists',
-        }[key];
-        delete obj.value;
-        break;
-      case 'term':
-      case 'terms':
-        obj.field = Object.keys(group[key])[0];
-        var fieldData = fieldMap[Object.keys(group[key])[0]];
-
-        if (fieldData.type === 'multi') {
-          var vals = group[key][obj.field];
-          if (typeof vals === 'string') {
-            vals = [vals];
-          }
-          obj.values = fieldData.choices.reduce(function(prev, choice) {
-            prev[choice] = truthy === (group[key][obj.field].indexOf(choice) > -1);
-            return prev;
-          }, {});
-        } else {
-          obj.subType = truthy ? 'equals' : 'notEquals';
-          obj.value = group[key][obj.field];
-
-          if (typeof obj.value === 'number') {
-            obj.subType = 'boolean';
-          }
-        }
-        break;
-      case 'range':
-        obj.field = Object.keys(group[key])[0];
-        obj.subType = Object.keys(group[key][obj.field])[0];
-        obj.value = group[key][obj.field][obj.subType];
-        break;
-      case 'not':
-        obj = parseQueryGroup(fieldMap, group[key].filter, false);
-        break;
-      default:
-        obj.field = Object.keys(group[key])[0];
-        break;
-    }
-
-    return obj;
-  }
-
-  function parseFilterGroup(fieldMap, group) {
-    var obj = {};
-    if (group.type === 'group') {
-      obj[group.subType] = group.rules.map(parseFilterGroup.bind(group, fieldMap)).filter(function(item) {
-        return !!item;
-      });
-      return obj;
-    }
-
-    var fieldName = group.field;
-    var fieldData = fieldMap[fieldName];
-
-    if (!fieldName) {
-      return;
-    }
-
-    switch (fieldData.type) {
-      case 'term':
-        if (fieldData.subType === 'boolean') {
-          group.subType = 'boolean';
-        }
-
-        if (!group.subType) {
-          return;
-        }
-        switch (group.subType) {
-          case 'equals':
-          case 'boolean':
-            if (group.value === undefined) {
-              return;
-            }
-            obj[fieldName] = group.value;
-            break;
-          case 'notEquals':
-            if (group.value === undefined) {
-              return;
-            }
-            obj[fieldName] = {
-              $ne: group.value
-            };
-            break;
-          case 'exists':
-            obj.exists = {
-              field: fieldName
-            };
-            break;
-          case 'notExists':
-            obj.missing = {
-              field: fieldName
-            };
-            break;
-          default:
-            throw new Error('unexpected subtype ' + group.subType);
-        }
-        break;
-
-      case 'select':
-
-      case 'number':
-        obj[fieldName] = {};
-
-        switch (group.subType) {
-          case 'equals':
-            obj[fieldName] = group.value;
-            break;
-          default:
-            obj[fieldName][group.subType] = group.value;
-        }
-
-        break;
-
-      case 'date':
-        if (group.subType === 'exists') {
-          obj.exists = {
-            field: fieldName
-          };
-        } else if (group.subType === 'notExists') {
-          obj.missing = {
-            field: fieldName
-          };
-        } else {
-          throw new Error('unexpected subtype');
-        }
-
-        break;
-
-      case 'multi':
-        obj.terms = {};
-        obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-          if (group.values[key]) {
-            prev.push(key);
-          }
-
-          return prev;
-        }, []);
-        break;
-
-        // case 'multi':
-        //   obj.terms = {};
-        //   obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-        //     if (group.values[key]) {
-        //       prev.push(key);
-        //     }
-        //
-        //     return prev;
-        //   }, []);
-        //   break;
-
-      default:
-        throw new Error('unexpected type');
-    }
-
-    return obj;
-  }
-
-  function getFilterTemplate(type) {
-    var templates = {
-      group: {
-        type: 'group',
-        subType: '',
-        rules: [],
-      },
-      item: {
-        field: '',
-        subType: '',
-        value: '',
-      },
-      number: {
-        field: '',
-        subType: '',
-        value: null,
-      }
-    };
-
-    return angular.copy(templates[type]);
-  }
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/BuilderDirective.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/BuilderDirective.html
deleted file mode 100644 (file)
index 1f6866a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- <div class="elastic-builder">
-  <div class="filter-panels"> -->
-    <div class="list-group form-inline list-group-item-custom">
-      <div
-        data-ng-repeat="filter in filters"
-        data-elastic-builder-chooser="filter"
-        data-elastic-fields="data.fields"
-        data-on-remove="removeChild($index)"
-        data-depth="0"></div>
-      <div class="list-group-item actions">
-        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">
-                                 <i class="icon-plus"></i> {{ 'APPLICATION_ADD_CONDITION' | translate }}
-                               </a>
-        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">
-                                 <i class="icon-plus"></i> {{ 'APPLICATION_ADD_GROUP' | translate }}
-                               </a>
-      </div>
-    </div>
-  <!-- </div>
-</div> -->
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/ChooserDirective.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/ChooserDirective.html
deleted file mode 100644 (file)
index dc64e01..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="list-group-item elastic-builder-chooser list-group-item-custom" data-ng-class="getGroupClassName()">
-  <div data-ng-if="item.type === 'group'"
-    data-elastic-builder-group="item"
-    data-depth="{{ depth }}"
-    data-elastic-fields="elasticFields"
-    data-on-remove="onRemove()"></div>
-  <div data-ng-if="item.type !== 'group'"
-    data-elastic-builder-rule="item"
-    data-elastic-fields="elasticFields"
-    data-on-remove="onRemove()"></div>
-</div>
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/ElasticBuilderTemplates.js b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/ElasticBuilderTemplates.js
deleted file mode 100644 (file)
index 8e864aa..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-(function(angular) {"use strict"; angular.module("angular-elastic-builder").run(["$templateCache", function($templateCache) {$templateCache.put("angular-elastic-builder/BuilderDirective.html","<!-- <div class=\"elastic-builder\">\n  <div class=\"filter-panels\"> -->\n    <div class=\"list-group form-inline list-group-item-custom\">\n      <div\n        data-ng-repeat=\"filter in filters\"\n        data-elastic-builder-chooser=\"filter\"\n        data-elastic-fields=\"data.fields\"\n        data-on-remove=\"removeChild($index)\"\n        data-depth=\"0\"></div>\n      <div class=\"list-group-item actions\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n                           <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n                         </a>\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\n                            <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                             </a>\n      </div>\n    </div>\n  <!-- </div>\n</div> -->\n");
-$templateCache.put("angular-elastic-builder/ChooserDirective.html","<div class=\"list-group-item elastic-builder-chooser list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\n  <div data-ng-if=\"item.type === \'group\'\"\n    data-elastic-builder-group=\"item\"\n    data-depth=\"{{ depth }}\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n  <div data-ng-if=\"item.type !== \'group\'\"\n    data-elastic-builder-rule=\"item\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n</div>\n");
-$templateCache.put("angular-elastic-builder/GroupDirective.html","<!-- 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-people font-green-sharp\"></i> -->\n      <h5><span class=\"caption-subject\">If</span>\n        <select data-ng-model=\"group.subType\" class=\"form-control\">\n          <option value=\"$and\"><strong>all</strong></option>\n          <option value=\"$or\"><strong>any</strong></option>\n        </select>\n        <span class=\"caption-subject\">of these conditions are met</span>\n      </h5>\n    </div>\n  </div>\n  <div class=\"portlet-body\">\n    <div class=\"elastic-builder-group\">\n      <div\n        data-ng-repeat=\"rule in group.rules\"\n        data-elastic-builder-chooser=\"rule\"\n        data-elastic-fields=\"elasticFields\"\n        data-depth=\"{{ +depth + 1 }}\"\n        data-on-remove=\"removeChild($index)\"></div>\n\n      <div class=\"list-group-item actions list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n          <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n        </a>\n        <a class=\"btn red btn-sm remover\" data-ng-click=\"onRemove()\">\n          <i class=\"icon-trash\"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\n        </a>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END Portlet PORTLET-->\n");
-$templateCache.put("angular-elastic-builder/RuleDirective.html","<!-- <div class=\"elastic-builder-rule\"> -->\n  <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select>\n\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\n\n  <!-- <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\n    <i class=\"fa fa-minus\"></i>\n  </a> -->\n\n  <a class=\"btn remover\" data-ng-click=\"onRemove()\">\n    <i class=\"icon-trash\"></i>\n  </a>\n\n<!-- </div> -->\n");
-$templateCache.put("angular-elastic-builder/types/Boolean.html","<span class=\"boolean-rule\">\n  Equals\n\n  <!-- This is a weird hack to make sure these are numbers -->\n  <select\n    data-ng-model=\"rule.value\"\n    class=\"form-control\"\n    data-ng-options=\"booleans.indexOf(choice) as choice for choice in booleansOrder\">\n  </select>\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Date.html","<span class=\"date-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n\n    <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup>\n  </select>\n\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Multi.html","<span class=\"multi-rule\">\n  <span data-ng-repeat=\"choice in guide.choices\">\n    <label class=\"checkbox\">\n      <input type=\"checkbox\" data-ng-model=\"rule.values[choice]\">\n      {{ choice }}\n    </label>\n  </span>\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Number.html","<span class=\"number-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option value=\"equals\">=</option>\n      <option value=\"$gt\">&gt;</option>\n      <option value=\"$gte\">&ge;</option>\n      <option value=\"$lt\">&lt;</option>\n      <option value=\"$lte\">&le;</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <input data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"number\"\n    min=\"{{ guide.minimum }}\"\n    max=\"{{ guide.maximum }}\">\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Select.html","<span class=\"number-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option value=\"equals\">=</option>\n      <!-- <option value=\"$gt\">&gt;</option>\n      <option value=\"$gte\">&ge;</option>\n      <option value=\"$lt\">&lt;</option>\n      <option value=\"$lte\">&le;</option> -->\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option data-ng-repeat=\"choice in guide.choices\" value=\"{{choice.value}}\">{{choice.key}}</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- <input data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"number\"\n    min=\"{{ guide.minimum }}\"\n    max=\"{{ guide.maximum }}\"> -->\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Term.html","<span class=\"elastic-term\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- Term Options -->\n    <!-- <optgroup label=\"Text\"> -->\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n    <!-- </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n\n  </select>\n  <input\n    data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"text\">\n</span>\n");}]);})(window.angular);
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/GroupDirective.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/GroupDirective.html
deleted file mode 100644 (file)
index 6051da3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!-- BEGIN Portlet PORTLET-->
-<div class="portlet light bordered">
-  <div class="portlet-title">
-    <div class="caption font-green-sharp">
-      <!-- <i class="icon-people font-green-sharp"></i> -->
-      <h5><span class="caption-subject">If</span>
-        <select data-ng-model="group.subType" class="form-control">
-          <option value="$and"><strong>all</strong></option>
-          <option value="$or"><strong>any</strong></option>
-        </select>
-        <span class="caption-subject">of these conditions are met</span>
-      </h5>
-    </div>
-  </div>
-  <div class="portlet-body">
-    <div class="elastic-builder-group">
-      <div
-        data-ng-repeat="rule in group.rules"
-        data-elastic-builder-chooser="rule"
-        data-elastic-fields="elasticFields"
-        data-depth="{{ +depth + 1 }}"
-        data-on-remove="removeChild($index)"></div>
-
-      <div class="list-group-item actions list-group-item-custom" data-ng-class="getGroupClassName()">
-        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">
-          <i class="icon-plus"></i> {{ 'APPLICATION_ADD_CONDITION' | translate }}
-        </a>
-        <a class="btn red btn-sm remover" data-ng-click="onRemove()">
-          <i class="icon-trash"></i> {{ 'APPLICATION_REMOVE_GROUP' | translate }}
-        </a>
-      </div>
-    </div>
-  </div>
-</div>
-<!-- END Portlet PORTLET-->
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/RuleDirective.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/RuleDirective.html
deleted file mode 100644 (file)
index 40dd570..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!-- <div class="elastic-builder-rule"> -->
-  <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select>
-
-  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>
-
-  <!-- <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">
-    <i class="fa fa-minus"></i>
-  </a> -->
-
-  <a class="btn remover" data-ng-click="onRemove()">
-    <i class="icon-trash"></i>
-  </a>
-
-<!-- </div> -->
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Boolean.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Boolean.html
deleted file mode 100644 (file)
index 1ac8380..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<span class="boolean-rule">
-  Equals
-
-  <!-- This is a weird hack to make sure these are numbers -->
-  <select
-    data-ng-model="rule.value"
-    class="form-control"
-    data-ng-options="booleans.indexOf(choice) as choice for choice in booleansOrder">
-  </select>
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Date.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Date.html
deleted file mode 100644 (file)
index 377edd4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<span class="date-rule">
-  <select data-ng-model="rule.subType" class="form-control">
-
-    <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup>
-  </select>
-
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Multi.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Multi.html
deleted file mode 100644 (file)
index 3c0e5a1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<span class="multi-rule">
-  <span data-ng-repeat="choice in guide.choices">
-    <label class="checkbox">
-      <input type="checkbox" data-ng-model="rule.values[choice]">
-      {{ choice }}
-    </label>
-  </span>
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Number.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Number.html
deleted file mode 100644 (file)
index 7a9040e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<span class="number-rule">
-  <select data-ng-model="rule.subType" class="form-control">
-    <!-- <optgroup label="Numeral"> -->
-      <option value="equals">=</option>
-      <option value="$gt">&gt;</option>
-      <option value="$gte">&ge;</option>
-      <option value="$lt">&lt;</option>
-      <option value="$lte">&le;</option>
-    <!-- </optgroup> -->
-
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup> -->
-  </select>
-
-  <!-- Range Fields -->
-  <input data-ng-if="inputNeeded()"
-    class="form-control"
-    data-ng-model="rule.value"
-    type="number"
-    min="{{ guide.minimum }}"
-    max="{{ guide.maximum }}">
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Select.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Select.html
deleted file mode 100644 (file)
index cf2e560..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<span class="number-rule">
-  <select data-ng-model="rule.subType" class="form-control">
-    <!-- <optgroup label="Numeral"> -->
-      <option value="equals">=</option>
-      <!-- <option value="$gt">&gt;</option>
-      <option value="$gte">&ge;</option>
-      <option value="$lt">&lt;</option>
-      <option value="$lte">&le;</option> -->
-    <!-- </optgroup> -->
-
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup> -->
-  </select>
-
-  <!-- Range Fields -->
-  <select data-ng-model="rule.value" class="form-control">
-    <!-- <optgroup label="Numeral"> -->
-      <option data-ng-repeat="choice in guide.choices" value="{{choice.value}}">{{choice.key}}</option>
-    <!-- </optgroup> -->
-
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup> -->
-  </select>
-
-  <!-- <input data-ng-if="inputNeeded()"
-    class="form-control"
-    data-ng-model="rule.value"
-    type="number"
-    min="{{ guide.minimum }}"
-    max="{{ guide.maximum }}"> -->
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Term.html b/public/assets/plugins/angular-elastic-builder-back/src/tmpl/types/Term.html
deleted file mode 100644 (file)
index 06a4c58..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<span class="elastic-term">
-  <select data-ng-model="rule.subType" class="form-control">
-    <!-- Term Options -->
-    <!-- <optgroup label="Text"> -->
-      <option value="equals">{{ 'APPLICATION_EQUALS_TO' | translate }}</option>
-      <option value="notEquals">{{ 'APPLICATION_NOT_EQUALS_TO' | translate }}</option>
-    <!-- </optgroup> -->
-
-    <!-- Generic Options -->
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup> -->
-
-  </select>
-  <input
-    data-ng-if="inputNeeded()"
-    class="form-control"
-    data-ng-model="rule.value"
-    type="text">
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder/.bower.json b/public/assets/plugins/angular-elastic-builder/.bower.json
deleted file mode 100644 (file)
index 1b348aa..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "name": "angular-elastic-builder",
-  "homepage": "https://github.com/dncrews/angular-elastic-builder",
-  "authors": [
-    "Dan Crews <crewsd@gmail.com>"
-  ],
-  "description": "Angular Module for building an Elasticsearch Query",
-  "main": "dist/angular-elastic-builder.js",
-  "keywords": [
-    "elasticsearch",
-    "angular"
-  ],
-  "license": "MIT",
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "bower_components",
-    "test",
-    "tests"
-  ],
-  "version": "1.4.0",
-  "_release": "1.4.0",
-  "_resolution": {
-    "type": "version",
-    "tag": "1.4.0",
-    "commit": "5794b36762eb825433a836dbae055be841ee057c"
-  },
-  "_source": "git://github.com/dncrews/angular-elastic-builder.git",
-  "_target": "~1.4.0",
-  "_originalSource": "angular-elastic-builder",
-  "_direct": true
-}
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder/LICENSE.md b/public/assets/plugins/angular-elastic-builder/LICENSE.md
deleted file mode 100644 (file)
index ea15051..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright Â© 2014 by Intellectual Reserve, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
diff --git a/public/assets/plugins/angular-elastic-builder/README.md b/public/assets/plugins/angular-elastic-builder/README.md
deleted file mode 100644 (file)
index d05655b..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-# Angular Elasticsearch Query Builder
-
-[![NPM version][npm-image]][npm-url]
-![Bower version][bower-image]
-[![Downloads][downloads-image]][downloads-url]
-[![Tips][gratipay-image]][gratipay-url]
-
-This is an Angular.js directive for building an [Elasticsearch](https://www.elastic.co/) query.
-You just give it the fields and can generate a query for it. Its layout is defined using [Bootstrap](http://getbootstrap.com/) classes, but you may also choose to just style it yourself.
-
-It's still pretty early on, as it doesn't support a whole lot of use-cases, but we need to make it awesome. Contributions accepted.
-
-## Try it Out
-[View an example here](http://dncrews.com/angular-elastic-builder/examples/)
-
-## Usage
-
-### Dependency
-Notice: this plugin requires the [Angular Recursion](https://github.com/marklagendijk/angular-recursion) module.
-
-### Installation
-First you'll need to download the [dist](https://github.com/dncrews/angular-elastic-builder/tree/master/dist) files and include this JS file to your app (don't forget to substitute `x.x.x` with the current version number), along with the RecursionHelper, if you're not already using it.
-```html
-<script type="text/javascript" src="/angular-recursion.min.js"></script>
-<script type="text/javascript" src="/angular-elastic-builder.min.js"></script>
-```
-
-Then make sure that it's included in your app's dependencies during module creation.
-
-```js
-angularmodule('appName', [ 'angular-elastic-builder' ]);
-```
-
-Then you can use it in your app
-```js
-/* Controller code */
-
-/**
- * The elasticBuilderData object will be modified in place so that you can use
- * your own $watch, and/or your own saving mechanism
- */
-$scope.elasticBuilderData = {};
-$scope.elasticBuilderData.query = [];
-
-/**
- * This object is the lookup for what fields
- * are available in your database, as well as definitions of what kind
- * of data they are
- */
-$scope.elasticBuilderData.fields = {
-  'some.number.field': { type: 'number' },
-  'some.term.field': { type: 'term' },
-  'some.boolean.field': { type: 'term', subType: 'boolean' },
-  'multi.selector': { type: 'multi', choices: [ 'AZ', 'CA', 'CT' ]}
-};
-```
-
-```html
-<div data-elastic-builder="elasticBuilderData"></div>
-```
-
-The above elasticFields would allow you create the following form:
-![Screenshot][screenshot-image]
-
-Which represents the following Elasticsearch Query:
-```json
-[
-  {
-    "terms": {
-      "multi.selector": [
-        "AZ",
-        "CT"
-      ]
-    }
-  },
-  {
-    "term": {
-      "some.boolean.field": "0"
-    }
-  },
-  {
-    "not": {
-      "filter": {
-        "term": {
-          "some.term.field": "Hello World"
-        }
-      }
-    }
-  },
-  {
-    "and": [
-      {
-        "range": {
-          "some.number.field": {
-            "gte": 0
-          }
-        }
-      },
-      {
-        "range": {
-          "some.number.field": {
-            "lt": 100
-          }
-        }
-      }
-    ]
-  }
-]
-```
-
-
-### Field Options
-  - `type`: This determines how the fields are displayed in the form.
-    - Currently supported:
-      - `'number'`: in addition to Generic Options, gets "&gt;", "&ge;", "&lt;", "&le;", "="
-      - `'term'`: in addition to Generic Options, gets "Equals" and "! Equals"
-      - `'boolean'`: Does not get Generic Options. Gets `true` and `false`
-        - These are actually "equals 0" and "equals 1" for the database query
-
-Generic Options
-  - In addition to any specific options for fields, all fields also get a "Exists" and "! Exists" option
-
-
-## External Changes && Initial State
-If you want to pass in an initial state (or if you make changes to the query externally), you'll need to
-set the configuration flag `needsUpdate` to `true`. Any time this flag changes to `true`, this directive
-will overwrite the current state and data with whatever is now defined in your configuration object.
-
-
-## Local Development
-To work on this module locally, you will need to clone it and run `gulp watch`. This will ensure that your changes get compiled properly. You will also need to make sure you run `gulp` to build the "dist" files before commit.
-
-
-[npm-image]: https://img.shields.io/npm/v/angular-elastic-builder.svg
-[npm-url]: https://www.npmjs.org/package/angular-elastic-builder
-[bower-image]: https://img.shields.io/bower/v/angular-elastic-builder.svg
-[downloads-image]: https://img.shields.io/npm/dm/angular-elastic-builder.svg
-[downloads-url]: https://www.npmjs.org/package/angular-elastic-builder
-[gratipay-image]: https://img.shields.io/gratipay/dncrews.svg
-[gratipay-url]: https://www.gratipay.com/dncrews/
-[screenshot-image]: https://raw.githubusercontent.com/dncrews/angular-elastic-builder/master/screenshot.png
diff --git a/public/assets/plugins/angular-elastic-builder/bower.json b/public/assets/plugins/angular-elastic-builder/bower.json
deleted file mode 100644 (file)
index 43641b1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "name": "angular-elastic-builder",
-  "homepage": "https://github.com/dncrews/angular-elastic-builder",
-  "authors": [
-    "Dan Crews <crewsd@gmail.com>"
-  ],
-  "description": "Angular Module for building an Elasticsearch Query",
-  "main": "dist/angular-elastic-builder.js",
-  "keywords": [
-    "elasticsearch",
-    "angular"
-  ],
-  "license": "MIT",
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "bower_components",
-    "test",
-    "tests"
-  ]
-}
diff --git a/public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder.js b/public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder.js
deleted file mode 100644 (file)
index 4b51820..0000000
+++ /dev/null
@@ -1,590 +0,0 @@
-/**
- * # angular-elastic-builder
- * ## Angular Module for building an Elasticsearch Query
- *
- * @version v1.4.0
- * @link https://github.com/dncrews/angular-elastic-builder.git
- * @license MIT
- * @author Dan Crews <crewsd@gmail.com>
- */
-
-/**
- * angular-elastic-builder
- *
- * /src/module.js
- *
- * Angular Module for building an Elasticsearch query
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder', [
-    'RecursionHelper',
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/BuilderDirective.js
- *
- * Angular Directive for injecting a query builder form.
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .directive('elasticBuilder', [
-      'elasticQueryService',
-
-      function EB(elasticQueryService) {
-
-        return {
-          scope: {
-            data: '=elasticBuilder',
-          },
-
-          templateUrl: 'angular-elastic-builder/BuilderDirective.html',
-
-          link: function(scope) {
-            var data = scope.data;
-
-            scope.filters = [];
-
-            /**
-             * Removes either Group or Rule
-             */
-            scope.removeChild = function(idx) {
-              scope.filters.splice(idx, 1);
-            };
-
-            /**
-             * Adds a Single Rule
-             */
-            scope.addRule = function() {
-              scope.filters.push({});
-            };
-
-            /**
-             * Adds a Group of Rules
-             */
-            scope.addGroup = function() {
-              scope.filters.push({
-                type: 'group',
-                subType: 'and',
-                rules: [],
-              });
-            };
-
-            /**
-             * Any time "outside forces" change the query, they should tell us so via
-             * `data.needsUpdate`
-             */
-            scope.$watch('data.needsUpdate', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              scope.filters = elasticQueryService.toFilters(data.query, scope.data.fields);
-              scope.data.needsUpdate = false;
-            });
-
-            /**
-             * Changes on the page update the Query
-             */
-            scope.$watch('filters', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              data.query = elasticQueryService.toQuery(scope.filters, scope.data.fields);
-            }, true);
-          }
-        };
-      }
-
-    ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Chooser.js
- *
- * This file is to help recursively, to decide whether to show a group or rule
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderChooser', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderChooser(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          item: '=elasticBuilderChooser',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/ChooserDirective.html',
-
-        compile: function (element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+ attrs.depth)
-              , item = scope.item;
-
-            scope.getGroupClassName = function() {
-              var level = depth;
-              if (item.type === 'group') level++;
-
-              return groupClassHelper(level);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Group.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderGroup', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderGroup(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          group: '=elasticBuilderGroup',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/GroupDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+ attrs.depth);
-            var group = scope.group;
-
-            scope.addRule = function() {
-              group.rules.push({});
-            };
-            scope.addGroup = function() {
-              group.rules.push({
-                type: 'group',
-                subType: 'and',
-                rules: [],
-              });
-            };
-
-            scope.removeChild = function(idx) {
-              group.rules.splice(idx, 1);
-            };
-
-            scope.getGroupClassName = function() {
-              return groupClassHelper(depth + 1);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Rule.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderRule', [
-
-    function elasticBuilderRule() {
-      return {
-        scope: {
-          elasticFields: '=',
-          rule: '=elasticBuilderRule',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/RuleDirective.html',
-
-        link: function(scope) {
-          scope.getType = function() {
-            var fields = scope.elasticFields;
-            var field = scope.rule.field;
-
-            if (!fields || !field) {
-              return;
-            }
-
-            if (fields[field].subType === 'boolean') {
-              return 'boolean';
-            }
-
-            return fields[field].type;
-          };
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/RuleTypes.js
- *
- * Determines which Rule type should be displayed
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticType', [
-
-    function() {
-      return {
-        scope: {
-          type: '=elasticType',
-          rule: '=',
-          guide: '=',
-        },
-
-        template: '<ng-include src="getTemplateUrl()" />',
-
-        link: function(scope) {
-          scope.getTemplateUrl = function() {
-            var type = scope.type;
-            if (! type) return;
-
-            type = type.charAt(0).toUpperCase() + type.slice(1);
-
-            return 'angular-elastic-builder/types/' + type + '.html';
-          };
-
-          // This is a weird hack to make sure these are numbers
-          scope.booleans = [ 'False', 'True' ];
-          scope.booleansOrder = [ 'True', 'False' ];
-
-          scope.inputNeeded = function() {
-            var needs = [
-              'equals',
-              'notEquals',
-
-              'gt',
-              'gte',
-              'lt',
-              'lte',
-            ];
-
-            return ~needs.indexOf(scope.rule.subType);
-          };
-        },
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/services/GroupClassHelper.js
- *
- * This keeps all of the groups colored correctly
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('groupClassHelper', function groupClassHelper() {
-
-      return function(level) {
-        var levels = [
-          '',
-          // 'list-group-item-info',
-          // 'list-group-item-success',
-          // 'list-group-item-warning',
-          // 'list-group-item-danger',
-        ];
-
-        return levels[level % levels.length];
-      };
-    });
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/services/QueryService.js
- *
- * This file is used to convert filters into queries, and vice versa
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('elasticQueryService', [
-      function() {
-
-        return {
-          toFilters: toFilters,
-          toQuery: toQuery,
-        };
-      }
-    ]);
-
-  function toFilters(query, fieldMap) {
-    var filters = query.map(parseQueryGroup.bind(query, fieldMap));
-    return filters;
-  }
-
-  function toQuery(filters, fieldMap) {
-    var query = filters.map(parseFilterGroup.bind(filters, fieldMap)).filter(function(item) {
-      return !!item;
-    });
-    return query;
-  }
-
-  function parseQueryGroup(fieldMap, group, truthy) {
-    if (truthy !== false) {
-      truthy = true;
-    }
-
-    var key = Object.keys(group)[0],
-      typeMap = {
-        or: 'group',
-        and: 'group',
-        range: 'number',
-      },
-      type = typeMap[key] || 'item',
-      obj = getFilterTemplate(type);
-
-    switch (key) {
-      case 'or':
-      case 'and':
-        obj.rules = group[key].map(parseQueryGroup.bind(group, fieldMap));
-        obj.subType = key;
-        break;
-      case 'missing':
-      case 'exists':
-        obj.field = group[key].field;
-        obj.subType = {
-          exists: 'exists',
-          missing: 'notExists',
-        }[key];
-        delete obj.value;
-        break;
-      case 'term':
-      case 'terms':
-        obj.field = Object.keys(group[key])[0];
-        var fieldData = fieldMap[Object.keys(group[key])[0]];
-
-        if (fieldData.type === 'multi') {
-          var vals = group[key][obj.field];
-          if (typeof vals === 'string') {
-            vals = [vals];
-          }
-          // MY CUSTOM MODIFICATION
-          obj.value = group[key][obj.field];
-          // obj.values = fieldData.choices.reduce(function(prev, choice) {
-          //   prev[choice] = truthy === (group[key][obj.field].indexOf(choice) > -1);
-          //   return prev;
-          // }, {});
-        } else {
-          obj.subType = truthy ? 'equals' : 'notEquals';
-          obj.value = group[key][obj.field];
-
-          if (typeof obj.value === 'number') {
-            obj.subType = 'boolean';
-          }
-        }
-        break;
-      case 'range':
-        obj.field = Object.keys(group[key])[0];
-        obj.subType = Object.keys(group[key][obj.field])[0];
-        obj.value = group[key][obj.field][obj.subType];
-        break;
-      case 'not':
-        obj = parseQueryGroup(fieldMap, group[key].filter, false);
-        break;
-      default:
-        obj.field = Object.keys(group[key])[0];
-        break;
-    }
-
-    return obj;
-  }
-
-  function parseFilterGroup(fieldMap, group) {
-    var obj = {};
-    if (group.type === 'group') {
-      obj[group.subType] = group.rules.map(parseFilterGroup.bind(group, fieldMap)).filter(function(item) {
-        return !!item;
-      });
-      return obj;
-    }
-
-    var fieldName = group.field;
-    var fieldData = fieldMap[fieldName];
-
-    if (!fieldName) {
-      return;
-    }
-
-    switch (fieldData.type) {
-      case 'term':
-      case 'multiterm':
-        if (fieldData.subType === 'boolean') {
-          group.subType = 'boolean';
-        }
-
-        if (!group.subType) {
-          return;
-        }
-        switch (group.subType) {
-          case 'equals':
-          case 'boolean':
-            if (group.value === undefined) {
-              return;
-            }
-            obj.term = {};
-            obj.term[fieldName] = group.value;
-            break;
-          case 'notEquals':
-            if (group.value === undefined) {
-              return;
-            }
-            obj.not = {
-              filter: {
-                term: {}
-              }
-            };
-            obj.not.filter.term[fieldName] = group.value;
-            break;
-          case 'exists':
-            obj.exists = {
-              field: fieldName
-            };
-            break;
-          case 'notExists':
-            obj.missing = {
-              field: fieldName
-            };
-            break;
-          default:
-            throw new Error('unexpected subtype ' + group.subType);
-        }
-        break;
-
-      case 'number':
-        obj.range = {};
-        obj.range[fieldName] = {};
-        obj.range[fieldName][group.subType] = group.value;
-        break;
-
-      case 'date':
-        if (group.subType === 'exists') {
-          obj.exists = {
-            field: fieldName
-          };
-        } else if (group.subType === 'notExists') {
-          obj.missing = {
-            field: fieldName
-          };
-        } else {
-          throw new Error('unexpected subtype');
-        }
-
-        break;
-
-      case 'multi':
-        obj.terms = {};
-        obj.terms[fieldName] = group.value;
-        // obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-        //   if (group.values[key]) prev.push(key);
-        //
-        //   return prev;
-        // }, []);
-        break;
-
-      default:
-        throw new Error('unexpected type');
-    }
-
-    return obj;
-  }
-
-  function getFilterTemplate(type) {
-    var templates = {
-      group: {
-        type: 'group',
-        subType: '',
-        rules: [],
-      },
-      item: {
-        field: '',
-        subType: '',
-        value: '',
-      },
-      number: {
-        field: '',
-        subType: '',
-        value: null,
-      }
-    };
-
-    return angular.copy(templates[type]);
-  }
-
-})(window.angular);
-
-(function(angular) {"use strict"; angular.module("angular-elastic-builder").run(["$templateCache", function($templateCache) {$templateCache.put("angular-elastic-builder/BuilderDirective.html","<!-- <div class=\"elastic-builder\">\n  <div class=\"filter-panels\">\n    <div class=\"list-group form-inline\">\n      <div\n        data-ng-repeat=\"filter in filters\"\n        data-elastic-builder-chooser=\"filter\"\n        data-elastic-fields=\"data.fields\"\n        data-on-remove=\"removeChild($index)\"\n        data-depth=\"0\"></div>\n      <div class=\"list-group-item actions\">\n        <a class=\"btn btn-xs btn-primary\" title=\"Add Rule\" data-ng-click=\"addRule()\">\n          <i class=\"fa fa-plus\"></i>\n        </a>\n        <a class=\"btn btn-xs btn-primary\" title=\"Add Group\" data-ng-click=\"addGroup()\">\n          <i class=\"fa fa-list\"></i>\n        </a>\n      </div>\n    </div>\n  </div>\n</div> -->\n\n<!-- <div class=\"elastic-builder\">\n  <div class=\"filter-panels\"> -->\n    <div class=\"list-group form-inline list-group-item-custom\" ng-switch=\"data.type\">\n      <div\n        data-ng-repeat=\"filter in filters\"\n        data-elastic-builder-chooser=\"filter\"\n        data-elastic-fields=\"data.fields\"\n        data-on-remove=\"removeChild($index)\"\n        data-depth=\"0\">\n      </div>\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-when=\"condition\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\n                                 <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                             </a>\n      </div>\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-when=\"action\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_ACTION\' | translate }}\n                            </a>\n      </div>\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-default>\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n                         </a>\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\n                            <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\n                             </a>\n      </div>\n    </div>\n  <!-- </div>\n</div> -->\n");
-$templateCache.put("angular-elastic-builder/ChooserDirective.html","<!-- <div\n  class=\"list-group-item elastic-builder-chooser\"\n  data-ng-class=\"getGroupClassName()\">\n\n  <div data-ng-if=\"item.type === \'group\'\"\n    data-elastic-builder-group=\"item\"\n    data-depth=\"{{ depth }}\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n\n  <div data-ng-if=\"item.type !== \'group\'\"\n    data-elastic-builder-rule=\"item\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n\n</div> -->\n\n\n<div class=\"list-group-item elastic-builder-chooser list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\n  <div data-ng-if=\"item.type === \'group\'\"\n    data-elastic-builder-group=\"item\"\n    data-depth=\"{{ depth }}\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n  <div data-ng-if=\"item.type !== \'group\'\"\n    data-elastic-builder-rule=\"item\"\n    data-elastic-fields=\"elasticFields\"\n    data-on-remove=\"onRemove()\"></div>\n</div>\n");
-$templateCache.put("angular-elastic-builder/GroupDirective.html","<!-- <div class=\"elastic-builder-group\">\n  <h5>If\n    <select data-ng-model=\"group.subType\" class=\"form-control\">\n      <option value=\"and\">all</option>\n      <option value=\"or\">any</option>\n    </select>\n    of these conditions are met\n  </h5>\n  <div\n    data-ng-repeat=\"rule in group.rules\"\n    data-elastic-builder-chooser=\"rule\"\n    data-elastic-fields=\"elasticFields\"\n    data-depth=\"{{ +depth + 1 }}\"\n    data-on-remove=\"removeChild($index)\"></div>\n\n  <div class=\"list-group-item actions\" data-ng-class=\"getGroupClassName()\">\n    <a class=\"btn btn-xs btn-primary\" title=\"Add Sub-Rule\" data-ng-click=\"addRule()\">\n      <i class=\"fa fa-plus\"></i>\n    </a>\n    <a class=\"btn btn-xs btn-primary\" title=\"Add Sub-Group\" data-ng-click=\"addGroup()\">\n      <i class=\"fa fa-list\"></i>\n    </a>\n  </div>\n\n  <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\n    <i class=\"fa fa-minus\"></i>\n  </a>\n</div> -->\n\n\n<!-- BEGIN Portlet PORTLET-->\n<div class=\"portlet light\">\n  <div class=\"portlet-title\">\n    <div class=\"caption\" data-ng-class=\"{\'font-blue-hoki\': data.type === \'condition\', \'font-red-flamingo\': data.type === \'action\'}\">\n      <!-- <i class=\"icon-people font-green-sharp\"></i> -->\n      <h5><span class=\"caption-subject\">{{ \'APPLICATION_IF\' | translate }}</span>\n        <select data-ng-model=\"group.subType\" class=\"form-control\">\n          <option value=\"and\"><strong>{{ \'APPLICATION_ALL\' | translate | lowercase }}</strong></option>\n          <option value=\"or\"><strong>{{ \'APPLICATION_ANY\' | translate | lowercase }}</strong></option>\n        </select>\n        <span class=\"caption-subject\">{{group.subType == \'and\' ? \'MESSAGE_CODITIONS_MET_ALL\' : \'MESSAGE_CODITIONS_MET_ANY\' | translate}}</span>\n      </h5>\n    </div>\n  </div>\n  <div class=\"portlet-body\">\n    <div class=\"elastic-builder-group\">\n      <div\n        data-ng-repeat=\"rule in group.rules\"\n        data-elastic-builder-chooser=\"rule\"\n        data-elastic-fields=\"elasticFields\"\n        data-depth=\"{{ +depth + 1 }}\"\n        data-on-remove=\"removeChild($index)\"></div>\n\n      <div class=\"list-group-item actions list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\n          <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\n        </a>\n        <a class=\"btn red btn-sm remover\" data-ng-click=\"onRemove()\">\n          <i class=\"icon-trash\"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\n        </a>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END Portlet PORTLET-->\n");
-$templateCache.put("angular-elastic-builder/RuleDirective.html","<!-- <div class=\"elastic-builder-rule\">\n  <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select>\n\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\n\n  <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\n    <i class=\"fa fa-minus\"></i>\n  </a>\n\n</div> -->\n<!-- <div class=\"elastic-builder-rule\"> -->\n  <!-- <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select> -->\n  {{elasticFields[rule.field].action.label | translate}}\n  <select class=\"form-control\" data-ng-model=\"rule.field\" >\n  <option ng-repeat=\"option in elasticFields\" value=\"{{option.value}}\">{{ option.label | translate }}</option>\n  </select>\n  <!-- <ui-select class=\"form-control\" data-ng-model=\"rule.field\" theme=\"bootstrap\">\n    <ui-select-match placeholder=\"{{\'APPLICATION_CONDITION\' | translate}}\">{{$translate.instant($select.selected.name)}}</ui-select-match>\n    <ui-select-choices repeat=\"value.value as key for (key, value) in elasticFields | filter: $select.search\">\n      {{$translate.instant(key.name)}}\n    </ui-select-choices>\n  </ui-select> -->\n\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\n\n  <!-- <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\n    <i class=\"fa fa-minus\"></i>\n  </a> -->\n\n  <a class=\"btn remover\" data-ng-click=\"onRemove()\">\n    <i class=\"icon-trash\"></i>\n  </a>\n\n<!-- </div> -->\n");
-$templateCache.put("angular-elastic-builder/types/Boolean.html","<span class=\"boolean-rule\">\n  Equals\n\n  <!-- This is a weird hack to make sure these are numbers -->\n  <select\n    data-ng-model=\"rule.value\"\n    class=\"form-control\"\n    data-ng-options=\"booleans.indexOf(choice) as choice for choice in booleansOrder\">\n  </select>\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Date.html","<span class=\"date-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n\n    <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup>\n  </select>\n\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Multi.html","<!-- <span class=\"multi-rule\">\n  <span data-ng-repeat=\"choice in guide.choices\">\n    <label class=\"checkbox\">\n      <input type=\"checkbox\" data-ng-model=\"rule.values[choice]\">\n      {{ choice }}\n    </label>\n  </span>\n</span> -->\n\n<span class=\"multi-rule\">\n  {{guide.action.midterm | translate}}\n  <!-- Range Fields -->\n  <!-- <select data-ng-model=\"rule.values\" class=\"form-control\"> -->\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option data-ng-repeat=\"(key, value) in guide.choices\" value=\"{{value}}\">{{key}}</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n  </select>\n\n  <!-- <input data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"number\"\n    min=\"{{ guide.minimum }}\"\n    max=\"{{ guide.maximum }}\"> -->\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Multiterm.html","<span class=\"elastic-multiterm\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n  </select>\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\n      <option data-ng-repeat=\"(key, value) in guide.choices\" value=\"{{value}}\">{{value | capitalize}}</option>\n  </select>\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Number.html","<span class=\"number-rule\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- <optgroup label=\"Numeral\"> -->\n      <option value=\"equals\">=</option>\n      <option value=\"gt\">&gt;</option>\n      <option value=\"gte\">&ge;</option>\n      <option value=\"lt\">&lt;</option>\n      <option value=\"lte\">&le;</option>\n    <!-- </optgroup> -->\n\n    <!-- <optgroup label=\"Generic\"> -->\n      <!-- <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option> -->\n    <!-- </optgroup> -->\n  </select>\n\n  <!-- Range Fields -->\n  <input data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"number\"\n    min=\"{{ guide.minimum }}\"\n    max=\"{{ guide.maximum }}\">\n\n    <!-- <span class=\"help-block\">{{rule.help}}</span> -->\n\n</span>\n");
-$templateCache.put("angular-elastic-builder/types/Term.html","<!-- <span class=\"elastic-term\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\"> -->\n    <!-- Term Options -->\n    <!-- <optgroup label=\"Text\">\n      <option value=\"equals\">Equals</option>\n      <option value=\"notEquals\">! Equals</option>\n    </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup>\n\n  </select>\n  <input\n    data-ng-if=\"inputNeeded()\"\n    class=\"form-control\"\n    data-ng-model=\"rule.value\"\n    type=\"text\">\n</span> -->\n\n\n<span class=\"elastic-term\">\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\n    <!-- Term Options -->\n    <!-- <optgroup label=\"Text\"> -->\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\n    <!-- </optgroup> -->\n\n    <!-- Generic Options -->\n    <!-- <optgroup label=\"Generic\">\n      <option value=\"exists\">Exists</option>\n      <option value=\"notExists\">! Exists</option>\n    </optgroup> -->\n\n  </select>\n  <input\n    data-ng-if=\"inputNeeded()\"\n    class=\"form-control input-medium\"\n    data-ng-model=\"rule.value\"\n    type=\"text\">\n</span>\n");}]);})(window.angular);
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder.min.js b/public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder.min.js
deleted file mode 100644 (file)
index 3e84dce..0000000
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){"use strict";e.module("angular-elastic-builder",["RecursionHelper"])}(window.angular),function(e){"use strict";e.module("angular-elastic-builder").directive("elasticBuilder",["elasticQueryService",function(e){return{scope:{data:"=elasticBuilder"},templateUrl:"angular-elastic-builder/BuilderDirective.html",link:function(n){var r=n.data;n.filters=[],n.removeChild=function(e){n.filters.splice(e,1)},n.addRule=function(){n.filters.push({})},n.addGroup=function(){n.filters.push({type:"group",subType:"and",rules:[]})},n.$watch("data.needsUpdate",function(t){t&&(n.filters=e.toFilters(r.query,n.data.fields),n.data.needsUpdate=!1)}),n.$watch("filters",function(t){t&&(r.query=e.toQuery(n.filters,n.data.fields))},!0)}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticBuilderChooser",["RecursionHelper","groupClassHelper",function(e,n){return{scope:{elasticFields:"=",item:"=elasticBuilderChooser",onRemove:"&"},templateUrl:"angular-elastic-builder/ChooserDirective.html",compile:function(r){return e.compile(r,function(e,r,t){var a=e.depth=+t.depth,l=e.item;e.getGroupClassName=function(){var e=a;return"group"===l.type&&e++,n(e)}})}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticBuilderGroup",["RecursionHelper","groupClassHelper",function(e,n){return{scope:{elasticFields:"=",group:"=elasticBuilderGroup",onRemove:"&"},templateUrl:"angular-elastic-builder/GroupDirective.html",compile:function(r){return e.compile(r,function(e,r,t){var a=e.depth=+t.depth,l=e.group;e.addRule=function(){l.rules.push({})},e.addGroup=function(){l.rules.push({type:"group",subType:"and",rules:[]})},e.removeChild=function(e){l.rules.splice(e,1)},e.getGroupClassName=function(){return n(a+1)}})}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticBuilderRule",[function(){return{scope:{elasticFields:"=",rule:"=elasticBuilderRule",onRemove:"&"},templateUrl:"angular-elastic-builder/RuleDirective.html",link:function(e){e.getType=function(){var n=e.elasticFields,r=e.rule.field;return n&&r?"boolean"===n[r].subType?"boolean":n[r].type:void 0}}}}])}(window.angular),function(e){"use strict";var n=e.module("angular-elastic-builder");n.directive("elasticType",[function(){return{scope:{type:"=elasticType",rule:"=",guide:"="},template:'<ng-include src="getTemplateUrl()" />',link:function(e){e.getTemplateUrl=function(){var n=e.type;if(n)return n=n.charAt(0).toUpperCase()+n.slice(1),"angular-elastic-builder/types/"+n+".html"},e.booleans=["False","True"],e.booleansOrder=["True","False"],e.inputNeeded=function(){var n=["equals","notEquals","gt","gte","lt","lte"];return~n.indexOf(e.rule.subType)}}}}])}(window.angular),function(e){"use strict";e.module("angular-elastic-builder").run(["$templateCache",function(e){e.put("angular-elastic-builder/BuilderDirective.html",'<!-- <div class="elastic-builder">\r\n  <div class="filter-panels">\r\n    <div class="list-group form-inline">\r\n      <div\r\n        data-ng-repeat="filter in filters"\r\n        data-elastic-builder-chooser="filter"\r\n        data-elastic-fields="data.fields"\r\n        data-on-remove="removeChild($index)"\r\n        data-depth="0"></div>\r\n      <div class="list-group-item actions">\r\n        <a class="btn btn-xs btn-primary" title="Add Rule" data-ng-click="addRule()">\r\n          <i class="fa fa-plus"></i>\r\n        </a>\r\n        <a class="btn btn-xs btn-primary" title="Add Group" data-ng-click="addGroup()">\r\n          <i class="fa fa-list"></i>\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div> -->\r\n\r\n<!-- <div class="elastic-builder">\r\n  <div class="filter-panels"> -->\r\n    <div class="list-group form-inline list-group-item-custom" ng-switch="data.type">\r\n      <div\r\n        data-ng-repeat="filter in filters"\r\n        data-elastic-builder-chooser="filter"\r\n        data-elastic-fields="data.fields"\r\n        data-on-remove="removeChild($index)"\r\n        data-depth="0">\r\n      </div>\r\n      <div class="list-group-item actions list-group-item-custom" ng-switch-when="condition">\r\n        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">\r\n                            <i class="icon-plus"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\r\n                             </a>\r\n      </div>\r\n      <div class="list-group-item actions list-group-item-custom" ng-switch-when="action">\r\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\r\n                                 <i class="icon-plus"></i> {{ \'APPLICATION_ADD_ACTION\' | translate }}\r\n                            </a>\r\n      </div>\r\n      <div class="list-group-item actions list-group-item-custom" ng-switch-default>\r\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\r\n                               <i class="icon-plus"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\r\n                         </a>\r\n        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">\r\n                              <i class="icon-plus"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\r\n                             </a>\r\n      </div>\r\n    </div>\r\n  <!-- </div>\r\n</div> -->\r\n'),e.put("angular-elastic-builder/ChooserDirective.html",'<!-- <div\r\n  class="list-group-item elastic-builder-chooser"\r\n  data-ng-class="getGroupClassName()">\r\n\r\n  <div data-ng-if="item.type === \'group\'"\r\n    data-elastic-builder-group="item"\r\n    data-depth="{{ depth }}"\r\n    data-elastic-fields="elasticFields"\r\n    data-on-remove="onRemove()"></div>\r\n\r\n  <div data-ng-if="item.type !== \'group\'"\r\n    data-elastic-builder-rule="item"\r\n    data-elastic-fields="elasticFields"\r\n    data-on-remove="onRemove()"></div>\r\n\r\n</div> -->\r\n\r\n\r\n<div class="list-group-item elastic-builder-chooser list-group-item-custom" data-ng-class="getGroupClassName()">\r\n  <div data-ng-if="item.type === \'group\'"\r\n    data-elastic-builder-group="item"\r\n    data-depth="{{ depth }}"\r\n    data-elastic-fields="elasticFields"\r\n    data-on-remove="onRemove()"></div>\r\n  <div data-ng-if="item.type !== \'group\'"\r\n    data-elastic-builder-rule="item"\r\n    data-elastic-fields="elasticFields"\r\n    data-on-remove="onRemove()"></div>\r\n</div>\r\n'),e.put("angular-elastic-builder/GroupDirective.html",'<!-- <div class="elastic-builder-group">\r\n  <h5>If\r\n    <select data-ng-model="group.subType" class="form-control">\r\n      <option value="and">all</option>\r\n      <option value="or">any</option>\r\n    </select>\r\n    of these conditions are met\r\n  </h5>\r\n  <div\r\n    data-ng-repeat="rule in group.rules"\r\n    data-elastic-builder-chooser="rule"\r\n    data-elastic-fields="elasticFields"\r\n    data-depth="{{ +depth + 1 }}"\r\n    data-on-remove="removeChild($index)"></div>\r\n\r\n  <div class="list-group-item actions" data-ng-class="getGroupClassName()">\r\n    <a class="btn btn-xs btn-primary" title="Add Sub-Rule" data-ng-click="addRule()">\r\n      <i class="fa fa-plus"></i>\r\n    </a>\r\n    <a class="btn btn-xs btn-primary" title="Add Sub-Group" data-ng-click="addGroup()">\r\n      <i class="fa fa-list"></i>\r\n    </a>\r\n  </div>\r\n\r\n  <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\r\n    <i class="fa fa-minus"></i>\r\n  </a>\r\n</div> -->\r\n\r\n\r\n<!-- BEGIN Portlet PORTLET-->\r\n<div class="portlet light">\r\n  <div class="portlet-title">\r\n    <div class="caption" data-ng-class="{\'font-blue-hoki\': data.type === \'condition\', \'font-red-flamingo\': data.type === \'action\'}">\r\n      <!-- <i class="icon-people font-green-sharp"></i> -->\r\n      <h5><span class="caption-subject">{{ \'APPLICATION_IF\' | translate }}</span>\r\n        <select data-ng-model="group.subType" class="form-control">\r\n          <option value="and"><strong>{{ \'APPLICATION_ALL\' | translate | lowercase }}</strong></option>\r\n          <option value="or"><strong>{{ \'APPLICATION_ANY\' | translate | lowercase }}</strong></option>\r\n        </select>\r\n        <span class="caption-subject">{{group.subType == \'and\' ? \'MESSAGE_CODITIONS_MET_ALL\' : \'MESSAGE_CODITIONS_MET_ANY\' | translate}}</span>\r\n      </h5>\r\n    </div>\r\n  </div>\r\n  <div class="portlet-body">\r\n    <div class="elastic-builder-group">\r\n      <div\r\n        data-ng-repeat="rule in group.rules"\r\n        data-elastic-builder-chooser="rule"\r\n        data-elastic-fields="elasticFields"\r\n        data-depth="{{ +depth + 1 }}"\r\n        data-on-remove="removeChild($index)"></div>\r\n\r\n      <div class="list-group-item actions list-group-item-custom" data-ng-class="getGroupClassName()">\r\n        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">\r\n          <i class="icon-plus"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\r\n        </a>\r\n        <a class="btn red btn-sm remover" data-ng-click="onRemove()">\r\n          <i class="icon-trash"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n<!-- END Portlet PORTLET-->\r\n'),e.put("angular-elastic-builder/RuleDirective.html",'<!-- <div class="elastic-builder-rule">\r\n  <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select>\r\n\r\n  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>\r\n\r\n  <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\r\n    <i class="fa fa-minus"></i>\r\n  </a>\r\n\r\n</div> -->\r\n<!-- <div class="elastic-builder-rule"> -->\r\n  <!-- <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select> -->\n  {{elasticFields[rule.field].action.label | translate}}\n  <select class="form-control" data-ng-model="rule.field" >\n  <option ng-repeat="option in elasticFields" value="{{option.value}}">{{ option.label | translate }}</option>\n  </select>\n  <!-- <ui-select class="form-control" data-ng-model="rule.field" theme="bootstrap">\r\n    <ui-select-match placeholder="{{\'APPLICATION_CONDITION\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\r\n    <ui-select-choices repeat="value.value as key for (key, value) in elasticFields | filter: $select.search">\r\n      {{$translate.instant(key.name)}}\r\n    </ui-select-choices>\r\n  </ui-select> -->\r\n\r\n  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>\r\n\r\n  <!-- <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">\r\n    <i class="fa fa-minus"></i>\r\n  </a> -->\r\n\r\n  <a class="btn remover" data-ng-click="onRemove()">\r\n    <i class="icon-trash"></i>\r\n  </a>\r\n\r\n<!-- </div> -->\r\n'),e.put("angular-elastic-builder/types/Boolean.html",'<span class="boolean-rule">\r\n  Equals\r\n\r\n  <!-- This is a weird hack to make sure these are numbers -->\r\n  <select\r\n    data-ng-model="rule.value"\r\n    class="form-control"\r\n    data-ng-options="booleans.indexOf(choice) as choice for choice in booleansOrder">\r\n  </select>\r\n</span>\r\n'),e.put("angular-elastic-builder/types/Date.html",'<span class="date-rule">\r\n  <select data-ng-model="rule.subType" class="form-control">\r\n\r\n    <optgroup label="Generic">\r\n      <option value="exists">Exists</option>\r\n      <option value="notExists">! Exists</option>\r\n    </optgroup>\r\n  </select>\r\n\r\n</span>\r\n'),e.put("angular-elastic-builder/types/Multi.html",'<!-- <span class="multi-rule">\r\n  <span data-ng-repeat="choice in guide.choices">\r\n    <label class="checkbox">\r\n      <input type="checkbox" data-ng-model="rule.values[choice]">\r\n      {{ choice }}\r\n    </label>\r\n  </span>\r\n</span> -->\r\n\r\n<span class="multi-rule">\r\n  {{guide.action.midterm | translate}}\r\n  <!-- Range Fields -->\r\n  <!-- <select data-ng-model="rule.values" class="form-control"> -->\r\n  <select data-ng-model="rule.value" class="form-control">\r\n    <!-- <optgroup label="Numeral"> -->\r\n      <option data-ng-repeat="(key, value) in guide.choices" value="{{value}}">{{key}}</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- <optgroup label="Generic">\r\n      <option value="exists">Exists</option>\r\n      <option value="notExists">! Exists</option>\r\n    </optgroup> -->\r\n  </select>\r\n\r\n  <!-- <input data-ng-if="inputNeeded()"\r\n    class="form-control"\r\n    data-ng-model="rule.value"\r\n    type="number"\r\n    min="{{ guide.minimum }}"\r\n    max="{{ guide.maximum }}"> -->\r\n</span>\r\n'),e.put("angular-elastic-builder/types/Multiterm.html",'<span class="elastic-multiterm">\r\n  <select data-ng-model="rule.subType" class="form-control">\r\n      <option value="equals">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\r\n      <option value="notEquals">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\r\n  </select>\r\n  <select data-ng-model="rule.value" class="form-control">\r\n      <option data-ng-repeat="(key, value) in guide.choices" value="{{value}}">{{value | capitalize}}</option>\r\n  </select>\r\n</span>\r\n'),e.put("angular-elastic-builder/types/Number.html",'<span class="number-rule">\r\n  <select data-ng-model="rule.subType" class="form-control">\r\n    <!-- <optgroup label="Numeral"> -->\r\n      <option value="equals">=</option>\r\n      <option value="gt">&gt;</option>\r\n      <option value="gte">&ge;</option>\r\n      <option value="lt">&lt;</option>\r\n      <option value="lte">&le;</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- <optgroup label="Generic"> -->\r\n      <!-- <option value="exists">Exists</option>\r\n      <option value="notExists">! Exists</option> -->\r\n    <!-- </optgroup> -->\r\n  </select>\r\n\r\n  <!-- Range Fields -->\r\n  <input data-ng-if="inputNeeded()"\r\n    class="form-control"\r\n    data-ng-model="rule.value"\r\n    type="number"\r\n    min="{{ guide.minimum }}"\r\n    max="{{ guide.maximum }}">\r\n\r\n    <!-- <span class="help-block">{{rule.help}}</span> -->\r\n\r\n</span>\r\n'),e.put("angular-elastic-builder/types/Term.html",'<!-- <span class="elastic-term">\r\n  <select data-ng-model="rule.subType" class="form-control"> -->\r\n    <!-- Term Options -->\r\n    <!-- <optgroup label="Text">\r\n      <option value="equals">Equals</option>\r\n      <option value="notEquals">! Equals</option>\r\n    </optgroup> -->\r\n\r\n    <!-- Generic Options -->\r\n    <!-- <optgroup label="Generic">\r\n      <option value="exists">Exists</option>\r\n      <option value="notExists">! Exists</option>\r\n    </optgroup>\r\n\r\n  </select>\r\n  <input\r\n    data-ng-if="inputNeeded()"\r\n    class="form-control"\r\n    data-ng-model="rule.value"\r\n    type="text">\r\n</span> -->\r\n\r\n\r\n<span class="elastic-term">\r\n  <select data-ng-model="rule.subType" class="form-control">\r\n    <!-- Term Options -->\r\n    <!-- <optgroup label="Text"> -->\r\n      <option value="equals">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\r\n      <option value="notEquals">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- Generic Options -->\r\n    <!-- <optgroup label="Generic">\r\n      <option value="exists">Exists</option>\r\n      <option value="notExists">! Exists</option>\r\n    </optgroup> -->\r\n\r\n  </select>\r\n  <input\r\n    data-ng-if="inputNeeded()"\r\n    class="form-control input-medium"\r\n    data-ng-model="rule.value"\r\n    type="text">\r\n</span>\r\n')}])}(window.angular),function(e){"use strict";e.module("angular-elastic-builder").factory("groupClassHelper",function(){return function(e){var n=[""];return n[e%n.length]}})}(window.angular),function(e){"use strict";function n(e,n){var r=e.map(t.bind(e,n));return r}function r(e,n){var r=e.map(a.bind(e,n)).filter(function(e){return!!e});return r}function t(e,n,r){r!==!1&&(r=!0);var a=Object.keys(n)[0],i={or:"group",and:"group",range:"number"},s=i[a]||"item",o=l(s);switch(a){case"or":case"and":o.rules=n[a].map(t.bind(n,e)),o.subType=a;break;case"missing":case"exists":o.field=n[a].field,o.subType={exists:"exists",missing:"notExists"}[a],delete o.value;break;case"term":case"terms":o.field=Object.keys(n[a])[0];var u=e[Object.keys(n[a])[0]];if("multi"===u.type){var c=n[a][o.field];"string"==typeof c&&(c=[c]),o.value=n[a][o.field]}else o.subType=r?"equals":"notEquals",o.value=n[a][o.field],"number"==typeof o.value&&(o.subType="boolean");break;case"range":o.field=Object.keys(n[a])[0],o.subType=Object.keys(n[a][o.field])[0],o.value=n[a][o.field][o.subType];break;case"not":o=t(e,n[a].filter,!1);break;default:o.field=Object.keys(n[a])[0]}return o}function a(e,n){var r={};if("group"===n.type)return r[n.subType]=n.rules.map(a.bind(n,e)).filter(function(e){return!!e}),r;var t=n.field,l=e[t];if(t){switch(l.type){case"term":case"multiterm":if("boolean"===l.subType&&(n.subType="boolean"),!n.subType)return;switch(n.subType){case"equals":case"boolean":if(void 0===n.value)return;r.term={},r.term[t]=n.value;break;case"notEquals":if(void 0===n.value)return;r.not={filter:{term:{}}},r.not.filter.term[t]=n.value;break;case"exists":r.exists={field:t};break;case"notExists":r.missing={field:t};break;default:throw new Error("unexpected subtype "+n.subType)}break;case"number":r.range={},r.range[t]={},r.range[t][n.subType]=n.value;break;case"date":if("exists"===n.subType)r.exists={field:t};else{if("notExists"!==n.subType)throw new Error("unexpected subtype");r.missing={field:t}}break;case"multi":r.terms={},r.terms[t]=n.value;break;default:throw new Error("unexpected type")}return r}}function l(n){var r={group:{type:"group",subType:"",rules:[]},item:{field:"",subType:"",value:""},number:{field:"",subType:"",value:null}};return e.copy(r[n])}e.module("angular-elastic-builder").factory("elasticQueryService",[function(){return{toFilters:n,toQuery:r}}])}(window.angular);
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder_old.js b/public/assets/plugins/angular-elastic-builder/dist/angular-elastic-builder_old.js
deleted file mode 100644 (file)
index 8c29ba8..0000000
+++ /dev/null
@@ -1,589 +0,0 @@
-/**
- * # angular-elastic-builder
- * ## Angular Module for building an Elasticsearch Query
- *
- * @version v1.4.0
- * @link https://github.com/dncrews/angular-elastic-builder.git
- * @license MIT
- * @author Dan Crews <crewsd@gmail.com>
- */
-
-/**
- * angular-elastic-builder
- *
- * /src/module.js
- *
- * Angular Module for building an Elasticsearch query
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder', [
-    'RecursionHelper',
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/BuilderDirective.js
- *
- * Angular Directive for injecting a query builder form.
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .directive('elasticBuilder', [
-      'elasticQueryService',
-
-      function EB(elasticQueryService) {
-
-        return {
-          scope: {
-            data: '=elasticBuilder',
-          },
-
-          templateUrl: 'angular-elastic-builder/BuilderDirective.html',
-
-          link: function(scope) {
-            var data = scope.data;
-
-            scope.filters = [];
-
-            /**
-             * Removes either Group or Rule
-             */
-            scope.removeChild = function(idx) {
-              scope.filters.splice(idx, 1);
-            };
-
-            /**
-             * Adds a Single Rule
-             */
-            scope.addRule = function() {
-              scope.filters.push({});
-            };
-
-            /**
-             * Adds a Group of Rules
-             */
-            scope.addGroup = function() {
-              scope.filters.push({
-                type: 'group',
-                subType: 'and',
-                rules: [],
-              });
-            };
-
-            /**
-             * Any time "outside forces" change the query, they should tell us so via
-             * `data.needsUpdate`
-             */
-            scope.$watch('data.needsUpdate', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              scope.filters = elasticQueryService.toFilters(data.query, scope.data.fields);
-              scope.data.needsUpdate = false;
-            });
-
-            /**
-             * Changes on the page update the Query
-             */
-            scope.$watch('filters', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              data.query = elasticQueryService.toQuery(scope.filters, scope.data.fields);
-            }, true);
-          }
-        };
-      }
-
-    ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Chooser.js
- *
- * This file is to help recursively, to decide whether to show a group or rule
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderChooser', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderChooser(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          item: '=elasticBuilderChooser',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/ChooserDirective.html',
-
-        compile: function (element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+ attrs.depth)
-              , item = scope.item;
-
-            scope.getGroupClassName = function() {
-              var level = depth;
-              if (item.type === 'group') level++;
-
-              return groupClassHelper(level);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Group.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderGroup', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderGroup(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          group: '=elasticBuilderGroup',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/GroupDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+ attrs.depth);
-            var group = scope.group;
-
-            scope.addRule = function() {
-              group.rules.push({});
-            };
-            scope.addGroup = function() {
-              group.rules.push({
-                type: 'group',
-                subType: 'and',
-                rules: [],
-              });
-            };
-
-            scope.removeChild = function(idx) {
-              group.rules.splice(idx, 1);
-            };
-
-            scope.getGroupClassName = function() {
-              return groupClassHelper(depth + 1);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/Rule.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderRule', [
-
-    function elasticBuilderRule() {
-      return {
-        scope: {
-          elasticFields: '=',
-          rule: '=elasticBuilderRule',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/RuleDirective.html',
-
-        link: function(scope) {
-          scope.getType = function() {
-            var fields = scope.elasticFields;
-            var field = scope.rule.field;
-
-            if (!fields || !field) {
-              return;
-            }
-
-            if (fields[field].subType === 'boolean') {
-              return 'boolean';
-            }
-
-            return fields[field].type;
-          };
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/directives/RuleTypes.js
- *
- * Determines which Rule type should be displayed
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticType', [
-
-    function() {
-      return {
-        scope: {
-          type: '=elasticType',
-          rule: '=',
-          guide: '=',
-        },
-
-        template: '<ng-include src="getTemplateUrl()" />',
-
-        link: function(scope) {
-          scope.getTemplateUrl = function() {
-            var type = scope.type;
-            if (! type) return;
-
-            type = type.charAt(0).toUpperCase() + type.slice(1);
-
-            return 'angular-elastic-builder/types/' + type + '.html';
-          };
-
-          // This is a weird hack to make sure these are numbers
-          scope.booleans = [ 'False', 'True' ];
-          scope.booleansOrder = [ 'True', 'False' ];
-
-          scope.inputNeeded = function() {
-            var needs = [
-              'equals',
-              'notEquals',
-
-              'gt',
-              'gte',
-              'lt',
-              'lte',
-            ];
-
-            return ~needs.indexOf(scope.rule.subType);
-          };
-        },
-      };
-    }
-
-  ]);
-
-})(window.angular);
-
-(function(angular) {"use strict"; angular.module("angular-elastic-builder").run(["$templateCache", function($templateCache) {$templateCache.put("angular-elastic-builder/BuilderDirective.html","<!-- <div class=\"elastic-builder\">\r\n  <div class=\"filter-panels\">\r\n    <div class=\"list-group form-inline\">\r\n      <div\r\n        data-ng-repeat=\"filter in filters\"\r\n        data-elastic-builder-chooser=\"filter\"\r\n        data-elastic-fields=\"data.fields\"\r\n        data-on-remove=\"removeChild($index)\"\r\n        data-depth=\"0\"></div>\r\n      <div class=\"list-group-item actions\">\r\n        <a class=\"btn btn-xs btn-primary\" title=\"Add Rule\" data-ng-click=\"addRule()\">\r\n          <i class=\"fa fa-plus\"></i>\r\n        </a>\r\n        <a class=\"btn btn-xs btn-primary\" title=\"Add Group\" data-ng-click=\"addGroup()\">\r\n          <i class=\"fa fa-list\"></i>\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div> -->\r\n\r\n<!-- <div class=\"elastic-builder\">\r\n  <div class=\"filter-panels\"> -->\r\n    <div class=\"list-group form-inline list-group-item-custom\" ng-switch=\"data.type\">\r\n      <div\r\n        data-ng-repeat=\"filter in filters\"\r\n        data-elastic-builder-chooser=\"filter\"\r\n        data-elastic-fields=\"data.fields\"\r\n        data-on-remove=\"removeChild($index)\"\r\n        data-depth=\"0\">\r\n      </div>\r\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-when=\"condition\">\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\r\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\r\n                           </a>\r\n      </div>\r\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-when=\"action\">\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\r\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_ACTION\' | translate }}\r\n                          </a>\r\n      </div>\r\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-default>\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\r\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\r\n                               </a>\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\r\n                                <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\r\n                           </a>\r\n      </div>\r\n    </div>\r\n  <!-- </div>\r\n</div> -->\r\n");
-$templateCache.put("angular-elastic-builder/ChooserDirective.html","<!-- <div\r\n  class=\"list-group-item elastic-builder-chooser\"\r\n  data-ng-class=\"getGroupClassName()\">\r\n\r\n  <div data-ng-if=\"item.type === \'group\'\"\r\n    data-elastic-builder-group=\"item\"\r\n    data-depth=\"{{ depth }}\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n\r\n  <div data-ng-if=\"item.type !== \'group\'\"\r\n    data-elastic-builder-rule=\"item\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n\r\n</div> -->\r\n\r\n\r\n<div class=\"list-group-item elastic-builder-chooser list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\r\n  <div data-ng-if=\"item.type === \'group\'\"\r\n    data-elastic-builder-group=\"item\"\r\n    data-depth=\"{{ depth }}\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n  <div data-ng-if=\"item.type !== \'group\'\"\r\n    data-elastic-builder-rule=\"item\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n</div>\r\n");
-$templateCache.put("angular-elastic-builder/GroupDirective.html","<!-- <div class=\"elastic-builder-group\">\r\n  <h5>If\r\n    <select data-ng-model=\"group.subType\" class=\"form-control\">\r\n      <option value=\"and\">all</option>\r\n      <option value=\"or\">any</option>\r\n    </select>\r\n    of these conditions are met\r\n  </h5>\r\n  <div\r\n    data-ng-repeat=\"rule in group.rules\"\r\n    data-elastic-builder-chooser=\"rule\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-depth=\"{{ +depth + 1 }}\"\r\n    data-on-remove=\"removeChild($index)\"></div>\r\n\r\n  <div class=\"list-group-item actions\" data-ng-class=\"getGroupClassName()\">\r\n    <a class=\"btn btn-xs btn-primary\" title=\"Add Sub-Rule\" data-ng-click=\"addRule()\">\r\n      <i class=\"fa fa-plus\"></i>\r\n    </a>\r\n    <a class=\"btn btn-xs btn-primary\" title=\"Add Sub-Group\" data-ng-click=\"addGroup()\">\r\n      <i class=\"fa fa-list\"></i>\r\n    </a>\r\n  </div>\r\n\r\n  <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"fa fa-minus\"></i>\r\n  </a>\r\n</div> -->\r\n\r\n\r\n<!-- BEGIN Portlet PORTLET-->\r\n<div class=\"portlet light\">\r\n  <div class=\"portlet-title\">\r\n    <div class=\"caption\" data-ng-class=\"{\'font-blue-hoki\': data.type === \'condition\', \'font-red-flamingo\': data.type === \'action\'}\">\r\n      <!-- <i class=\"icon-people font-green-sharp\"></i> -->\r\n      <h5><span class=\"caption-subject\">{{ \'APPLICATION_IF\' | translate }}</span>\r\n        <select data-ng-model=\"group.subType\" class=\"form-control\">\r\n          <option value=\"and\"><strong>{{ \'APPLICATION_ALL\' | translate | lowercase }}</strong></option>\r\n          <option value=\"or\"><strong>{{ \'APPLICATION_ANY\' | translate | lowercase }}</strong></option>\r\n        </select>\r\n        <span class=\"caption-subject\">{{group.subType == \'and\' ? \'MESSAGE_CODITIONS_MET_ALL\' : \'MESSAGE_CODITIONS_MET_ANY\' | translate}}</span>\r\n      </h5>\r\n    </div>\r\n  </div>\r\n  <div class=\"portlet-body\">\r\n    <div class=\"elastic-builder-group\">\r\n      <div\r\n        data-ng-repeat=\"rule in group.rules\"\r\n        data-elastic-builder-chooser=\"rule\"\r\n        data-elastic-fields=\"elasticFields\"\r\n        data-depth=\"{{ +depth + 1 }}\"\r\n        data-on-remove=\"removeChild($index)\"></div>\r\n\r\n      <div class=\"list-group-item actions list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\r\n          <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\r\n        </a>\r\n        <a class=\"btn red btn-sm remover\" data-ng-click=\"onRemove()\">\r\n          <i class=\"icon-trash\"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n<!-- END Portlet PORTLET-->\r\n");
-$templateCache.put("angular-elastic-builder/RuleDirective.html","<!-- <div class=\"elastic-builder-rule\">\r\n  <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select>\r\n\r\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\r\n\r\n  <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"fa fa-minus\"></i>\r\n  </a>\r\n\r\n</div> -->\r\n<!-- <div class=\"elastic-builder-rule\"> -->\r\n  <!-- <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select> -->\n  {{elasticFields[rule.field].action.label | translate}}\n  <select class=\"form-control\" data-ng-model=\"rule.field\" >\n  <option ng-repeat=\"option in elasticFields\" value=\"{{option.value}}\">{{ option.label | translate }}</option>\n  </select>\n  <!-- <ui-select class=\"form-control\" data-ng-model=\"rule.field\" theme=\"bootstrap\">\r\n    <ui-select-match placeholder=\"{{\'APPLICATION_CONDITION\' | translate}}\">{{$translate.instant($select.selected.name)}}</ui-select-match>\r\n    <ui-select-choices repeat=\"value.value as key for (key, value) in elasticFields | filter: $select.search\">\r\n      {{$translate.instant(key.name)}}\r\n    </ui-select-choices>\r\n  </ui-select> -->\r\n\r\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\r\n\r\n  <!-- <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"fa fa-minus\"></i>\r\n  </a> -->\r\n\r\n  <a class=\"btn remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"icon-trash\"></i>\r\n  </a>\r\n\r\n<!-- </div> -->\r\n");
-$templateCache.put("angular-elastic-builder/types/Boolean.html","<span class=\"boolean-rule\">\r\n  Equals\r\n\r\n  <!-- This is a weird hack to make sure these are numbers -->\r\n  <select\r\n    data-ng-model=\"rule.value\"\r\n    class=\"form-control\"\r\n    data-ng-options=\"booleans.indexOf(choice) as choice for choice in booleansOrder\">\r\n  </select>\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Date.html","<span class=\"date-rule\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n\r\n    <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup>\r\n  </select>\r\n\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Multi.html","<!-- <span class=\"multi-rule\">\r\n  <span data-ng-repeat=\"choice in guide.choices\">\r\n    <label class=\"checkbox\">\r\n      <input type=\"checkbox\" data-ng-model=\"rule.values[choice]\">\r\n      {{ choice }}\r\n    </label>\r\n  </span>\r\n</span> -->\r\n\r\n<span class=\"multi-rule\">\r\n  {{guide.action.midterm | translate}}\r\n  <!-- Range Fields -->\r\n  <!-- <select data-ng-model=\"rule.values\" class=\"form-control\"> -->\r\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\r\n    <!-- <optgroup label=\"Numeral\"> -->\r\n      <option data-ng-repeat=\"(key, value) in guide.choices\" value=\"{{value}}\">{{key}}</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup> -->\r\n  </select>\r\n\r\n  <!-- <input data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"number\"\r\n    min=\"{{ guide.minimum }}\"\r\n    max=\"{{ guide.maximum }}\"> -->\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Multiterm.html","<span class=\"elastic-multiterm\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\r\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\r\n  </select>\r\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\r\n      <option data-ng-repeat=\"(key, value) in guide.choices\" value=\"{{value}}\">{{value | capitalize}}</option>\r\n  </select>\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Number.html","<span class=\"number-rule\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n    <!-- <optgroup label=\"Numeral\"> -->\r\n      <option value=\"equals\">=</option>\r\n      <option value=\"gt\">&gt;</option>\r\n      <option value=\"gte\">&ge;</option>\r\n      <option value=\"lt\">&lt;</option>\r\n      <option value=\"lte\">&le;</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- <optgroup label=\"Generic\"> -->\r\n      <!-- <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option> -->\r\n    <!-- </optgroup> -->\r\n  </select>\r\n\r\n  <!-- Range Fields -->\r\n  <input data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"number\"\r\n    min=\"{{ guide.minimum }}\"\r\n    max=\"{{ guide.maximum }}\">\r\n\r\n    <!-- <span class=\"help-block\">{{rule.help}}</span> -->\r\n\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Term.html","<!-- <span class=\"elastic-term\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\"> -->\r\n    <!-- Term Options -->\r\n    <!-- <optgroup label=\"Text\">\r\n      <option value=\"equals\">Equals</option>\r\n      <option value=\"notEquals\">! Equals</option>\r\n    </optgroup> -->\r\n\r\n    <!-- Generic Options -->\r\n    <!-- <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup>\r\n\r\n  </select>\r\n  <input\r\n    data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"text\">\r\n</span> -->\r\n\r\n\r\n<span class=\"elastic-term\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n    <!-- Term Options -->\r\n    <!-- <optgroup label=\"Text\"> -->\r\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\r\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- Generic Options -->\r\n    <!-- <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup> -->\r\n\r\n  </select>\r\n  <input\r\n    data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control input-medium\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"text\">\r\n</span>\r\n");}]);})(window.angular);
-/**
- * angular-elastic-builder
- *
- * /src/services/GroupClassHelper.js
- *
- * This keeps all of the groups colored correctly
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('groupClassHelper', function groupClassHelper() {
-
-      return function(level) {
-        var levels = [
-          '',
-          // 'list-group-item-info',
-          // 'list-group-item-success',
-          // 'list-group-item-warning',
-          // 'list-group-item-danger',
-        ];
-
-        return levels[level % levels.length];
-      };
-    });
-
-})(window.angular);
-
-/**
- * angular-elastic-builder
- *
- * /src/services/QueryService.js
- *
- * This file is used to convert filters into queries, and vice versa
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('elasticQueryService', [
-      function() {
-
-        return {
-          toFilters: toFilters,
-          toQuery: toQuery,
-        };
-      }
-    ]);
-
-  function toFilters(query, fieldMap) {
-    var filters = query.map(parseQueryGroup.bind(query, fieldMap));
-    return filters;
-  }
-
-  function toQuery(filters, fieldMap) {
-    var query = filters.map(parseFilterGroup.bind(filters, fieldMap)).filter(function(item) {
-      return !!item;
-    });
-    return query;
-  }
-
-  function parseQueryGroup(fieldMap, group, truthy) {
-    if (truthy !== false) {
-      truthy = true;
-    }
-
-    var key = Object.keys(group)[0],
-      typeMap = {
-        or: 'group',
-        and: 'group',
-        range: 'number',
-      },
-      type = typeMap[key] || 'item',
-      obj = getFilterTemplate(type);
-
-    switch (key) {
-      case 'or':
-      case 'and':
-        obj.rules = group[key].map(parseQueryGroup.bind(group, fieldMap));
-        obj.subType = key;
-        break;
-      case 'missing':
-      case 'exists':
-        obj.field = group[key].field;
-        obj.subType = {
-          exists: 'exists',
-          missing: 'notExists',
-        }[key];
-        delete obj.value;
-        break;
-      case 'term':
-      case 'terms':
-        obj.field = Object.keys(group[key])[0];
-        var fieldData = fieldMap[Object.keys(group[key])[0]];
-
-        if (fieldData.type === 'multi') {
-          var vals = group[key][obj.field];
-          if (typeof vals === 'string') {
-            vals = [vals];
-          }
-          // MY CUSTOM MODIFICATION
-          obj.value = group[key][obj.field];
-          // obj.values = fieldData.choices.reduce(function(prev, choice) {
-          //   prev[choice] = truthy === (group[key][obj.field].indexOf(choice) > -1);
-          //   return prev;
-          // }, {});
-        } else {
-          obj.subType = truthy ? 'equals' : 'notEquals';
-          obj.value = group[key][obj.field];
-
-          if (typeof obj.value === 'number') {
-            obj.subType = 'boolean';
-          }
-        }
-        break;
-      case 'range':
-        obj.field = Object.keys(group[key])[0];
-        obj.subType = Object.keys(group[key][obj.field])[0];
-        obj.value = group[key][obj.field][obj.subType];
-        break;
-      case 'not':
-        obj = parseQueryGroup(fieldMap, group[key].filter, false);
-        break;
-      default:
-        obj.field = Object.keys(group[key])[0];
-        break;
-    }
-
-    return obj;
-  }
-
-  function parseFilterGroup(fieldMap, group) {
-    var obj = {};
-    if (group.type === 'group') {
-      obj[group.subType] = group.rules.map(parseFilterGroup.bind(group, fieldMap)).filter(function(item) {
-        return !!item;
-      });
-      return obj;
-    }
-
-    var fieldName = group.field;
-    var fieldData = fieldMap[fieldName];
-
-    if (!fieldName) {
-      return;
-    }
-
-    switch (fieldData.type) {
-      case 'term':
-      case 'multiterm':
-        if (fieldData.subType === 'boolean') {
-          group.subType = 'boolean';
-        }
-
-        if (!group.subType) {
-          return;
-        }
-        switch (group.subType) {
-          case 'equals':
-          case 'boolean':
-            if (group.value === undefined) {
-              return;
-            }
-            obj.term = {};
-            obj.term[fieldName] = group.value;
-            break;
-          case 'notEquals':
-            if (group.value === undefined) {
-              return;
-            }
-            obj.not = {
-              filter: {
-                term: {}
-              }
-            };
-            obj.not.filter.term[fieldName] = group.value;
-            break;
-          case 'exists':
-            obj.exists = {
-              field: fieldName
-            };
-            break;
-          case 'notExists':
-            obj.missing = {
-              field: fieldName
-            };
-            break;
-          default:
-            throw new Error('unexpected subtype ' + group.subType);
-        }
-        break;
-
-      case 'number':
-        obj.range = {};
-        obj.range[fieldName] = {};
-        obj.range[fieldName][group.subType] = group.value;
-        break;
-
-      case 'date':
-        if (group.subType === 'exists') {
-          obj.exists = {
-            field: fieldName
-          };
-        } else if (group.subType === 'notExists') {
-          obj.missing = {
-            field: fieldName
-          };
-        } else {
-          throw new Error('unexpected subtype');
-        }
-
-        break;
-
-      case 'multi':
-        obj.terms = {};
-        obj.terms[fieldName] = group.value;
-        // obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-        //   if (group.values[key]) prev.push(key);
-        //
-        //   return prev;
-        // }, []);
-        break;
-
-      default:
-        throw new Error('unexpected type');
-    }
-
-    return obj;
-  }
-
-  function getFilterTemplate(type) {
-    var templates = {
-      group: {
-        type: 'group',
-        subType: '',
-        rules: [],
-      },
-      item: {
-        field: '',
-        subType: '',
-        value: '',
-      },
-      number: {
-        field: '',
-        subType: '',
-        value: null,
-      }
-    };
-
-    return angular.copy(templates[type]);
-  }
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/examples/index.html b/public/assets/plugins/angular-elastic-builder/examples/index.html
deleted file mode 100644 (file)
index 0d0ad23..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Angular Elastic Builder</title>
-    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
-    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
-  </head>
-  <body data-ng-app="exampleApp">
-
-    <div data-ng-controller="BasicController as example">
-      <div class="container">
-        <div class="row">
-          <div class="col-md-6">
-            <h3>Filters</h3>
-            <div data-elastic-builder="example.data"></div>
-          </div>
-          <div class="col-md-6">
-            <h3>Query</h3>
-            <pre data-ng-bind="example.showQuery()"></pre>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
-    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
-    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
-    <script src="angular/angular-recursion.min.js"></script>
-    <script src="js/angular-elastic-builder.min.js"></script>
-    <script src="js/exampleApp.js"></script>
-  </body>
-</html>
diff --git a/public/assets/plugins/angular-elastic-builder/examples/index.js b/public/assets/plugins/angular-elastic-builder/examples/index.js
deleted file mode 100644 (file)
index d39b589..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-var path = require('path');
-var express = require('express');
-
-var app = express();
-
-app.use(express.static(__dirname));
-app.use('/js', express.static(path.join(__dirname, '../dist')));
-app.use('/angular', express.static(path.join(__dirname, '../node_modules/angular-recursion')));
-
-app.listen(process.env.PORT || 3000, function() {
-  console.log('listening on ' + ( process.env.PORT || 3000));
-});
diff --git a/public/assets/plugins/angular-elastic-builder/examples/js/exampleApp.js b/public/assets/plugins/angular-elastic-builder/examples/js/exampleApp.js
deleted file mode 100644 (file)
index ee4a7e8..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function(angular) {
-
-  var app = angular.module('exampleApp', [
-    'angular-elastic-builder',
-  ]);
-
-  app.controller('BasicController', function() {
-
-    var data = this.data = {};
-
-    data.query = [
-      {
-        'and': [
-          {
-            'range': {
-              'test.number': {
-                'gte': 650
-              }
-            }
-          },
-          {
-            'range': {
-              'test.number': {
-                'lt': 850
-              }
-            }
-          }
-        ]
-      },
-      {
-        'term': {
-          'test.boolean': 0
-        }
-      },
-      {
-        'terms': {
-          'test.state.multi': [ 'AZ', 'CT' ]
-        }
-      },
-      {
-        'not': {
-          'filter': {
-            'term': {
-              'test.term': 'asdfasdf'
-            }
-          }
-        }
-      },
-      {
-        'exists': {
-          'field': 'test.term'
-        }
-      }
-    ];
-
-    data.fields = {
-      'test.number': { type: 'number', minimum: 650 },
-      'test.term': { type: 'term' },
-      'test.boolean': { type: 'term', subType: 'boolean' },
-      'test.state.multi': { type: 'multi', choices: [ 'AZ', 'CA', 'CT' ]}
-    };
-
-    data.needsUpdate = true;
-
-    this.showQuery = function() {
-      var queryToShow = {
-        size: 0,
-        filter: { and : data.query }
-      };
-
-      return JSON.stringify(queryToShow, null, 2);
-    };
-
-  });
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/gulpfile.js b/public/assets/plugins/angular-elastic-builder/gulpfile.js
deleted file mode 100644 (file)
index 9194d1a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Package Dependencies
- */
-var concat = require('gulp-concat')
-  , del = require('del')
-  , header = require('gulp-header')
-  , gulp = require('gulp')
-  , templateCache = require('gulp-angular-templatecache')
-  , rename = require('gulp-rename')
-  , uglify = require('gulp-uglifyjs')
-  , util = require('util');
-
-/**
- * Local Dependencies
- */
-var pkg = require('./package.json');
-var banner = ['/**'
-  , ' * # <%= pkg.name %>'
-  , ' * ## <%= pkg.description %>'
-  , ' *'
-  , ' * @version v<%= pkg.version %>'
-  , ' * @link <%= pkg.repository.url %>'
-  , ' * @license <%= pkg.license %>'
-  , ' * @author <%= pkg.author %>'
-  , ' */'
-  , ''
-  , ''].join('\n');
-
-var filename = util.format('%s.js', pkg.name)
-  , dest = 'dist/' + filename;
-
-gulp.task('build', ['uglify']);
-gulp.task('default', ['uglify']);
-
-
-gulp.task('clean', function(done) {
-  del('./dist', done);
-});
-
-gulp.task('concat', [ 'templatecache' ], function() {
-  return gulp.src(['./src/module.js', './src/**/*.js'])
-    .pipe(concat(filename))
-    .pipe(gulp.dest('./dist'));
-});
-
-gulp.task('header', [ 'concat' ], function() {
-  return gulp.src('./dist/*.js')
-    .pipe(header(banner, { pkg: pkg }))
-    .pipe(gulp.dest('./dist'));
-});
-
-gulp.task('uglify', [ 'header' ], function() {
-  return gulp.src('./dist/*.js')
-    .pipe(uglify(dest.replace(/\.js$/, '.min.js')))
-    .pipe(gulp.dest('./'));
-});
-
-gulp.task('templatecache', [ 'clean' ], function() {
-  var TEMPLATE_HEADER = '(function(angular) {"use strict"; angular.module("<%= module %>"<%= standalone %>).run(["$templateCache", function($templateCache) {'
-    , TEMPLATE_FOOTER = '}]);})(window.angular);';
-
-  return gulp.src('src/tmpl/**/*.html')
-    .pipe(templateCache({
-      root: 'angular-elastic-builder',
-      module: 'angular-elastic-builder',
-      templateHeader: TEMPLATE_HEADER,
-      templateFooter: TEMPLATE_FOOTER,
-    }))
-    .pipe(rename('ElasticBuilderTemplates.js'))
-    .pipe(gulp.dest('src/tmpl'));
-});
-
-gulp.task('watch', [ 'templatecache', 'build' ], function() {
-  gulp.watch('src/tmpl/**/*.html', [ 'templatecache', 'build' ]);
-  gulp.watch(['src/**/**.js','!src/tmpl/ElasticBuilderTemplates.js'], [ 'build' ]);
-});
diff --git a/public/assets/plugins/angular-elastic-builder/package.json b/public/assets/plugins/angular-elastic-builder/package.json
deleted file mode 100644 (file)
index 987e3f9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "name": "angular-elastic-builder",
-  "version": "1.4.0",
-  "description": "Angular Module for building an Elasticsearch Query",
-  "author": "Dan Crews <crewsd@gmail.com>",
-  "license": "MIT",
-  "keywords": [
-    "angular",
-    "elasticsearch"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/dncrews/angular-elastic-builder.git"
-  },
-  "devDependencies": {
-    "angular-recursion": "^1.0.5",
-    "del": "^1.1.1",
-    "express": "^4.12.3",
-    "gulp": "^3.8.11",
-    "gulp-angular-templatecache": "^1.6.0",
-    "gulp-concat": "^2.5.2",
-    "gulp-header": "^1.2.2",
-    "gulp-rename": "^1.2.2",
-    "gulp-uglifyjs": "^0.6.1"
-  },
-  "scripts": {
-    "example": "node examples",
-    "test": "echo \"Error: no test specified\" && exit 1"
-  }
-}
diff --git a/public/assets/plugins/angular-elastic-builder/screenshot.png b/public/assets/plugins/angular-elastic-builder/screenshot.png
deleted file mode 100644 (file)
index ca8d57d..0000000
Binary files a/public/assets/plugins/angular-elastic-builder/screenshot.png and /dev/null differ
diff --git a/public/assets/plugins/angular-elastic-builder/src/directives/BuilderDirective.js b/public/assets/plugins/angular-elastic-builder/src/directives/BuilderDirective.js
deleted file mode 100644 (file)
index a23e2a6..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/BuilderDirective.js
- *
- * Angular Directive for injecting a query builder form.
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .directive('elasticBuilder', [
-      'elasticQueryService',
-
-      function EB(elasticQueryService) {
-
-        return {
-          scope: {
-            data: '=elasticBuilder',
-          },
-
-          templateUrl: 'angular-elastic-builder/BuilderDirective.html',
-
-          link: function(scope) {
-            var data = scope.data;
-
-            scope.filters = [];
-
-            /**
-             * Removes either Group or Rule
-             */
-            scope.removeChild = function(idx) {
-              scope.filters.splice(idx, 1);
-            };
-
-            /**
-             * Adds a Single Rule
-             */
-            scope.addRule = function() {
-              scope.filters.push({});
-            };
-
-            /**
-             * Adds a Group of Rules
-             */
-            scope.addGroup = function() {
-              scope.filters.push({
-                type: 'group',
-                subType: 'and',
-                rules: [],
-              });
-            };
-
-            /**
-             * Any time "outside forces" change the query, they should tell us so via
-             * `data.needsUpdate`
-             */
-            scope.$watch('data.needsUpdate', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              scope.filters = elasticQueryService.toFilters(data.query, scope.data.fields);
-              scope.data.needsUpdate = false;
-            });
-
-            /**
-             * Changes on the page update the Query
-             */
-            scope.$watch('filters', function(curr) {
-              if (!curr) {
-                return;
-              }
-
-              data.query = elasticQueryService.toQuery(scope.filters, scope.data.fields);
-            }, true);
-          }
-        };
-      }
-
-    ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/directives/Chooser.js b/public/assets/plugins/angular-elastic-builder/src/directives/Chooser.js
deleted file mode 100644 (file)
index ccf917e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/Chooser.js
- *
- * This file is to help recursively, to decide whether to show a group or rule
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderChooser', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderChooser(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          item: '=elasticBuilderChooser',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/ChooserDirective.html',
-
-        compile: function (element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+ attrs.depth)
-              , item = scope.item;
-
-            scope.getGroupClassName = function() {
-              var level = depth;
-              if (item.type === 'group') level++;
-
-              return groupClassHelper(level);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/directives/Group.js b/public/assets/plugins/angular-elastic-builder/src/directives/Group.js
deleted file mode 100644 (file)
index d691913..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/Group.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderGroup', [
-    'RecursionHelper',
-    'groupClassHelper',
-
-    function elasticBuilderGroup(RH, groupClassHelper) {
-
-      return {
-        scope: {
-          elasticFields: '=',
-          group: '=elasticBuilderGroup',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/GroupDirective.html',
-
-        compile: function(element) {
-          return RH.compile(element, function(scope, el, attrs) {
-            var depth = scope.depth = (+ attrs.depth);
-            var group = scope.group;
-
-            scope.addRule = function() {
-              group.rules.push({});
-            };
-            scope.addGroup = function() {
-              group.rules.push({
-                type: 'group',
-                subType: 'and',
-                rules: [],
-              });
-            };
-
-            scope.removeChild = function(idx) {
-              group.rules.splice(idx, 1);
-            };
-
-            scope.getGroupClassName = function() {
-              return groupClassHelper(depth + 1);
-            };
-          });
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/directives/Rule.js b/public/assets/plugins/angular-elastic-builder/src/directives/Rule.js
deleted file mode 100644 (file)
index 53268ab..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/Rule.js
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticBuilderRule', [
-
-    function elasticBuilderRule() {
-      return {
-        scope: {
-          elasticFields: '=',
-          rule: '=elasticBuilderRule',
-          onRemove: '&',
-        },
-
-        templateUrl: 'angular-elastic-builder/RuleDirective.html',
-
-        link: function(scope) {
-          scope.getType = function() {
-            var fields = scope.elasticFields;
-            var field = scope.rule.field;
-
-            if (!fields || !field) {
-              return;
-            }
-
-            if (fields[field].subType === 'boolean') {
-              return 'boolean';
-            }
-
-            return fields[field].type;
-          };
-        }
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/directives/RuleTypes.js b/public/assets/plugins/angular-elastic-builder/src/directives/RuleTypes.js
deleted file mode 100644 (file)
index 8df37c1..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/directives/RuleTypes.js
- *
- * Determines which Rule type should be displayed
- */
-
-(function(angular) {
-  'use strict';
-
-  var app = angular.module('angular-elastic-builder');
-
-  app.directive('elasticType', [
-
-    function() {
-      return {
-        scope: {
-          type: '=elasticType',
-          rule: '=',
-          guide: '=',
-        },
-
-        template: '<ng-include src="getTemplateUrl()" />',
-
-        link: function(scope) {
-          scope.getTemplateUrl = function() {
-            var type = scope.type;
-            if (! type) return;
-
-            type = type.charAt(0).toUpperCase() + type.slice(1);
-
-            return 'angular-elastic-builder/types/' + type + '.html';
-          };
-
-          // This is a weird hack to make sure these are numbers
-          scope.booleans = [ 'False', 'True' ];
-          scope.booleansOrder = [ 'True', 'False' ];
-
-          scope.inputNeeded = function() {
-            var needs = [
-              'equals',
-              'notEquals',
-
-              'gt',
-              'gte',
-              'lt',
-              'lte',
-            ];
-
-            return ~needs.indexOf(scope.rule.subType);
-          };
-        },
-      };
-    }
-
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/module.js b/public/assets/plugins/angular-elastic-builder/src/module.js
deleted file mode 100644 (file)
index a4f9a9c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/module.js
- *
- * Angular Module for building an Elasticsearch query
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder', [
-    'RecursionHelper',
-  ]);
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/services/GroupClassHelper.js b/public/assets/plugins/angular-elastic-builder/src/services/GroupClassHelper.js
deleted file mode 100644 (file)
index bfd45b5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/services/GroupClassHelper.js
- *
- * This keeps all of the groups colored correctly
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('groupClassHelper', function groupClassHelper() {
-
-      return function(level) {
-        var levels = [
-          '',
-          // 'list-group-item-info',
-          // 'list-group-item-success',
-          // 'list-group-item-warning',
-          // 'list-group-item-danger',
-        ];
-
-        return levels[level % levels.length];
-      };
-    });
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/services/QueryService.js b/public/assets/plugins/angular-elastic-builder/src/services/QueryService.js
deleted file mode 100644 (file)
index 6f088b1..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * angular-elastic-builder
- *
- * /src/services/QueryService.js
- *
- * This file is used to convert filters into queries, and vice versa
- */
-
-(function(angular) {
-  'use strict';
-
-  angular.module('angular-elastic-builder')
-    .factory('elasticQueryService', [
-      function() {
-
-        return {
-          toFilters: toFilters,
-          toQuery: toQuery,
-        };
-      }
-    ]);
-
-  function toFilters(query, fieldMap) {
-    var filters = query.map(parseQueryGroup.bind(query, fieldMap));
-    return filters;
-  }
-
-  function toQuery(filters, fieldMap) {
-    var query = filters.map(parseFilterGroup.bind(filters, fieldMap)).filter(function(item) {
-      return !!item;
-    });
-    return query;
-  }
-
-  function parseQueryGroup(fieldMap, group, truthy) {
-    if (truthy !== false) {
-      truthy = true;
-    }
-
-    var key = Object.keys(group)[0],
-      typeMap = {
-        or: 'group',
-        and: 'group',
-        range: 'number',
-      },
-      type = typeMap[key] || 'item',
-      obj = getFilterTemplate(type);
-
-    switch (key) {
-      case 'or':
-      case 'and':
-        obj.rules = group[key].map(parseQueryGroup.bind(group, fieldMap));
-        obj.subType = key;
-        break;
-      case 'missing':
-      case 'exists':
-        obj.field = group[key].field;
-        obj.subType = {
-          exists: 'exists',
-          missing: 'notExists',
-        }[key];
-        delete obj.value;
-        break;
-      case 'term':
-      case 'terms':
-        obj.field = Object.keys(group[key])[0];
-        var fieldData = fieldMap[Object.keys(group[key])[0]];
-
-        if (fieldData.type === 'multi') {
-          var vals = group[key][obj.field];
-          if (typeof vals === 'string') {
-            vals = [vals];
-          }
-          // MY CUSTOM MODIFICATION
-          obj.value = group[key][obj.field];
-          // obj.values = fieldData.choices.reduce(function(prev, choice) {
-          //   prev[choice] = truthy === (group[key][obj.field].indexOf(choice) > -1);
-          //   return prev;
-          // }, {});
-        } else {
-          obj.subType = truthy ? 'equals' : 'notEquals';
-          obj.value = group[key][obj.field];
-
-          if (typeof obj.value === 'number') {
-            obj.subType = 'boolean';
-          }
-        }
-        break;
-      case 'range':
-        obj.field = Object.keys(group[key])[0];
-        obj.subType = Object.keys(group[key][obj.field])[0];
-        obj.value = group[key][obj.field][obj.subType];
-        break;
-      case 'not':
-        obj = parseQueryGroup(fieldMap, group[key].filter, false);
-        break;
-      default:
-        obj.field = Object.keys(group[key])[0];
-        break;
-    }
-
-    return obj;
-  }
-
-  function parseFilterGroup(fieldMap, group) {
-    var obj = {};
-    if (group.type === 'group') {
-      obj[group.subType] = group.rules.map(parseFilterGroup.bind(group, fieldMap)).filter(function(item) {
-        return !!item;
-      });
-      return obj;
-    }
-
-    var fieldName = group.field;
-    var fieldData = fieldMap[fieldName];
-
-    if (!fieldName) {
-      return;
-    }
-
-    switch (fieldData.type) {
-      case 'term':
-      case 'multiterm':
-        if (fieldData.subType === 'boolean') {
-          group.subType = 'boolean';
-        }
-
-        if (!group.subType) {
-          return;
-        }
-        switch (group.subType) {
-          case 'equals':
-          case 'boolean':
-            if (group.value === undefined) {
-              return;
-            }
-            obj.term = {};
-            obj.term[fieldName] = group.value;
-            break;
-          case 'notEquals':
-            if (group.value === undefined) {
-              return;
-            }
-            obj.not = {
-              filter: {
-                term: {}
-              }
-            };
-            obj.not.filter.term[fieldName] = group.value;
-            break;
-          case 'exists':
-            obj.exists = {
-              field: fieldName
-            };
-            break;
-          case 'notExists':
-            obj.missing = {
-              field: fieldName
-            };
-            break;
-          default:
-            throw new Error('unexpected subtype ' + group.subType);
-        }
-        break;
-
-      case 'number':
-        obj.range = {};
-        obj.range[fieldName] = {};
-        obj.range[fieldName][group.subType] = group.value;
-        break;
-
-      case 'date':
-        if (group.subType === 'exists') {
-          obj.exists = {
-            field: fieldName
-          };
-        } else if (group.subType === 'notExists') {
-          obj.missing = {
-            field: fieldName
-          };
-        } else {
-          throw new Error('unexpected subtype');
-        }
-
-        break;
-
-      case 'multi':
-        obj.terms = {};
-        obj.terms[fieldName] = group.value;
-        // obj.terms[fieldName] = Object.keys(group.values || {}).reduce(function(prev, key) {
-        //   if (group.values[key]) prev.push(key);
-        //
-        //   return prev;
-        // }, []);
-        break;
-
-      default:
-        throw new Error('unexpected type');
-    }
-
-    return obj;
-  }
-
-  function getFilterTemplate(type) {
-    var templates = {
-      group: {
-        type: 'group',
-        subType: '',
-        rules: [],
-      },
-      item: {
-        field: '',
-        subType: '',
-        value: '',
-      },
-      number: {
-        field: '',
-        subType: '',
-        value: null,
-      }
-    };
-
-    return angular.copy(templates[type]);
-  }
-
-})(window.angular);
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/BuilderDirective.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/BuilderDirective.html
deleted file mode 100644 (file)
index 9df6d7c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!-- <div class="elastic-builder">
-  <div class="filter-panels">
-    <div class="list-group form-inline">
-      <div
-        data-ng-repeat="filter in filters"
-        data-elastic-builder-chooser="filter"
-        data-elastic-fields="data.fields"
-        data-on-remove="removeChild($index)"
-        data-depth="0"></div>
-      <div class="list-group-item actions">
-        <a class="btn btn-xs btn-primary" title="Add Rule" data-ng-click="addRule()">
-          <i class="fa fa-plus"></i>
-        </a>
-        <a class="btn btn-xs btn-primary" title="Add Group" data-ng-click="addGroup()">
-          <i class="fa fa-list"></i>
-        </a>
-      </div>
-    </div>
-  </div>
-</div> -->
-
-<!-- <div class="elastic-builder">
-  <div class="filter-panels"> -->
-    <div class="list-group form-inline list-group-item-custom" ng-switch="data.type">
-      <div
-        data-ng-repeat="filter in filters"
-        data-elastic-builder-chooser="filter"
-        data-elastic-fields="data.fields"
-        data-on-remove="removeChild($index)"
-        data-depth="0">
-      </div>
-      <div class="list-group-item actions list-group-item-custom" ng-switch-when="condition">
-        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">
-                                 <i class="icon-plus"></i> {{ 'APPLICATION_ADD_GROUP' | translate }}
-                               </a>
-      </div>
-      <div class="list-group-item actions list-group-item-custom" ng-switch-when="action">
-        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">
-                                 <i class="icon-plus"></i> {{ 'APPLICATION_ADD_ACTION' | translate }}
-                               </a>
-      </div>
-      <div class="list-group-item actions list-group-item-custom" ng-switch-default>
-        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">
-                                 <i class="icon-plus"></i> {{ 'APPLICATION_ADD_CONDITION' | translate }}
-                               </a>
-        <a href="#" class="btn green btn-sm" data-ng-click="addGroup()">
-                                 <i class="icon-plus"></i> {{ 'APPLICATION_ADD_GROUP' | translate }}
-                               </a>
-      </div>
-    </div>
-  <!-- </div>
-</div> -->
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/ChooserDirective.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/ChooserDirective.html
deleted file mode 100644 (file)
index b28fb4a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- <div
-  class="list-group-item elastic-builder-chooser"
-  data-ng-class="getGroupClassName()">
-
-  <div data-ng-if="item.type === 'group'"
-    data-elastic-builder-group="item"
-    data-depth="{{ depth }}"
-    data-elastic-fields="elasticFields"
-    data-on-remove="onRemove()"></div>
-
-  <div data-ng-if="item.type !== 'group'"
-    data-elastic-builder-rule="item"
-    data-elastic-fields="elasticFields"
-    data-on-remove="onRemove()"></div>
-
-</div> -->
-
-
-<div class="list-group-item elastic-builder-chooser list-group-item-custom" data-ng-class="getGroupClassName()">
-  <div data-ng-if="item.type === 'group'"
-    data-elastic-builder-group="item"
-    data-depth="{{ depth }}"
-    data-elastic-fields="elasticFields"
-    data-on-remove="onRemove()"></div>
-  <div data-ng-if="item.type !== 'group'"
-    data-elastic-builder-rule="item"
-    data-elastic-fields="elasticFields"
-    data-on-remove="onRemove()"></div>
-</div>
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/ElasticBuilderTemplates.js b/public/assets/plugins/angular-elastic-builder/src/tmpl/ElasticBuilderTemplates.js
deleted file mode 100644 (file)
index 9a212f7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-(function(angular) {"use strict"; angular.module("angular-elastic-builder").run(["$templateCache", function($templateCache) {$templateCache.put("angular-elastic-builder/BuilderDirective.html","<!-- <div class=\"elastic-builder\">\r\n  <div class=\"filter-panels\">\r\n    <div class=\"list-group form-inline\">\r\n      <div\r\n        data-ng-repeat=\"filter in filters\"\r\n        data-elastic-builder-chooser=\"filter\"\r\n        data-elastic-fields=\"data.fields\"\r\n        data-on-remove=\"removeChild($index)\"\r\n        data-depth=\"0\"></div>\r\n      <div class=\"list-group-item actions\">\r\n        <a class=\"btn btn-xs btn-primary\" title=\"Add Rule\" data-ng-click=\"addRule()\">\r\n          <i class=\"fa fa-plus\"></i>\r\n        </a>\r\n        <a class=\"btn btn-xs btn-primary\" title=\"Add Group\" data-ng-click=\"addGroup()\">\r\n          <i class=\"fa fa-list\"></i>\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div> -->\r\n\r\n<!-- <div class=\"elastic-builder\">\r\n  <div class=\"filter-panels\"> -->\r\n    <div class=\"list-group form-inline list-group-item-custom\" ng-switch=\"data.type\">\r\n      <div\r\n        data-ng-repeat=\"filter in filters\"\r\n        data-elastic-builder-chooser=\"filter\"\r\n        data-elastic-fields=\"data.fields\"\r\n        data-on-remove=\"removeChild($index)\"\r\n        data-depth=\"0\">\r\n      </div>\r\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-when=\"condition\">\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\r\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\r\n                           </a>\r\n      </div>\r\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-when=\"action\">\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\r\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_ACTION\' | translate }}\r\n                          </a>\r\n      </div>\r\n      <div class=\"list-group-item actions list-group-item-custom\" ng-switch-default>\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\r\n                               <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\r\n                               </a>\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addGroup()\">\r\n                                <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_GROUP\' | translate }}\r\n                           </a>\r\n      </div>\r\n    </div>\r\n  <!-- </div>\r\n</div> -->\r\n");
-$templateCache.put("angular-elastic-builder/ChooserDirective.html","<!-- <div\r\n  class=\"list-group-item elastic-builder-chooser\"\r\n  data-ng-class=\"getGroupClassName()\">\r\n\r\n  <div data-ng-if=\"item.type === \'group\'\"\r\n    data-elastic-builder-group=\"item\"\r\n    data-depth=\"{{ depth }}\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n\r\n  <div data-ng-if=\"item.type !== \'group\'\"\r\n    data-elastic-builder-rule=\"item\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n\r\n</div> -->\r\n\r\n\r\n<div class=\"list-group-item elastic-builder-chooser list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\r\n  <div data-ng-if=\"item.type === \'group\'\"\r\n    data-elastic-builder-group=\"item\"\r\n    data-depth=\"{{ depth }}\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n  <div data-ng-if=\"item.type !== \'group\'\"\r\n    data-elastic-builder-rule=\"item\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-on-remove=\"onRemove()\"></div>\r\n</div>\r\n");
-$templateCache.put("angular-elastic-builder/GroupDirective.html","<!-- <div class=\"elastic-builder-group\">\r\n  <h5>If\r\n    <select data-ng-model=\"group.subType\" class=\"form-control\">\r\n      <option value=\"and\">all</option>\r\n      <option value=\"or\">any</option>\r\n    </select>\r\n    of these conditions are met\r\n  </h5>\r\n  <div\r\n    data-ng-repeat=\"rule in group.rules\"\r\n    data-elastic-builder-chooser=\"rule\"\r\n    data-elastic-fields=\"elasticFields\"\r\n    data-depth=\"{{ +depth + 1 }}\"\r\n    data-on-remove=\"removeChild($index)\"></div>\r\n\r\n  <div class=\"list-group-item actions\" data-ng-class=\"getGroupClassName()\">\r\n    <a class=\"btn btn-xs btn-primary\" title=\"Add Sub-Rule\" data-ng-click=\"addRule()\">\r\n      <i class=\"fa fa-plus\"></i>\r\n    </a>\r\n    <a class=\"btn btn-xs btn-primary\" title=\"Add Sub-Group\" data-ng-click=\"addGroup()\">\r\n      <i class=\"fa fa-list\"></i>\r\n    </a>\r\n  </div>\r\n\r\n  <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"fa fa-minus\"></i>\r\n  </a>\r\n</div> -->\r\n\r\n\r\n<!-- BEGIN Portlet PORTLET-->\r\n<div class=\"portlet light\">\r\n  <div class=\"portlet-title\">\r\n    <div class=\"caption\" data-ng-class=\"{\'font-blue-hoki\': data.type === \'condition\', \'font-red-flamingo\': data.type === \'action\'}\">\r\n      <!-- <i class=\"icon-people font-green-sharp\"></i> -->\r\n      <h5><span class=\"caption-subject\">{{ \'APPLICATION_IF\' | translate }}</span>\r\n        <select data-ng-model=\"group.subType\" class=\"form-control\">\r\n          <option value=\"and\"><strong>{{ \'APPLICATION_ALL\' | translate | lowercase }}</strong></option>\r\n          <option value=\"or\"><strong>{{ \'APPLICATION_ANY\' | translate | lowercase }}</strong></option>\r\n        </select>\r\n        <span class=\"caption-subject\">{{group.subType == \'and\' ? \'MESSAGE_CODITIONS_MET_ALL\' : \'MESSAGE_CODITIONS_MET_ANY\' | translate}}</span>\r\n      </h5>\r\n    </div>\r\n  </div>\r\n  <div class=\"portlet-body\">\r\n    <div class=\"elastic-builder-group\">\r\n      <div\r\n        data-ng-repeat=\"rule in group.rules\"\r\n        data-elastic-builder-chooser=\"rule\"\r\n        data-elastic-fields=\"elasticFields\"\r\n        data-depth=\"{{ +depth + 1 }}\"\r\n        data-on-remove=\"removeChild($index)\"></div>\r\n\r\n      <div class=\"list-group-item actions list-group-item-custom\" data-ng-class=\"getGroupClassName()\">\r\n        <a href=\"#\" class=\"btn green btn-sm\" data-ng-click=\"addRule()\">\r\n          <i class=\"icon-plus\"></i> {{ \'APPLICATION_ADD_CONDITION\' | translate }}\r\n        </a>\r\n        <a class=\"btn red btn-sm remover\" data-ng-click=\"onRemove()\">\r\n          <i class=\"icon-trash\"></i> {{ \'APPLICATION_REMOVE_GROUP\' | translate }}\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n<!-- END Portlet PORTLET-->\r\n");
-$templateCache.put("angular-elastic-builder/RuleDirective.html","<!-- <div class=\"elastic-builder-rule\">\r\n  <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select>\r\n\r\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\r\n\r\n  <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"fa fa-minus\"></i>\r\n  </a>\r\n\r\n</div> -->\r\n<!-- <div class=\"elastic-builder-rule\"> -->\r\n  <!-- <select class=\"form-control\" data-ng-model=\"rule.field\" data-ng-options=\"key as key for (key, value) in elasticFields\"></select> -->\n  {{elasticFields[rule.field].action.label | translate}}\n  <select class=\"form-control\" data-ng-model=\"rule.field\" >\n  <option ng-repeat=\"option in elasticFields\" value=\"{{option.value}}\">{{ option.label | translate }}</option>\n  </select>\n  <!-- <ui-select class=\"form-control\" data-ng-model=\"rule.field\" theme=\"bootstrap\">\r\n    <ui-select-match placeholder=\"{{\'APPLICATION_CONDITION\' | translate}}\">{{$translate.instant($select.selected.name)}}</ui-select-match>\r\n    <ui-select-choices repeat=\"value.value as key for (key, value) in elasticFields | filter: $select.search\">\r\n      {{$translate.instant(key.name)}}\r\n    </ui-select-choices>\r\n  </ui-select> -->\r\n\r\n  <span data-elastic-type=\"getType()\" data-rule=\"rule\" data-guide=\"elasticFields[rule.field]\"></span>\r\n\r\n  <!-- <a class=\"btn btn-xs btn-danger remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"fa fa-minus\"></i>\r\n  </a> -->\r\n\r\n  <a class=\"btn remover\" data-ng-click=\"onRemove()\">\r\n    <i class=\"icon-trash\"></i>\r\n  </a>\r\n\r\n<!-- </div> -->\r\n");
-$templateCache.put("angular-elastic-builder/types/Boolean.html","<span class=\"boolean-rule\">\r\n  Equals\r\n\r\n  <!-- This is a weird hack to make sure these are numbers -->\r\n  <select\r\n    data-ng-model=\"rule.value\"\r\n    class=\"form-control\"\r\n    data-ng-options=\"booleans.indexOf(choice) as choice for choice in booleansOrder\">\r\n  </select>\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Date.html","<span class=\"date-rule\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n\r\n    <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup>\r\n  </select>\r\n\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Multi.html","<!-- <span class=\"multi-rule\">\r\n  <span data-ng-repeat=\"choice in guide.choices\">\r\n    <label class=\"checkbox\">\r\n      <input type=\"checkbox\" data-ng-model=\"rule.values[choice]\">\r\n      {{ choice }}\r\n    </label>\r\n  </span>\r\n</span> -->\r\n\r\n<span class=\"multi-rule\">\r\n  {{guide.action.midterm | translate}}\r\n  <!-- Range Fields -->\r\n  <!-- <select data-ng-model=\"rule.values\" class=\"form-control\"> -->\r\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\r\n    <!-- <optgroup label=\"Numeral\"> -->\r\n      <option data-ng-repeat=\"(key, value) in guide.choices\" value=\"{{value}}\">{{key}}</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup> -->\r\n  </select>\r\n\r\n  <!-- <input data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"number\"\r\n    min=\"{{ guide.minimum }}\"\r\n    max=\"{{ guide.maximum }}\"> -->\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Multiterm.html","<span class=\"elastic-multiterm\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\r\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\r\n  </select>\r\n  <select data-ng-model=\"rule.value\" class=\"form-control\">\r\n      <option data-ng-repeat=\"(key, value) in guide.choices\" value=\"{{value}}\">{{value | capitalize}}</option>\r\n  </select>\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Number.html","<span class=\"number-rule\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n    <!-- <optgroup label=\"Numeral\"> -->\r\n      <option value=\"equals\">=</option>\r\n      <option value=\"gt\">&gt;</option>\r\n      <option value=\"gte\">&ge;</option>\r\n      <option value=\"lt\">&lt;</option>\r\n      <option value=\"lte\">&le;</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- <optgroup label=\"Generic\"> -->\r\n      <!-- <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option> -->\r\n    <!-- </optgroup> -->\r\n  </select>\r\n\r\n  <!-- Range Fields -->\r\n  <input data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"number\"\r\n    min=\"{{ guide.minimum }}\"\r\n    max=\"{{ guide.maximum }}\">\r\n\r\n    <!-- <span class=\"help-block\">{{rule.help}}</span> -->\r\n\r\n</span>\r\n");
-$templateCache.put("angular-elastic-builder/types/Term.html","<!-- <span class=\"elastic-term\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\"> -->\r\n    <!-- Term Options -->\r\n    <!-- <optgroup label=\"Text\">\r\n      <option value=\"equals\">Equals</option>\r\n      <option value=\"notEquals\">! Equals</option>\r\n    </optgroup> -->\r\n\r\n    <!-- Generic Options -->\r\n    <!-- <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup>\r\n\r\n  </select>\r\n  <input\r\n    data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"text\">\r\n</span> -->\r\n\r\n\r\n<span class=\"elastic-term\">\r\n  <select data-ng-model=\"rule.subType\" class=\"form-control\">\r\n    <!-- Term Options -->\r\n    <!-- <optgroup label=\"Text\"> -->\r\n      <option value=\"equals\">{{ \'APPLICATION_EQUALS_TO\' | translate }}</option>\r\n      <option value=\"notEquals\">{{ \'APPLICATION_NOT_EQUALS_TO\' | translate }}</option>\r\n    <!-- </optgroup> -->\r\n\r\n    <!-- Generic Options -->\r\n    <!-- <optgroup label=\"Generic\">\r\n      <option value=\"exists\">Exists</option>\r\n      <option value=\"notExists\">! Exists</option>\r\n    </optgroup> -->\r\n\r\n  </select>\r\n  <input\r\n    data-ng-if=\"inputNeeded()\"\r\n    class=\"form-control input-medium\"\r\n    data-ng-model=\"rule.value\"\r\n    type=\"text\">\r\n</span>\r\n");}]);})(window.angular);
\ No newline at end of file
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/GroupDirective.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/GroupDirective.html
deleted file mode 100644 (file)
index 1196759..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<!-- <div class="elastic-builder-group">
-  <h5>If
-    <select data-ng-model="group.subType" class="form-control">
-      <option value="and">all</option>
-      <option value="or">any</option>
-    </select>
-    of these conditions are met
-  </h5>
-  <div
-    data-ng-repeat="rule in group.rules"
-    data-elastic-builder-chooser="rule"
-    data-elastic-fields="elasticFields"
-    data-depth="{{ +depth + 1 }}"
-    data-on-remove="removeChild($index)"></div>
-
-  <div class="list-group-item actions" data-ng-class="getGroupClassName()">
-    <a class="btn btn-xs btn-primary" title="Add Sub-Rule" data-ng-click="addRule()">
-      <i class="fa fa-plus"></i>
-    </a>
-    <a class="btn btn-xs btn-primary" title="Add Sub-Group" data-ng-click="addGroup()">
-      <i class="fa fa-list"></i>
-    </a>
-  </div>
-
-  <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">
-    <i class="fa fa-minus"></i>
-  </a>
-</div> -->
-
-
-<!-- BEGIN Portlet PORTLET-->
-<div class="portlet light">
-  <div class="portlet-title">
-    <div class="caption" data-ng-class="{'font-blue-hoki': data.type === 'condition', 'font-red-flamingo': data.type === 'action'}">
-      <!-- <i class="icon-people font-green-sharp"></i> -->
-      <h5><span class="caption-subject">{{ 'APPLICATION_IF' | translate }}</span>
-        <select data-ng-model="group.subType" class="form-control">
-          <option value="and"><strong>{{ 'APPLICATION_ALL' | translate | lowercase }}</strong></option>
-          <option value="or"><strong>{{ 'APPLICATION_ANY' | translate | lowercase }}</strong></option>
-        </select>
-        <span class="caption-subject">{{group.subType == 'and' ? 'MESSAGE_CODITIONS_MET_ALL' : 'MESSAGE_CODITIONS_MET_ANY' | translate}}</span>
-      </h5>
-    </div>
-  </div>
-  <div class="portlet-body">
-    <div class="elastic-builder-group">
-      <div
-        data-ng-repeat="rule in group.rules"
-        data-elastic-builder-chooser="rule"
-        data-elastic-fields="elasticFields"
-        data-depth="{{ +depth + 1 }}"
-        data-on-remove="removeChild($index)"></div>
-
-      <div class="list-group-item actions list-group-item-custom" data-ng-class="getGroupClassName()">
-        <a href="#" class="btn green btn-sm" data-ng-click="addRule()">
-          <i class="icon-plus"></i> {{ 'APPLICATION_ADD_CONDITION' | translate }}
-        </a>
-        <a class="btn red btn-sm remover" data-ng-click="onRemove()">
-          <i class="icon-trash"></i> {{ 'APPLICATION_REMOVE_GROUP' | translate }}
-        </a>
-      </div>
-    </div>
-  </div>
-</div>
-<!-- END Portlet PORTLET-->
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/RuleDirective.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/RuleDirective.html
deleted file mode 100644 (file)
index f7d69a1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!-- <div class="elastic-builder-rule">
-  <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select>
-
-  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>
-
-  <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">
-    <i class="fa fa-minus"></i>
-  </a>
-
-</div> -->
-<!-- <div class="elastic-builder-rule"> -->
-  <!-- <select class="form-control" data-ng-model="rule.field" data-ng-options="key as key for (key, value) in elasticFields"></select> -->
-  {{elasticFields[rule.field].action.label | translate}}
-  <select class="form-control" data-ng-model="rule.field" >
-  <option ng-repeat="option in elasticFields" value="{{option.value}}">{{ option.label | translate }}</option>
-  </select>
-  <!-- <ui-select class="form-control" data-ng-model="rule.field" theme="bootstrap">
-    <ui-select-match placeholder="{{'APPLICATION_CONDITION' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>
-    <ui-select-choices repeat="value.value as key for (key, value) in elasticFields | filter: $select.search">
-      {{$translate.instant(key.name)}}
-    </ui-select-choices>
-  </ui-select> -->
-
-  <span data-elastic-type="getType()" data-rule="rule" data-guide="elasticFields[rule.field]"></span>
-
-  <!-- <a class="btn btn-xs btn-danger remover" data-ng-click="onRemove()">
-    <i class="fa fa-minus"></i>
-  </a> -->
-
-  <a class="btn remover" data-ng-click="onRemove()">
-    <i class="icon-trash"></i>
-  </a>
-
-<!-- </div> -->
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Boolean.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Boolean.html
deleted file mode 100644 (file)
index 1ac8380..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<span class="boolean-rule">
-  Equals
-
-  <!-- This is a weird hack to make sure these are numbers -->
-  <select
-    data-ng-model="rule.value"
-    class="form-control"
-    data-ng-options="booleans.indexOf(choice) as choice for choice in booleansOrder">
-  </select>
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Date.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Date.html
deleted file mode 100644 (file)
index 377edd4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<span class="date-rule">
-  <select data-ng-model="rule.subType" class="form-control">
-
-    <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup>
-  </select>
-
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Multi.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Multi.html
deleted file mode 100644 (file)
index 1a233b8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- <span class="multi-rule">
-  <span data-ng-repeat="choice in guide.choices">
-    <label class="checkbox">
-      <input type="checkbox" data-ng-model="rule.values[choice]">
-      {{ choice }}
-    </label>
-  </span>
-</span> -->
-
-<span class="multi-rule">
-  {{guide.action.midterm | translate}}
-  <!-- Range Fields -->
-  <!-- <select data-ng-model="rule.values" class="form-control"> -->
-  <select data-ng-model="rule.value" class="form-control">
-    <!-- <optgroup label="Numeral"> -->
-      <option data-ng-repeat="(key, value) in guide.choices" value="{{value}}">{{key}}</option>
-    <!-- </optgroup> -->
-
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup> -->
-  </select>
-
-  <!-- <input data-ng-if="inputNeeded()"
-    class="form-control"
-    data-ng-model="rule.value"
-    type="number"
-    min="{{ guide.minimum }}"
-    max="{{ guide.maximum }}"> -->
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Multiterm.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Multiterm.html
deleted file mode 100644 (file)
index 25c4849..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<span class="elastic-multiterm">
-  <select data-ng-model="rule.subType" class="form-control">
-      <option value="equals">{{ 'APPLICATION_EQUALS_TO' | translate }}</option>
-      <option value="notEquals">{{ 'APPLICATION_NOT_EQUALS_TO' | translate }}</option>
-  </select>
-  <select data-ng-model="rule.value" class="form-control">
-      <option data-ng-repeat="(key, value) in guide.choices" value="{{value}}">{{value | capitalize}}</option>
-  </select>
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Number.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Number.html
deleted file mode 100644 (file)
index 564a1a8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<span class="number-rule">
-  <select data-ng-model="rule.subType" class="form-control">
-    <!-- <optgroup label="Numeral"> -->
-      <option value="equals">=</option>
-      <option value="gt">&gt;</option>
-      <option value="gte">&ge;</option>
-      <option value="lt">&lt;</option>
-      <option value="lte">&le;</option>
-    <!-- </optgroup> -->
-
-    <!-- <optgroup label="Generic"> -->
-      <!-- <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option> -->
-    <!-- </optgroup> -->
-  </select>
-
-  <!-- Range Fields -->
-  <input data-ng-if="inputNeeded()"
-    class="form-control"
-    data-ng-model="rule.value"
-    type="number"
-    min="{{ guide.minimum }}"
-    max="{{ guide.maximum }}">
-
-    <!-- <span class="help-block">{{rule.help}}</span> -->
-
-</span>
diff --git a/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Term.html b/public/assets/plugins/angular-elastic-builder/src/tmpl/types/Term.html
deleted file mode 100644 (file)
index 95f2b76..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!-- <span class="elastic-term">
-  <select data-ng-model="rule.subType" class="form-control"> -->
-    <!-- Term Options -->
-    <!-- <optgroup label="Text">
-      <option value="equals">Equals</option>
-      <option value="notEquals">! Equals</option>
-    </optgroup> -->
-
-    <!-- Generic Options -->
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup>
-
-  </select>
-  <input
-    data-ng-if="inputNeeded()"
-    class="form-control"
-    data-ng-model="rule.value"
-    type="text">
-</span> -->
-
-
-<span class="elastic-term">
-  <select data-ng-model="rule.subType" class="form-control">
-    <!-- Term Options -->
-    <!-- <optgroup label="Text"> -->
-      <option value="equals">{{ 'APPLICATION_EQUALS_TO' | translate }}</option>
-      <option value="notEquals">{{ 'APPLICATION_NOT_EQUALS_TO' | translate }}</option>
-    <!-- </optgroup> -->
-
-    <!-- Generic Options -->
-    <!-- <optgroup label="Generic">
-      <option value="exists">Exists</option>
-      <option value="notExists">! Exists</option>
-    </optgroup> -->
-
-  </select>
-  <input
-    data-ng-if="inputNeeded()"
-    class="form-control input-medium"
-    data-ng-model="rule.value"
-    type="text">
-</span>
index 935cb50..668e0a2 100644 (file)
@@ -61,7 +61,7 @@
     <![endif]-->
     <script src="app/0e6d6720.vendor.js"></script>
 
-    <script src="app/04405547.app.js"></script>
+    <script src="app/c7518ced.app.js"></script>
 
     <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
     <!-- BEGIN CORE PLUGINS -->
similarity index 70%
rename from release-notes/changelog_0.0.6.txt
rename to release-notes/changelog_0.0.7.txt
index 1335a13..51835ab 100644 (file)
@@ -1,5 +1,7 @@
 # xCALLY MOTION Changelog
 
+- * d24580c - 2015-12-09: client side assets angular-elastic-builder 
+- * a1ec677 - 2015-12-07: client app update list 
 - * fb69603 - 2015-12-07: socket fix 
 - * 5e05839 - 2015-12-07: Change Message Build 
 - * ca62527 - 2015-12-07: sever side API update 
 - * c6908e8 - 2015-12-03: server side models index.js 
 - * d10be43 - 2015-12-03: server side migrations folder 
 - * ba8942e - 2015-12-03: server side config. Added config.json file. 
-- * b1797e2 - 2015-12-02: Update Nodejs 
-- * 245bc5a - 2015-12-02: package.js 
-- * 4879475 - 2015-12-02: Checkout production 
-- * 27a821b - 2015-12-02: server side routes.js 
-- * fb32d86 - 2015-12-02: server side config 
-- * ca31944 - 2015-12-02: server side api 
-- * 6221198 - 2015-12-02: client side components 
-- * 5c0d60b - 2015-12-02: client side app chat realtime 
-- * 2528ed9 - 2015-12-02: Move languages under assets 
-- * 8d3a5e0 - 2015-12-02: Remove Images 
-- * 9d724cd - 2015-12-01: change MD5 with md5 
-- * 3388ac3 - 2015-12-01: removed elastic builder and recursion helper request from app.js 
-- * 19955f8 - 2015-12-01: removed recursion helper 
-- * 2f2aadc - 2015-12-01: Triggers client side with new directive; First new triggers server side (only conditions check). 
-- * ff0433d - 2015-12-01: Bug fix grunt file to build 
-- * 6a9e7a3 - 2015-12-01: remove angular-smiles and change path languages 
-- * 0d2376d - 2015-12-01: appjs with ami and agi 
-- * b59c77a - 2015-12-01: bower.json 
-- * 19b362a - 2015-12-01: server side models 
-- * 86d977a - 2015-12-01: server side config 
-- * 24768e3 - 2015-12-01: server side API 
-- * 1e4a001 - 2015-12-01: client side quickSidebar component 
-- * dfa6a84 - 2015-12-01: client side languages components 
-- * 787afbe - 2015-12-01: client side header component 
-- * 8f08964 - 2015-12-01: client side app