Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / services / ami / trigger / index.js
index 283a37a..0798041 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa93a=['parse','search','replace','AllConditions','length','checkConditions','some','channel','account','value','ChatWebsiteId','upperFirst','AccountId','operator','interaction','message','event','agent','membername','lastevent','routeId','exports','util','lodash','url','ioredis','./urlforward','./integration','./script','../../../config/environment','../../../config/logger','../ami','redis','defaults','localhost','socket.io-emitter','popup','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','custom:agentcalled','syncCustomEvent','bind','custom:agentringnoanswer','custom:agentcomplete','custom:agentnosuchnumber','custom:agentcongestion','custom:agentreject','custom:queuecallerabandon','custom:timeout','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','emit','info','prototype','clone','interface','status','checkTrigger','merge','variables','Actions','action','toLowerCase','contactmanager','motionbar','browser','data1','TemplateId','data2','html','render','template\x20not\x20found','uri','buildUri','data3','isNil','data4','location','uriLocation','data5','800','data6','600','winArguments','user:%s','format','trigger:%s:%s','name','exec','accounts','queue','urlforward'];(function(_0x1fb6e2,_0x3a22ce){var _0x354690=function(_0x51f968){while(--_0x51f968){_0x1fb6e2['push'](_0x1fb6e2['shift']());}};_0x354690(++_0x3a22ce);}(_0xa93a,0x16c));var _0xaa93=function(_0x4bf54b,_0x1ef3a0){_0x4bf54b=_0x4bf54b-0x0;var _0x17b912=_0xa93a[_0x4bf54b];return _0x17b912;};'use strict';var util=require(_0xaa93('0x0'));var _=require(_0xaa93('0x1'));var url=require(_0xaa93('0x2'));var Mustache=require('mustache');var Redis=require(_0xaa93('0x3'));var urlforward=require(_0xaa93('0x4'));var integration=require(_0xaa93('0x5'));var cmContact=require('./cmContact');var script=require(_0xaa93('0x6'));var config=require(_0xaa93('0x7'));var logger=require(_0xaa93('0x8'))('trigger');var ami=require(_0xaa93('0x9'));config[_0xaa93('0xa')]=_[_0xaa93('0xb')](config['redis'],{'host':_0xaa93('0xc'),'port':0x18eb});var io=require(_0xaa93('0xd'))(new Redis(config['redis']));var operators={'equals':function(_0x3b2004,_0x27c4ad){return _0x3b2004==_0x27c4ad;},'not_equals':function(_0x3f9794,_0x53794c){return _0x3f9794!=_0x53794c;}};var barAndWebActions=[_0xaa93('0xe'),'url',_0xaa93('0xf')];function Trigger(_0x4b95e3){this[_0xaa93('0x10')]=_0x4b95e3[_0xaa93('0x10')];this[_0xaa93('0x11')]=_0x4b95e3['agents'];this[_0xaa93('0x12')]=_0x4b95e3[_0xaa93('0x12')];this['templates']=_0x4b95e3[_0xaa93('0x13')];this['voiceExtensions']=_0x4b95e3[_0xaa93('0x14')];this[_0xaa93('0x15')]=_0x4b95e3[_0xaa93('0x15')];this[_0xaa93('0x16')]=_0x4b95e3[_0xaa93('0x16')];this[_0xaa93('0x17')]=_0x4b95e3[_0xaa93('0x17')];this['sugarcrmAccounts']=_0x4b95e3[_0xaa93('0x18')];this[_0xaa93('0x19')]=_0x4b95e3['zohoAccounts'];this[_0xaa93('0x1a')]=_0x4b95e3[_0xaa93('0x1a')];this[_0xaa93('0x1b')]=_0x4b95e3[_0xaa93('0x1b')];this[_0xaa93('0x1c')]=_0x4b95e3[_0xaa93('0x1c')];this[_0xaa93('0x1d')]=_0x4b95e3['dynamics365Accounts'];this[_0xaa93('0x1e')]=_0x4b95e3['freshsalesAccounts'];this['accounts']={'zendesk':this[_0xaa93('0x15')],'salesforce':this[_0xaa93('0x17')],'freshdesk':this['freshdeskAccounts'],'sugarcrm':this[_0xaa93('0x18')],'zoho':this['zohoAccounts'],'desk':this['deskAccounts'],'vtiger':this['vtigerAccounts'],'dynamics365':this[_0xaa93('0x1d')],'freshsales':this[_0xaa93('0x1e')],'servicenow':this[_0xaa93('0x1c')]};ami['on'](_0xaa93('0x1f'),this[_0xaa93('0x20')]['bind'](this));ami['on']('custom:agentconnect',this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x22'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x23'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x24'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on']('custom:agentnoanswer',this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on']('custom:agentbusy',this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x25'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x26'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x27'),this[_0xaa93('0x20')]['bind'](this));ami['on'](_0xaa93('0x28'),this['syncCustomEvent'][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x29'),this[_0xaa93('0x2a')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x2b'),this[_0xaa93('0x2a')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x2c'),this['syncAgentDial'][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x2d'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x2e'),this[_0xaa93('0x20')]['bind'](this));ami['on'](_0xaa93('0x2f'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x30'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x31'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));ami['on'](_0xaa93('0x32'),this[_0xaa93('0x20')][_0xaa93('0x21')](this));}Trigger['prototype'][_0xaa93('0x33')]=function(_0x124df5,_0x3850a4,_0x19b8f8){logger[_0xaa93('0x34')](_0x124df5,_0x3850a4,JSON['stringify'](_0x19b8f8));io['to'](_0x124df5)[_0xaa93('0x33')](_0x3850a4,_0x19b8f8);};Trigger[_0xaa93('0x35')]['syncCustomEvent']=function(_0x3d631b){var _0x5f6592=_[_0xaa93('0x36')](_0x3d631b);this['checkTriggers'](_0x5f6592);};Trigger['prototype'][_0xaa93('0x2a')]=function(_0x252f65){if(this[_0xaa93('0x11')][_0x252f65[_0xaa93('0x37')]]){this[_0xaa93('0x20')](_0x252f65);}};Trigger[_0xaa93('0x35')]['checkTriggers']=function(_0x3d3aa5){var _0x5ac1f7;for(var _0x5aed81 in this[_0xaa93('0x10')]){if(this[_0xaa93('0x10')]['hasOwnProperty'](_0x5aed81)){if(this[_0xaa93('0x10')][_0x5aed81][_0xaa93('0x38')]){_0x5ac1f7=this[_0xaa93('0x39')](this['triggers'][_0x5aed81],_0x3d3aa5);if(_0x5ac1f7){_[_0xaa93('0x3a')](_0x3d3aa5,_0x3d3aa5[_0xaa93('0x3b')]);for(var _0x54b6bd=0x0,_0x265ea1,_0x1b7cbc,_0x38f574;_0x54b6bd<this['triggers'][_0x5aed81][_0xaa93('0x3c')]['length'];_0x54b6bd+=0x1){_0x265ea1=this['triggers'][_0x5aed81]['Actions'][_0x54b6bd];if(this['agents'][_0x3d3aa5[_0xaa93('0x37')]]){switch(_0x265ea1[_0xaa93('0x3d')][_0xaa93('0x3e')]()){case _0xaa93('0x3f'):break;case _0xaa93('0x40'):case _0xaa93('0x41'):var _0x33024d={};switch(barAndWebActions[_0x265ea1[_0xaa93('0x42')]]){case _0xaa93('0xe'):_0x33024d[_0xaa93('0x43')]=_0x265ea1[_0xaa93('0x44')];_0x33024d[_0xaa93('0x45')]=this[_0xaa93('0x13')][_0x265ea1[_0xaa93('0x44')]]?Mustache[_0xaa93('0x46')](this[_0xaa93('0x13')][_0x265ea1[_0xaa93('0x44')]][_0xaa93('0x45')],_0x3d3aa5):_0xaa93('0x47');break;case _0xaa93('0x2'):_0x33024d[_0xaa93('0x48')]=this[_0xaa93('0x49')](_0x265ea1[_0xaa93('0x44')],_0x3d3aa5,_['isNil'](_0x265ea1[_0xaa93('0x4a')])?!![]:parseInt(_0x265ea1[_0xaa93('0x4a')],0xa));if(_[_0xaa93('0x4b')](_0x265ea1[_0xaa93('0x4c')])){_0x33024d[_0xaa93('0x4d')]='0';}else{_0x33024d[_0xaa93('0x4e')]=_0x265ea1[_0xaa93('0x4c')];_0x33024d['windowWidth']=_[_0xaa93('0x4b')](_0x265ea1[_0xaa93('0x4f')])?_0xaa93('0x50'):_0x265ea1[_0xaa93('0x4f')];_0x33024d['windowHeight']=_[_0xaa93('0x4b')](_0x265ea1[_0xaa93('0x51')])?_0xaa93('0x52'):_0x265ea1[_0xaa93('0x51')];}break;case _0xaa93('0xf'):_0x33024d['winApplication']=_0x265ea1[_0xaa93('0x44')]?Mustache[_0xaa93('0x46')](_0x265ea1['data2'],_0x3d3aa5):'';_0x33024d[_0xaa93('0x53')]=_0x265ea1[_0xaa93('0x4a')]?Mustache['render'](_0x265ea1[_0xaa93('0x4a')],_0x3d3aa5):'';break;}this[_0xaa93('0x33')](util['format'](_0xaa93('0x54'),this['agents'][_0x3d3aa5[_0xaa93('0x37')]]['name']),util[_0xaa93('0x55')](_0xaa93('0x56'),_0x265ea1[_0xaa93('0x3d')]['toLowerCase'](),barAndWebActions[_0x265ea1[_0xaa93('0x42')]]),_[_0xaa93('0x3a')](_0x33024d,_0x3d3aa5));break;case'jscripty':this[_0xaa93('0x33')](util['format'](_0xaa93('0x54'),this[_0xaa93('0x11')][_0x3d3aa5[_0xaa93('0x37')]][_0xaa93('0x57')]),util[_0xaa93('0x55')]('trigger:%s',_0x265ea1[_0xaa93('0x3d')][_0xaa93('0x3e')]()),_[_0xaa93('0x3a')]({'ProjectId':parseInt(_0x265ea1['data1'],0xa)},_0x3d3aa5));break;default:this['emit'](util['format']('user:%s',this[_0xaa93('0x11')][_0x3d3aa5['interface']][_0xaa93('0x57')]),util[_0xaa93('0x55')]('trigger:%s',_0x265ea1[_0xaa93('0x3d')][_0xaa93('0x3e')]()),_[_0xaa93('0x3a')]({},_0x265ea1,_0x3d3aa5));}}switch(_0x265ea1['action'][_0xaa93('0x3e')]()){case _0xaa93('0x3f'):cmContact[_0xaa93('0x58')](this[_0xaa93('0x11')][_0x3d3aa5['interface']],this['triggers'][_0x5aed81],_0x265ea1,_0x3d3aa5);break;case'integration':integration['exec'](_0x265ea1,_0x3d3aa5,this[_0xaa93('0x59')],this[_0xaa93('0x11')][_0x3d3aa5[_0xaa93('0x37')]],this['voiceQueues'][_0x3d3aa5[_0xaa93('0x5a')]],this[_0xaa93('0x14')][_0x3d3aa5['routeId']]);break;case _0xaa93('0x5b'):urlforward[_0xaa93('0x58')](_0x265ea1,_0x3d3aa5);break;case'script':script['exec'](_0x265ea1,_0x3d3aa5);break;}}}}}}};Trigger[_0xaa93('0x35')]['buildUri']=function(_0x416ae9,_0x4a0173,_0x436715){var _0x1e6c83=url[_0xaa93('0x5c')](Mustache[_0xaa93('0x46')](_0x416ae9,_0x4a0173),!![]);if(_0x436715){_[_0xaa93('0x3a')](_0x1e6c83['query'],_0x4a0173);}delete _0x1e6c83[_0xaa93('0x5d')];var _0x5ac29f=url[_0xaa93('0x55')](_0x1e6c83);_0x5ac29f=_0x5ac29f[_0xaa93('0x5e')](/\/\?/g,'?');return _0x5ac29f;};Trigger['prototype'][_0xaa93('0x39')]=function(_0x112ad6,_0x3788c8){var _0x20957a=!![],_0x2fc354=!![];if(_0x112ad6[_0xaa93('0x5f')][_0xaa93('0x60')]){_0x20957a=_['every'](_0x112ad6['AllConditions'],this[_0xaa93('0x61')](_0x3788c8,_0x112ad6['channel']));}if(_0x112ad6['AnyConditions'][_0xaa93('0x60')]){_0x2fc354=_[_0xaa93('0x62')](_0x112ad6['AnyConditions'],this[_0xaa93('0x61')](_0x3788c8,_0x112ad6[_0xaa93('0x63')]));}return _0x20957a&&_0x2fc354;};Trigger[_0xaa93('0x35')]['checkConditions']=function(_0x4256f0,_0x15e2a0){return function(_0x29b3fd){switch(_0x29b3fd['field']){case _0xaa93('0x64'):if(_0x4256f0[_0xaa93('0x63')]===_0x15e2a0){if(_0x15e2a0==='chat'){return _0x4256f0['ChatWebsiteId']?operators[_0x29b3fd['operator']](Number(_0x29b3fd[_0xaa93('0x65')]),_0x4256f0[_0xaa93('0x66')]):![];}else{return _0x4256f0[_[_0xaa93('0x67')](_0x15e2a0)+_0xaa93('0x68')]?operators[_0x29b3fd[_0xaa93('0x69')]](Number(_0x29b3fd[_0xaa93('0x65')]),_0x4256f0[_[_0xaa93('0x67')](_0x15e2a0)+_0xaa93('0x68')]):![];}}break;case _0xaa93('0x6a'):case _0xaa93('0x6b'):if(_0x4256f0[_0xaa93('0x63')]===_0x15e2a0){return _0x4256f0[_0xaa93('0x6c')]?operators[_0x29b3fd[_0xaa93('0x69')]](_0x29b3fd[_0xaa93('0x65')],_0x4256f0[_0xaa93('0x6c')]):![];}break;case _0xaa93('0x5a'):return _0x4256f0[_0xaa93('0x5a')]?operators[_0x29b3fd[_0xaa93('0x69')]](_0x29b3fd[_0xaa93('0x65')],_0x4256f0[_0xaa93('0x5a')]):![];case _0xaa93('0x6d'):return _0x4256f0[_0xaa93('0x6e')]?operators[_0x29b3fd[_0xaa93('0x69')]](_0x29b3fd['value'],_0x4256f0['membername']):![];case _0xaa93('0x6f'):return _0x4256f0[_0xaa93('0x6f')]?operators[_0x29b3fd['operator']](_0x29b3fd[_0xaa93('0x65')],_0x4256f0[_0xaa93('0x6f')]):![];case _0xaa93('0x70'):return _0x4256f0[_0xaa93('0x70')]?operators[_0x29b3fd[_0xaa93('0x69')]](_0x29b3fd[_0xaa93('0x65')],_0x4256f0[_0xaa93('0x70')]):![];}return![];};};module[_0xaa93('0x71')]=Trigger;
\ No newline at end of file
+var _0xacae=['custom:agentnoanswer','custom:agentbusy','custom:agentcongestion','custom:agentreject','custom:amd','custom:queuecallerabandon','custom:timeout','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','prototype','emit','info','stringify','clone','checkTriggers','interface','hasOwnProperty','status','checkTrigger','merge','variables','length','Actions','action','motionbar','browser','data1','popup','TemplateId','html','data2','render','template\x20not\x20found','uri','buildUri','isNil','data3','location','data4','windowWidth','data5','800','600','data6','winApplication','winArguments','name','format','trigger:%s:%s','toLowerCase','jscripty','trigger:%s','user:%s','contactmanager','exec','accounts','queue','routeId','parse','search','replace','every','AllConditions','AnyConditions','checkConditions','field','account','channel','ChatWebsiteId','operator','upperFirst','AccountId','value','message','event','agent','membername','lastevent','exports','util','lodash','url','ioredis','./urlforward','./integration','./cmContact','./script','../../../config/environment','../../../config/logger','trigger','../ami','redis','defaults','localhost','socket.io-emitter','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','syncCustomEvent','bind','custom:agentconnect','custom:agentringnoanswer','custom:agentcomplete'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0xacae,0x14f));var _0xeaca=function(_0x1a1886,_0x1a88eb){_0x1a1886=_0x1a1886-0x0;var _0xa6b76a=_0xacae[_0x1a1886];return _0xa6b76a;};'use strict';var util=require(_0xeaca('0x0'));var _=require(_0xeaca('0x1'));var url=require(_0xeaca('0x2'));var Mustache=require('mustache');var Redis=require(_0xeaca('0x3'));var urlforward=require(_0xeaca('0x4'));var integration=require(_0xeaca('0x5'));var cmContact=require(_0xeaca('0x6'));var script=require(_0xeaca('0x7'));var config=require(_0xeaca('0x8'));var logger=require(_0xeaca('0x9'))(_0xeaca('0xa'));var ami=require(_0xeaca('0xb'));config[_0xeaca('0xc')]=_[_0xeaca('0xd')](config['redis'],{'host':_0xeaca('0xe'),'port':0x18eb});var io=require(_0xeaca('0xf'))(new Redis(config[_0xeaca('0xc')]));var operators={'equals':function(_0x3419ed,_0x394868){return _0x3419ed==_0x394868;},'not_equals':function(_0x471bd6,_0x4fabc5){return _0x471bd6!=_0x4fabc5;}};var barAndWebActions=['popup','url',_0xeaca('0x10')];function Trigger(_0x7e5b89){this[_0xeaca('0x11')]=_0x7e5b89[_0xeaca('0x11')];this[_0xeaca('0x12')]=_0x7e5b89[_0xeaca('0x12')];this[_0xeaca('0x13')]=_0x7e5b89[_0xeaca('0x13')];this[_0xeaca('0x14')]=_0x7e5b89[_0xeaca('0x14')];this[_0xeaca('0x15')]=_0x7e5b89['voiceExtensions'];this[_0xeaca('0x16')]=_0x7e5b89['zendeskAccounts'];this[_0xeaca('0x17')]=_0x7e5b89[_0xeaca('0x17')];this['salesforceAccounts']=_0x7e5b89[_0xeaca('0x18')];this[_0xeaca('0x19')]=_0x7e5b89['sugarcrmAccounts'];this[_0xeaca('0x1a')]=_0x7e5b89['zohoAccounts'];this[_0xeaca('0x1b')]=_0x7e5b89[_0xeaca('0x1b')];this['vtigerAccounts']=_0x7e5b89[_0xeaca('0x1c')];this[_0xeaca('0x1d')]=_0x7e5b89[_0xeaca('0x1d')];this[_0xeaca('0x1e')]=_0x7e5b89['dynamics365Accounts'];this[_0xeaca('0x1f')]=_0x7e5b89[_0xeaca('0x1f')];this['accounts']={'zendesk':this[_0xeaca('0x16')],'salesforce':this[_0xeaca('0x18')],'freshdesk':this[_0xeaca('0x17')],'sugarcrm':this[_0xeaca('0x19')],'zoho':this[_0xeaca('0x1a')],'desk':this['deskAccounts'],'vtiger':this['vtigerAccounts'],'dynamics365':this[_0xeaca('0x1e')],'freshsales':this[_0xeaca('0x1f')],'servicenow':this['servicenowAccounts']};ami['on']('custom:agentcalled',this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x22'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x23'),this[_0xeaca('0x20')]['bind'](this));ami['on'](_0xeaca('0x24'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on']('custom:agentnosuchnumber',this[_0xeaca('0x20')]['bind'](this));ami['on'](_0xeaca('0x25'),this['syncCustomEvent'][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x26'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x27'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x28'),this[_0xeaca('0x20')]['bind'](this));ami['on'](_0xeaca('0x29'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x2a'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x2b'),this['syncCustomEvent']['bind'](this));ami['on'](_0xeaca('0x2c'),this[_0xeaca('0x2d')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x2e'),this['syncAgentDial']['bind'](this));ami['on'](_0xeaca('0x2f'),this['syncAgentDial'][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x30'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x31'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x32'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x33'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x34'),this[_0xeaca('0x20')][_0xeaca('0x21')](this));ami['on'](_0xeaca('0x35'),this[_0xeaca('0x20')]['bind'](this));}Trigger[_0xeaca('0x36')][_0xeaca('0x37')]=function(_0x1978eb,_0xcab847,_0x5182ac){logger[_0xeaca('0x38')](_0x1978eb,_0xcab847,JSON[_0xeaca('0x39')](_0x5182ac));io['to'](_0x1978eb)['emit'](_0xcab847,_0x5182ac);};Trigger[_0xeaca('0x36')][_0xeaca('0x20')]=function(_0x357360){var _0x5f2970=_[_0xeaca('0x3a')](_0x357360);this[_0xeaca('0x3b')](_0x5f2970);};Trigger['prototype'][_0xeaca('0x2d')]=function(_0x307247){if(this[_0xeaca('0x12')][_0x307247[_0xeaca('0x3c')]]){this['syncCustomEvent'](_0x307247);}};Trigger[_0xeaca('0x36')][_0xeaca('0x3b')]=function(_0x3d79f7){var _0x18328e;for(var _0x2b2335 in this[_0xeaca('0x11')]){if(this['triggers'][_0xeaca('0x3d')](_0x2b2335)){if(this[_0xeaca('0x11')][_0x2b2335][_0xeaca('0x3e')]){_0x18328e=this[_0xeaca('0x3f')](this['triggers'][_0x2b2335],_0x3d79f7);if(_0x18328e){_[_0xeaca('0x40')](_0x3d79f7,_0x3d79f7[_0xeaca('0x41')]);for(var _0x4440ae=0x0,_0x27bc65,_0x479a07,_0x20c5f6;_0x4440ae<this[_0xeaca('0x11')][_0x2b2335]['Actions'][_0xeaca('0x42')];_0x4440ae+=0x1){_0x27bc65=this[_0xeaca('0x11')][_0x2b2335][_0xeaca('0x43')][_0x4440ae];if(this[_0xeaca('0x12')][_0x3d79f7['interface']]){switch(_0x27bc65[_0xeaca('0x44')]['toLowerCase']()){case'contactmanager':break;case _0xeaca('0x45'):case _0xeaca('0x46'):var _0x2401f3={};switch(barAndWebActions[_0x27bc65[_0xeaca('0x47')]]){case _0xeaca('0x48'):_0x2401f3[_0xeaca('0x49')]=_0x27bc65['data2'];_0x2401f3[_0xeaca('0x4a')]=this[_0xeaca('0x14')][_0x27bc65[_0xeaca('0x4b')]]?Mustache[_0xeaca('0x4c')](this[_0xeaca('0x14')][_0x27bc65[_0xeaca('0x4b')]]['html'],_0x3d79f7):_0xeaca('0x4d');break;case _0xeaca('0x2'):_0x2401f3[_0xeaca('0x4e')]=this[_0xeaca('0x4f')](_0x27bc65[_0xeaca('0x4b')],_0x3d79f7,_[_0xeaca('0x50')](_0x27bc65[_0xeaca('0x51')])?!![]:parseInt(_0x27bc65[_0xeaca('0x51')],0xa));if(_[_0xeaca('0x50')](_0x27bc65['data4'])){_0x2401f3[_0xeaca('0x52')]='0';}else{_0x2401f3['uriLocation']=_0x27bc65[_0xeaca('0x53')];_0x2401f3[_0xeaca('0x54')]=_[_0xeaca('0x50')](_0x27bc65[_0xeaca('0x55')])?_0xeaca('0x56'):_0x27bc65[_0xeaca('0x55')];_0x2401f3['windowHeight']=_[_0xeaca('0x50')](_0x27bc65['data6'])?_0xeaca('0x57'):_0x27bc65[_0xeaca('0x58')];}break;case _0xeaca('0x10'):_0x2401f3[_0xeaca('0x59')]=_0x27bc65[_0xeaca('0x4b')]?Mustache[_0xeaca('0x4c')](_0x27bc65[_0xeaca('0x4b')],_0x3d79f7):'';_0x2401f3[_0xeaca('0x5a')]=_0x27bc65[_0xeaca('0x51')]?Mustache['render'](_0x27bc65[_0xeaca('0x51')],_0x3d79f7):'';break;}this[_0xeaca('0x37')](util['format']('user:%s',this[_0xeaca('0x12')][_0x3d79f7['interface']][_0xeaca('0x5b')]),util[_0xeaca('0x5c')](_0xeaca('0x5d'),_0x27bc65[_0xeaca('0x44')][_0xeaca('0x5e')](),barAndWebActions[_0x27bc65[_0xeaca('0x47')]]),_['merge'](_0x2401f3,_0x3d79f7));break;case _0xeaca('0x5f'):this[_0xeaca('0x37')](util['format']('user:%s',this[_0xeaca('0x12')][_0x3d79f7[_0xeaca('0x3c')]][_0xeaca('0x5b')]),util[_0xeaca('0x5c')](_0xeaca('0x60'),_0x27bc65['action']['toLowerCase']()),_[_0xeaca('0x40')]({'ProjectId':parseInt(_0x27bc65[_0xeaca('0x47')],0xa)},_0x3d79f7));break;default:this[_0xeaca('0x37')](util[_0xeaca('0x5c')](_0xeaca('0x61'),this[_0xeaca('0x12')][_0x3d79f7[_0xeaca('0x3c')]][_0xeaca('0x5b')]),util['format'](_0xeaca('0x60'),_0x27bc65[_0xeaca('0x44')]['toLowerCase']()),_[_0xeaca('0x40')]({},_0x27bc65,_0x3d79f7));}}switch(_0x27bc65[_0xeaca('0x44')][_0xeaca('0x5e')]()){case _0xeaca('0x62'):cmContact['exec'](this[_0xeaca('0x12')][_0x3d79f7[_0xeaca('0x3c')]],this[_0xeaca('0x11')][_0x2b2335],_0x27bc65,_0x3d79f7);break;case'integration':integration[_0xeaca('0x63')](_0x27bc65,_0x3d79f7,this[_0xeaca('0x64')],this[_0xeaca('0x12')][_0x3d79f7[_0xeaca('0x3c')]],this[_0xeaca('0x13')][_0x3d79f7[_0xeaca('0x65')]],this[_0xeaca('0x15')][_0x3d79f7[_0xeaca('0x66')]]);break;case'urlforward':urlforward['exec'](_0x27bc65,_0x3d79f7);break;case'script':script['exec'](_0x27bc65,_0x3d79f7);break;}}}}}}};Trigger['prototype'][_0xeaca('0x4f')]=function(_0x290c9b,_0x48634e,_0xe23b7e){var _0x4e1581=url[_0xeaca('0x67')](Mustache[_0xeaca('0x4c')](_0x290c9b,_0x48634e),!![]);if(_0xe23b7e){_['merge'](_0x4e1581['query'],_0x48634e);}delete _0x4e1581[_0xeaca('0x68')];var _0x351b61=url[_0xeaca('0x5c')](_0x4e1581);_0x351b61=_0x351b61[_0xeaca('0x69')](/\/\?/g,'?');return _0x351b61;};Trigger['prototype'][_0xeaca('0x3f')]=function(_0x5676b5,_0xcec320){var _0x11c54e=!![],_0x39ba5d=!![];if(_0x5676b5['AllConditions'][_0xeaca('0x42')]){_0x11c54e=_[_0xeaca('0x6a')](_0x5676b5[_0xeaca('0x6b')],this['checkConditions'](_0xcec320,_0x5676b5['channel']));}if(_0x5676b5[_0xeaca('0x6c')]['length']){_0x39ba5d=_['some'](_0x5676b5[_0xeaca('0x6c')],this[_0xeaca('0x6d')](_0xcec320,_0x5676b5['channel']));}return _0x11c54e&&_0x39ba5d;};Trigger[_0xeaca('0x36')][_0xeaca('0x6d')]=function(_0x17dc6e,_0x1503ea){return function(_0x59d9ab){switch(_0x59d9ab[_0xeaca('0x6e')]){case _0xeaca('0x6f'):if(_0x17dc6e[_0xeaca('0x70')]===_0x1503ea){if(_0x1503ea==='chat'){return _0x17dc6e[_0xeaca('0x71')]?operators[_0x59d9ab[_0xeaca('0x72')]](Number(_0x59d9ab['value']),_0x17dc6e[_0xeaca('0x71')]):![];}else{return _0x17dc6e[_[_0xeaca('0x73')](_0x1503ea)+_0xeaca('0x74')]?operators[_0x59d9ab[_0xeaca('0x72')]](Number(_0x59d9ab[_0xeaca('0x75')]),_0x17dc6e[_[_0xeaca('0x73')](_0x1503ea)+_0xeaca('0x74')]):![];}}break;case'interaction':case _0xeaca('0x76'):if(_0x17dc6e[_0xeaca('0x70')]===_0x1503ea){return _0x17dc6e[_0xeaca('0x77')]?operators[_0x59d9ab[_0xeaca('0x72')]](_0x59d9ab[_0xeaca('0x75')],_0x17dc6e[_0xeaca('0x77')]):![];}break;case _0xeaca('0x65'):return _0x17dc6e[_0xeaca('0x65')]?operators[_0x59d9ab[_0xeaca('0x72')]](_0x59d9ab[_0xeaca('0x75')],_0x17dc6e['queue']):![];case _0xeaca('0x78'):return _0x17dc6e[_0xeaca('0x79')]?operators[_0x59d9ab[_0xeaca('0x72')]](_0x59d9ab[_0xeaca('0x75')],_0x17dc6e['membername']):![];case _0xeaca('0x7a'):return _0x17dc6e[_0xeaca('0x7a')]?operators[_0x59d9ab[_0xeaca('0x72')]](_0x59d9ab[_0xeaca('0x75')],_0x17dc6e[_0xeaca('0x7a')]):![];case _0xeaca('0x66'):return _0x17dc6e[_0xeaca('0x66')]?operators[_0x59d9ab[_0xeaca('0x72')]](_0x59d9ab[_0xeaca('0x75')],_0x17dc6e[_0xeaca('0x66')]):![];}return![];};};module[_0xeaca('0x7b')]=Trigger;
\ No newline at end of file