Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / services / ami / preview / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x1a13=['countmachineretry','cause-txt','dialstatus','custom:amd','amd','[callProgressDetectingCustomer][hangupInAMD]','[callProgressDetectingCustomer][machine]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','isUndefined','object','reason','logAgent','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','[verifyAdditionalPhone]\x20','resolve','[swapAdditionalPhone]\x20','[incrementPreviewCounters]\x20','checkInBlack','Contact','phone','Queue','lookAgent','isEmpty','execCall','[Preview][execCall][success]','Queue:\x20','\x20IdHopper:\x20','custom:agentcalled','called','Calling','[Preview][execCall][failure]','Call\x20failed','logBlacklist','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','SIP/%s','unmonitored','execRun','unlock','unlockContact','disableContact','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','Call\x20unsuccessful','[Preview][getContactPreview]','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20working\x20correctly]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','isActive','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','Is\x20Valid','SIP/%s/%s%s','trim','dialCutDigit','substring','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','getCallerId','originatecalleridname','extractCalleridName','originatecalleridnum','addVariables','merge','toLowerVariables','starttime','variables','Action','variablesAction','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','syncNewExten','syncOriginateResponse','actionid','logLookAgent','clone','isFailure','response','custom:agentringnoanswer','rejected','[callProgressDetectingAgent][logAnswer]','cause','callProgressDetectingCustomer','[syncHangup][talking][cause]','statedesc','dialQueueProject','channelstate','transfer','[syncHangup][talking][transfer]','destuniqueid','syncHangupRequest','filterKey','keys','variable','addVariable','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','util','lodash','uuid','moment','md5','ioredis','../../../config/logger','preview','actionPreview','../ami','./rpcDb','../rpc/cmHopperAdditionalPhone','./action','./util/util','defaults','localhost','socket.io-emitter','redis','prototype','enqueue','tail','finally','sequence','voiceQueues','trunks','actions','agents','clockClearZombieChannels','originateresponse','bind','hangup','syncHangup','dialend','syncDialEnd','newexten','varset','syncVarSet','attendedtransfer','syncBlindTransfer','emit','type','outbound','strategy','answered','available','loggedIn','sumBillable','sumDuration','talking','total','abandoned','waiting','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundCongestionCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundAbandonedCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','name','active','callerid','Interval','stringify','format','voice_queue:save','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','sendMessageOneNotActive','originated','pTalking','paused','message','NOT_ACTIVE','logger','\x20is\x20not\x20active','DEACTIVATED','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20deactivated','loopCampaigns','syncCampaigns','campaignsPreview','booked','clearZombieChannels','hasOwnProperty','dialActive','setMessage','dialPreviewAutoRecallMe','clearZombieChannel','isNil','[clearZombieChannels][talking]','originated:\x20','queue','dialAnswer','pick','UserId','VoiceQueueId','ListId','status','channel','catch','updateOriginated','[clearZombieChannel]','decrementTalkink','loggerError','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','[action]','recallMe','getContactRecallMe','agentReadyId','length','getDiff','scheduledat','dialRecallMeTimeout','Agent','voicePause','run','then','logger2','[RecallMe]','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','logCustomer','RecallFailedTimeout','createCustomerFinal','[HistoryRecallClose]','[getContactRecallMe]','AGENTS_NOT_LOGGED','isTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','ACTIVE','countglobal','totalGlobal','NoSuchNumber','custom:agentnosuchnumber','buildObj','nosuchnumber','additional','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','cloneAction','dialNoSuchNumberMaxRetry','[callProgressDetectingCustomer][logNoSuchGlobal]','rescheduleContact','scheduledAt','countnosuchnumberretry','unlockAgent','activeContact','linkedid','actioncountonusuch','idContact','incrementPreviewCounters','swapAdditionalPhones','ANSWER','YYYY-MM-DD\x20HH:mm:ss','responsetime','answertime','uniqueid','\x20Queue','pTalking:\x20','custom:agentconnect','connect','acw','custom:agentConnectPreview','custom:agentcomplete','[16]','Answer','crateCustomerReportQueue','talktime','BUSY','countbusyretry','Busy','dialBusyRetryFrequency','busy','[callProgressDetectingCustomer][logBusy]','verifyAdditionalPhones','Global','dialBusyMaxRetry','NOANSWER','outboundNoAnswerCallsDay','countnoanswerretry','NoAnswer','dialNoAnswerRetryFrequency','custom:agentnoanswer','[callProgressDetectingCustomer][logNoAnswer]','[callProgressDetectingCustomer][logNoAnswerGlobal]','dialNoAnswerMaxRetry','countcongestionretry','Congestion','dialCongestionRetryFrequency','custom:agentcongestion','[callProgressDetectingCustomer][logCongestion]','AgentReject','dialAgentRejectRetryFrequency','agentreject','[syncHangupRequest][logAgentReject]','countagentrejectretry','dialAgentRejectMaxRetry','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedMaxRety','dialAbandonedRetryFrequency','outboundUnknownCallsDay'];(function(_0x27062d,_0x24b179){var _0x4f1478=function(_0x3b4489){while(--_0x3b4489){_0x27062d['push'](_0x27062d['shift']());}};_0x4f1478(++_0x24b179);}(_0x1a13,0x1e1));var _0x31a1=function(_0x384396,_0x24a1c3){_0x384396=_0x384396-0x0;var _0x2df0be=_0x1a13[_0x384396];return _0x2df0be;};'use strict';var util=require(_0x31a1('0x0'));var _=require(_0x31a1('0x1'));var uuid=require(_0x31a1('0x2'));var moment=require(_0x31a1('0x3'));var md5=require(_0x31a1('0x4'));var Redis=require(_0x31a1('0x5'));var config=require('../../../config/environment');var logger=require(_0x31a1('0x6'))(_0x31a1('0x7'));var loggerAction=require('../../../config/logger')(_0x31a1('0x8'));var ami=require(_0x31a1('0x9'));var rpcDb=require(_0x31a1('0xa'));var cmHopperAdditionalPhone=require(_0x31a1('0xb'));var Action=require(_0x31a1('0xc'));var ut=require(_0x31a1('0xd'));config['redis']=_[_0x31a1('0xe')](config['redis'],{'host':_0x31a1('0xf'),'port':0x18eb});var io=require(_0x31a1('0x10'))(new Redis(config[_0x31a1('0x11')]));var Sequence=function(){};Sequence[_0x31a1('0x12')][_0x31a1('0x13')]=function(_0x40eaa2){this['tail']=this[_0x31a1('0x14')]?this['tail'][_0x31a1('0x15')](_0x40eaa2):_0x40eaa2();};function Preview(_0x3c0e22){this[_0x31a1('0x16')]=new Sequence();this['campaignsPreview']=_0x3c0e22[_0x31a1('0x17')];this[_0x31a1('0x18')]=_0x3c0e22[_0x31a1('0x18')];this[_0x31a1('0x19')]={};this[_0x31a1('0x1a')]=_0x3c0e22[_0x31a1('0x1a')];this[_0x31a1('0x1b')]=0x0;ami['on'](_0x31a1('0x1c'),this['syncOriginateResponse'][_0x31a1('0x1d')](this));ami['on'](_0x31a1('0x1e'),this[_0x31a1('0x1f')][_0x31a1('0x1d')](this));ami['on']('hanguprequest',this['syncHangupRequest'][_0x31a1('0x1d')](this));ami['on'](_0x31a1('0x20'),this[_0x31a1('0x21')]['bind'](this));ami['on'](_0x31a1('0x22'),this['syncNewExten'][_0x31a1('0x1d')](this));ami['on'](_0x31a1('0x23'),this[_0x31a1('0x24')]['bind'](this));ami['on'](_0x31a1('0x25'),this['syncAttendedTransfer']['bind'](this));ami['on']('blindtransfer',this[_0x31a1('0x26')]['bind'](this));this['loopCampaigns'](this['campaignsPreview']);}function emit(_0x1906c1,_0x2a81df,_0x2a7554){io['to'](_0x1906c1)[_0x31a1('0x27')](_0x2a81df,_0x2a7554);}function emitCampaignPreview(_0x4a38a3){if(_0x4a38a3[_0x31a1('0x28')]===_0x31a1('0x29')){var _0x2538f0={'id':_0x4a38a3['id'],'name':_0x4a38a3['name'],'strategy':_0x4a38a3[_0x31a1('0x2a')],'answered':_0x4a38a3[_0x31a1('0x2b')],'available':_0x4a38a3[_0x31a1('0x2c')],'loggedIn':_0x4a38a3[_0x31a1('0x2d')],'pTalking':_0x4a38a3['pTalking'],'sumBillable':_0x4a38a3[_0x31a1('0x2e')],'sumDuration':_0x4a38a3[_0x31a1('0x2f')],'sumHoldTime':_0x4a38a3['sumHoldTime']||0x0,'talking':_0x4a38a3[_0x31a1('0x30')],'total':_0x4a38a3[_0x31a1('0x31')],'type':_0x4a38a3[_0x31a1('0x28')],'unmanaged':_0x4a38a3['unmanaged'],'abandoned':_0x4a38a3[_0x31a1('0x32')],'waiting':_0x4a38a3[_0x31a1('0x33')],'loggedInDb':_0x4a38a3['loggedInDb'],'dialActive':_0x4a38a3['dialActive'],'dialMethod':_0x4a38a3[_0x31a1('0x34')],'dialOriginateCallerIdName':_0x4a38a3[_0x31a1('0x35')],'dialOriginateCallerIdNumber':_0x4a38a3[_0x31a1('0x36')],'dialOriginateTimeout':_0x4a38a3[_0x31a1('0x37')],'dialPrefix':_0x4a38a3[_0x31a1('0x38')],'outboundAnswerAgiCallsDay':_0x4a38a3['outboundAnswerAgiCallsDay'],'outboundAnswerCallsDay':_0x4a38a3[_0x31a1('0x39')],'outboundBlacklistCallsDay':_0x4a38a3[_0x31a1('0x3a')],'outboundBusyCallsDay':_0x4a38a3['outboundBusyCallsDay'],'outboundCongestionCallsDay':_0x4a38a3[_0x31a1('0x3b')],'outboundDropCallsDayACS':_0x4a38a3['outboundDropCallsDayACS'],'outboundDropCallsDayCallersExit':_0x4a38a3[_0x31a1('0x3c')],'outboundDropCallsDayTimeout':_0x4a38a3[_0x31a1('0x3d')],'outboundNoAnswerCallsDay':_0x4a38a3['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x4a38a3[_0x31a1('0x3e')],'outboundOriginateFailureCallsDay':_0x4a38a3[_0x31a1('0x3f')],'outboundReCallsDay':_0x4a38a3[_0x31a1('0x40')],'outboundRejectCallsDay':_0x4a38a3[_0x31a1('0x41')],'outboundUnknownCallsDay':_0x4a38a3['outboundUnknownCallsDay'],'outboundAbandonedCallsDay':_0x4a38a3[_0x31a1('0x42')],'predictiveIntervalAnsweredCalls':_0x4a38a3[_0x31a1('0x43')],'predictiveIntervalAvgHoldtime':_0x4a38a3[_0x31a1('0x44')],'predictiveIntervalAvgTalktime':_0x4a38a3[_0x31a1('0x45')],'predictiveIntervalDroppedCallsCallersExit':_0x4a38a3[_0x31a1('0x46')],'predictiveIntervalDroppedCallsTimeout':_0x4a38a3[_0x31a1('0x47')],'predictiveIntervalErlangCalls':_0x4a38a3['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x4a38a3[_0x31a1('0x48')],'predictiveIntervalHitRate':_0x4a38a3[_0x31a1('0x49')],'predictiveIntervalMultiplicativeFactor':_0x4a38a3[_0x31a1('0x4a')],'predictiveIntervalPauses':_0x4a38a3[_0x31a1('0x4b')],'predictiveIntervalAvailable':_0x4a38a3[_0x31a1('0x4c')],'predictiveIntervalTotalCalls':_0x4a38a3[_0x31a1('0x4d')],'message':_0x4a38a3['message'],'originated':_0x4a38a3['originated'],'erlangCalls':_0x4a38a3[_0x31a1('0x4e')],'erlangCallToSecond':_0x4a38a3[_0x31a1('0x4f')],'erlangAbandonmentRate':_0x4a38a3[_0x31a1('0x50')],'erlangBusyFactor':_0x4a38a3[_0x31a1('0x51')],'startPredictive':_0x4a38a3[_0x31a1('0x52')],'startProgressive':_0x4a38a3[_0x31a1('0x53')]};if(_0x4a38a3[_0x31a1('0x54')]){_0x2538f0[_0x31a1('0x54')]={'id':_0x4a38a3['Trunk']['id'],'name':_0x4a38a3[_0x31a1('0x54')][_0x31a1('0x55')],'active':_0x4a38a3[_0x31a1('0x54')][_0x31a1('0x56')],'callerid':_0x4a38a3[_0x31a1('0x54')][_0x31a1('0x57')]};}if(_0x4a38a3[_0x31a1('0x58')]){_0x2538f0[_0x31a1('0x58')]={'id':_0x4a38a3[_0x31a1('0x58')]['id'],'name':_0x4a38a3[_0x31a1('0x58')]['name']};}var _0x77af46=md5(JSON[_0x31a1('0x59')](_0x2538f0));if(_0x4a38a3['md5']!==_0x77af46){_0x4a38a3[_0x31a1('0x4')]=_0x77af46;emit(util[_0x31a1('0x5a')]('voice:queue:%s',_0x2538f0[_0x31a1('0x55')]),_0x31a1('0x5b'),_0x2538f0);}}}function emitVoiceQueueChannelRemove(_0x3c6901){logger[_0x31a1('0x5c')](_0x31a1('0x5d'),JSON['stringify'](_0x3c6901));emit(util[_0x31a1('0x5a')]('voice:queue:%s',_0x3c6901[_0x31a1('0x55')]),'voice_queue_channel:remove',_0x3c6901);io[_0x31a1('0x27')]('voice_queue_presence:remove',_0x3c6901);}function notSendMessagesQueue(_0x22aff5){if(_0x22aff5[_0x31a1('0x5e')]){if(_0x22aff5[_0x31a1('0x5f')]===0x0&&_0x22aff5[_0x31a1('0x60')]===0x0){_0x22aff5['sendMessageOneNotActive']=![];_0x22aff5['available']=0x0;_0x22aff5[_0x31a1('0x61')]=0x0;_0x22aff5[_0x31a1('0x62')]=_0x31a1('0x63');ut[_0x31a1('0x64')]('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x22aff5[_0x31a1('0x55')]+_0x31a1('0x65'));}else{_0x22aff5['message']=_0x31a1('0x66');ut[_0x31a1('0x64')](_0x31a1('0x67'),_0x22aff5[_0x31a1('0x55')]+_0x31a1('0x68'));}emitCampaignPreview(_0x22aff5);}}Preview[_0x31a1('0x12')][_0x31a1('0x69')]=function(){var _0x57efca=this;setInterval(function(){_0x57efca[_0x31a1('0x6a')]();},0x7cf);};Preview[_0x31a1('0x12')][_0x31a1('0x6a')]=function(){var _0x3074ac=this[_0x31a1('0x6b')];this['clockClearZombieChannels']+=0x1;for(var _0x280629 in _0x3074ac){if(_0x3074ac['hasOwnProperty'](_0x280629)&&(_0x3074ac[_0x280629]['dialMethod']===_0x31a1('0x7')||_0x3074ac[_0x280629][_0x31a1('0x34')]===_0x31a1('0x6c'))&&_0x3074ac[_0x280629]['type']===_0x31a1('0x29')){if(this[_0x31a1('0x1b')]>0x7){this['clockClearZombieChannels']=0x0;this[_0x31a1('0x6d')]();}}if(_0x3074ac[_0x31a1('0x6e')](_0x280629)&&_0x3074ac[_0x280629][_0x31a1('0x34')]==='preview'&&_0x3074ac[_0x280629]['type']===_0x31a1('0x29')){if(_0x3074ac[_0x280629][_0x31a1('0x6f')]){this[_0x31a1('0x70')](_0x3074ac[_0x280629]);if(_0x3074ac[_0x280629][_0x31a1('0x71')])this['recallMe'](_0x3074ac[_0x280629]);}else{notSendMessagesQueue(_0x3074ac[_0x280629]);}}}};Preview[_0x31a1('0x12')][_0x31a1('0x72')]=function(_0x519812){var _0x205e02=this;this[_0x31a1('0x16')][_0x31a1('0x13')](function(){if(!_[_0x31a1('0x73')](_0x205e02[_0x31a1('0x19')][_0x519812])){loggerAction[_0x31a1('0x5c')](_0x31a1('0x74'),_0x519812,'Queue',_0x205e02[_0x31a1('0x19')][_0x519812]['queue'],_0x31a1('0x75'),JSON[_0x31a1('0x59')](_0x205e02[_0x31a1('0x6b')][_0x205e02['actions'][_0x519812][_0x31a1('0x76')]][_0x31a1('0x5f')]),'pTalking:\x20',JSON[_0x31a1('0x59')](_0x205e02[_0x31a1('0x6b')][_0x205e02[_0x31a1('0x19')][_0x519812][_0x31a1('0x76')]][_0x31a1('0x60')]),JSON[_0x31a1('0x59')](_0x205e02[_0x31a1('0x19')][_0x519812][_0x31a1('0x77')]),JSON[_0x31a1('0x59')](_[_0x31a1('0x78')](_0x205e02[_0x31a1('0x19')][_0x519812],['contactId',_0x31a1('0x79'),_0x31a1('0x7a'),_0x31a1('0x7b')])));return ami['Action']({'action':_0x31a1('0x7c'),'channel':_0x205e02[_0x31a1('0x19')][_0x519812][_0x31a1('0x7d')]})[_0x31a1('0x7e')](function(_0x114c4e){if(_0x114c4e['message']==='No\x20such\x20channel'){setTimeout(function(){if(_0x205e02[_0x31a1('0x19')][_0x519812]){ut[_0x31a1('0x7f')](_0x205e02[_0x31a1('0x6b')][_0x205e02[_0x31a1('0x19')][_0x519812][_0x31a1('0x76')]],_0x31a1('0x80'));if(_0x205e02['actions'][_0x519812][_0x31a1('0x77')]===!![]){ut[_0x31a1('0x81')](_0x205e02[_0x31a1('0x6b')][_0x205e02[_0x31a1('0x19')][_0x519812][_0x31a1('0x76')]],_0x31a1('0x80'));ut[_0x31a1('0x82')](_0x31a1('0x83')+_0x519812,_0x205e02['actions'][_0x519812][_0x31a1('0x76')]);}ut[_0x31a1('0x82')](_0x31a1('0x84')+_0x519812,_0x205e02[_0x31a1('0x19')][_0x519812][_0x31a1('0x76')]);delete _0x205e02[_0x31a1('0x19')][_0x519812];}},0x2328);}});}});};Preview[_0x31a1('0x12')][_0x31a1('0x6d')]=function(){var _0x401b13=this;loggerAction['info'](_0x31a1('0x85'),_['size'](this['actions']));for(var _0x111197 in this[_0x31a1('0x19')]){if(_0x401b13['actions']['hasOwnProperty'](_0x111197)){_0x401b13[_0x31a1('0x72')](_0x111197);}}};Preview['prototype'][_0x31a1('0x86')]=function(_0x464e25){var _0x5af81d=this;rpcDb[_0x31a1('0x87')](_0x464e25['id'],ut[_0x31a1('0x88')](this[_0x31a1('0x1a')]))['then'](function(_0x522888){if(!_[_0x31a1('0x73')](_0x522888)){for(var _0x2f749f=0x0;_0x2f749f<_0x522888[_0x31a1('0x89')];_0x2f749f+=0x1){if(ut[_0x31a1('0x8a')](_0x522888[_0x2f749f][_0x31a1('0x8b')])<_0x464e25[_0x31a1('0x8c')]*0x3c){if(_0x522888[_0x2f749f][_0x31a1('0x8d')]&&!_0x522888[_0x2f749f]['Agent'][_0x31a1('0x8e')]){_0x5af81d[_0x31a1('0x8f')](_0x522888[_0x2f749f]['id'])[_0x31a1('0x90')](ut[_0x31a1('0x91')](_0x31a1('0x92')))['catch'](ut[_0x31a1('0x91')](_0x31a1('0x92')));}else{rpcDb['disableContact'](_0x522888[_0x2f749f]['id']);}}else{var _0x17761b=new Action(_0x522888[_0x2f749f],_0x464e25);_0x17761b['starttime']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x464e25[_0x31a1('0x40')]+=0x1;ut['logCustomer'](_0x17761b,0x17,_0x31a1('0x93'));if(_0x464e25[_0x31a1('0x94')]){rpcDb[_0x31a1('0x95')](ut['createBody'](_0x522888[_0x2f749f]));rpcDb[_0x31a1('0x96')](_0x17761b,_0x31a1('0x97'));}else{ut[_0x31a1('0x98')](_0x17761b,0x16,_0x31a1('0x99'));rpcDb[_0x31a1('0x96')](_0x17761b,'[HistoryRecallClose]');rpcDb[_0x31a1('0x9a')](_0x17761b,_0x31a1('0x9b'));}}}}})[_0x31a1('0x7e')](ut['logger2'](_0x31a1('0x9c')));};Preview[_0x31a1('0x12')]['setMessage']=function(_0x5033a0){_0x5033a0[_0x31a1('0x5e')]=!![];if(ut['IsNotLoggedIn'](_0x5033a0[_0x31a1('0x2d')])){_0x5033a0[_0x31a1('0x62')]=_0x31a1('0x9d');}else if(!ut['isActive'](_0x5033a0[_0x31a1('0x6f')])){_0x5033a0[_0x31a1('0x62')]=_0x31a1('0x63');}else if(!this[_0x31a1('0x9e')](_0x5033a0[_0x31a1('0x54')])){if(!this[_0x31a1('0x9e')](_0x5033a0[_0x31a1('0x9f')])){_0x5033a0[_0x31a1('0x62')]=_0x31a1('0xa0');}else{_0x5033a0['message']=_0x31a1('0xa1');}}else{_0x5033a0[_0x31a1('0x62')]=_0x31a1('0xa1');}emitCampaignPreview(_0x5033a0);};Preview['prototype']['callProgressDetectingCustomer']=function(_0x5bb7ba,_0x188921,_0x1b1510){var _0x2a9670=this;var _0x1b2ce1=this[_0x31a1('0x19')][_0x188921];var _0x151592=this[_0x31a1('0x6b')][_0x1b2ce1[_0x31a1('0x76')]];var _0xbb3982;var _0x132b53=![];var _0x4a3490=0x2;var _0x3d2101=0x3;if(_0x151592){switch(_0x1b1510){case'1':_0x151592[_0x31a1('0x3e')]+=0x1;_0x1b2ce1['countnosuchnumberretry']+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut[_0x31a1('0xa3')](_0x1b2ce1);ut['logCustomer'](_0x1b2ce1,0x0,_0x31a1('0xa4'));ami[_0x31a1('0x27')](_0x31a1('0xa5'),ut[_0x31a1('0xa6')](_0x1b2ce1,_0x31a1('0xa7')));rpcDb[_0x31a1('0x96')](_0x1b2ce1,'[callProgressDetectingCustomer][logNoSuch]');_0x2a9670['verifyAdditionalPhones'](_0x1b2ce1,'0',_0x151592)[_0x31a1('0x90')](function(_0x130f34){_0x132b53=_0x130f34[_0x31a1('0xa8')]==0x1;_0x4a3490=_0x151592['dialNoSuchNumberRetryFrequency'];_0x3d2101=_0x151592[_0x31a1('0xa9')];if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0xf,'Global');rpcDb[_0x31a1('0x9a')](_0xbb3982,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{if(_0x1b2ce1['countnosuchnumberretry']>=_0x151592[_0x31a1('0xac')]){rpcDb[_0x31a1('0x9a')](_0x1b2ce1,_0x31a1('0xad'));}else{rpcDb[_0x31a1('0xae')](ut[_0x31a1('0xaf')](_0x1b2ce1,_0x31a1('0xb0'),_0x151592['dialNoSuchNumberRetryFrequency']),_0x1b2ce1[_0x31a1('0xb1')],_0x1b2ce1[_0x31a1('0xb2')]);}}delete this['actions'][_0x5bb7ba[_0x31a1('0xb3')]];}else{_0x1b2ce1[_0x31a1('0xb0')]++;logger[_0x31a1('0x5c')](_0x31a1('0xb4'),_0x1b2ce1['countnosuchnumberretry']);logger[_0x31a1('0x5c')]('id',_0x1b2ce1[_0x31a1('0xb5')]);_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1[_0x31a1('0xb5')],'field':{'countnosuchnumberretry':_0x1b2ce1[_0x31a1('0xb0')]}})[_0x31a1('0x90')](function(){_0x2a9670[_0x31a1('0xb7')](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});break;case _0x31a1('0xb8'):var _0x22152f=moment()[_0x31a1('0x5a')](_0x31a1('0xb9'));_0x1b2ce1[_0x31a1('0xba')]=_0x22152f;_0x1b2ce1[_0x31a1('0xbb')]=_0x22152f;_0x1b2ce1[_0x31a1('0x77')]=!![];_0x151592[_0x31a1('0x60')]+=0x1;logger[_0x31a1('0x5c')]('[syncHangup][talking][increment]',_0x1b2ce1[_0x31a1('0xbc')],_0x31a1('0xbd'),_0x151592['name'],_0x31a1('0xbe'),_0x151592['pTalking']);ami[_0x31a1('0x27')](_0x31a1('0xbf'),ut[_0x31a1('0xa6')](_0x1b2ce1,_0x31a1('0xc0'),this[_0x31a1('0x6b')][_0x1b2ce1[_0x31a1('0x76')]]));if(_0x151592[_0x31a1('0xc1')]){ami['emit'](_0x31a1('0xc2'),ut['buildAcw'](_0x1b2ce1));}break;case'16':ami[_0x31a1('0x27')](_0x31a1('0xc3'),ut[_0x31a1('0xa6')](_0x1b2ce1,'complete',this['campaignsPreview'][_0x1b2ce1['queue']]));emitVoiceQueueChannelRemove(ut[_0x31a1('0xa6')](_0x1b2ce1,'complete'));_0x151592[_0x31a1('0x39')]+=0x1;_0x151592[_0x31a1('0x31')]+=0x1;_0x151592['answered']+=0x1;ut[_0x31a1('0x81')](_0x151592,_0x31a1('0xc4'));_0x1b2ce1[_0x31a1('0xa2')]=ut[_0x31a1('0xa3')](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0x4,_0x31a1('0xc5'));rpcDb[_0x31a1('0x96')](_0x1b2ce1,'[callProgressDetectingCustomer][logAnswer]');rpcDb[_0x31a1('0x9a')](_0x1b2ce1,'[callProgressDetectingCustomer][logAnswerGlobal]');rpcDb[_0x31a1('0xc6')](_0x1b2ce1);_0x151592[_0x31a1('0x2f')]+=_0x1b2ce1[_0x31a1('0xc7')];_0x151592[_0x31a1('0x2e')]+=_0x1b2ce1[_0x31a1('0xc7')];logger[_0x31a1('0x5c')]('[syncHangup][talking][decrement]',_0x1b2ce1[_0x31a1('0xbc')],_0x31a1('0xbd'),_0x151592[_0x31a1('0x55')],_0x31a1('0xbe'),_0x151592[_0x31a1('0x60')]);delete this[_0x31a1('0x19')][_0x5bb7ba[_0x31a1('0xb3')]];break;case _0x31a1('0xc8'):_0x151592['outboundBusyCallsDay']+=0x1;_0x1b2ce1[_0x31a1('0xc9')]+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut[_0x31a1('0xa3')](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0x5,_0x31a1('0xca'));_0x4a3490=_0x151592[_0x31a1('0xcb')];_0x3d2101=_0x151592[_0x31a1('0xa9')];ami[_0x31a1('0x27')]('custom:agentbusy',ut[_0x31a1('0xa6')](_0x1b2ce1,_0x31a1('0xcc')));rpcDb[_0x31a1('0x96')](_0x1b2ce1,_0x31a1('0xcd'));_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'5',_0x151592)[_0x31a1('0x90')](function(_0xc6fb7d){_0x132b53=_0xc6fb7d['additional']==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut['cloneAction'](_0x1b2ce1,0xf,_0x31a1('0xcf'));rpcDb[_0x31a1('0x9a')](_0xbb3982,'[callProgressDetectingCustomer][logBusyGlobal]');}else{if(_0x1b2ce1[_0x31a1('0xc9')]>=_0x151592[_0x31a1('0xd0')]){rpcDb[_0x31a1('0x9a')](_0x1b2ce1,_0x31a1('0xcd'));}else{rpcDb['rescheduleContact'](ut[_0x31a1('0xaf')](_0x1b2ce1,'countbusyretry',_0x151592[_0x31a1('0xcb')]),_0x1b2ce1[_0x31a1('0xb1')],_0x1b2ce1[_0x31a1('0xb2')]);}}}else{_0x1b2ce1[_0x31a1('0xc9')]++;_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1['idContact'],'field':{'countbusyretry':_0x1b2ce1[_0x31a1('0xc9')]}})[_0x31a1('0x90')](function(){_0x2a9670[_0x31a1('0xb7')](_0x1b2ce1,_0x4a3490,_0x3d2101)['then'](function(){});});}});break;case _0x31a1('0xd1'):_0x151592[_0x31a1('0xd2')]+=0x1;_0x1b2ce1[_0x31a1('0xd3')]+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut['totalGlobal'](_0x1b2ce1);ut['logCustomer'](_0x1b2ce1,0x3,_0x31a1('0xd4'));_0x4a3490=_0x151592[_0x31a1('0xd5')];_0x3d2101=_0x151592[_0x31a1('0xa9')];var _0x1dc572=ut['buildNoAnswerEventPayload'](_0x1b2ce1,_0x151592);ami[_0x31a1('0x27')](_0x31a1('0xd6'),_0x1dc572);rpcDb[_0x31a1('0x96')](_0x1b2ce1,_0x31a1('0xd7'));_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'3',_0x151592)[_0x31a1('0x90')](function(_0x1d5a19){_0x132b53=_0x1d5a19[_0x31a1('0xa8')]==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0xf,'Global');rpcDb[_0x31a1('0x9a')](_0xbb3982,_0x31a1('0xd8'));}else{if(_0x1b2ce1['countnoanswerretry']>=_0x151592[_0x31a1('0xd9')]){rpcDb[_0x31a1('0x9a')](_0x1b2ce1,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb[_0x31a1('0xae')](ut[_0x31a1('0xaf')](_0x1b2ce1,'countnoanswerretry',_0x151592[_0x31a1('0xd5')]),_0x1b2ce1[_0x31a1('0xb1')],_0x1b2ce1[_0x31a1('0xb2')]);}}}else{_0x1b2ce1[_0x31a1('0xd3')]++;_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1[_0x31a1('0xb5')],'field':{'countnoanswerretry':_0x1b2ce1[_0x31a1('0xd3')]}})[_0x31a1('0x90')](function(){_0x2a9670[_0x31a1('0xb7')](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});break;case'CONGESTION':_0x151592[_0x31a1('0x3b')]+=0x1;_0x1b2ce1[_0x31a1('0xda')]+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut[_0x31a1('0xa3')](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0x8,_0x31a1('0xdb'));_0x4a3490=_0x151592[_0x31a1('0xdc')];_0x3d2101=_0x151592['callAdditionalPhoneAfterMin'];ami[_0x31a1('0x27')](_0x31a1('0xdd'),ut['buildObj'](_0x1b2ce1,'congestion'));rpcDb[_0x31a1('0x96')](_0x1b2ce1,_0x31a1('0xde'));_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'8',_0x151592)[_0x31a1('0x90')](function(_0x1ca2a8){_0x132b53=_0x1ca2a8['additional']==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0xf,_0x31a1('0xcf'));rpcDb[_0x31a1('0x9a')](_0xbb3982,'[callProgressDetectingCustomer][logCongestionGlobal]');}else{if(_0x1b2ce1[_0x31a1('0xda')]>=_0x151592['dialCongestionMaxRetry']){rpcDb[_0x31a1('0x9a')](_0x1b2ce1,_0x31a1('0xde'));}else{rpcDb[_0x31a1('0xae')](ut['scheduledAt'](_0x1b2ce1,_0x31a1('0xda'),_0x151592[_0x31a1('0xcb')]),_0x1b2ce1[_0x31a1('0xb1')],_0x1b2ce1[_0x31a1('0xb2')]);}}}else{_0x1b2ce1[_0x31a1('0xda')]++;_0x2a9670['incrementPreviewCounters']({'id':_0x1b2ce1['idContact'],'field':{'countcongestionretry':_0x1b2ce1[_0x31a1('0xda')]}})[_0x31a1('0x90')](function(){_0x2a9670[_0x31a1('0xb7')](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});break;case'CANCEL':_0x151592['outboundRejectCallsDay']+=0x1;_0x1b2ce1['countagentrejectretry']+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut['totalGlobal'](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0x14,_0x31a1('0xdf'));_0x4a3490=_0x151592[_0x31a1('0xe0')];_0x3d2101=_0x151592['callAdditionalPhoneAfterMin'];ami[_0x31a1('0x27')]('custom:agentreject',ut['buildObj'](_0x1b2ce1,_0x31a1('0xe1')));rpcDb[_0x31a1('0x96')](_0x1b2ce1,_0x31a1('0xe2'));_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'20',_0x151592)[_0x31a1('0x90')](function(_0x53e899){_0x132b53=_0x53e899['additional']==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0x14,_0x31a1('0xdf'));rpcDb[_0x31a1('0x9a')](_0xbb3982,'[callProgressDetectingCustomer][logAgentReject]');}else{if(_0x1b2ce1[_0x31a1('0xe3')]>=_0x151592[_0x31a1('0xe4')]){rpcDb[_0x31a1('0x9a')](_0x1b2ce1,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb[_0x31a1('0xae')](ut['scheduledAt'](_0x1b2ce1,_0x31a1('0xe3'),_0x151592[_0x31a1('0xe0')]),_0x1b2ce1[_0x31a1('0xb1')],_0x1b2ce1[_0x31a1('0xb2')]);}}}else{_0x1b2ce1[_0x31a1('0xd3')]++;_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1[_0x31a1('0xb5')],'field':{'countnoanswerretry':_0x1b2ce1['countnoanswerretry']}})[_0x31a1('0x90')](function(){_0x2a9670[_0x31a1('0xb7')](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});break;case'ABANDONED':_0x151592['outboundAbandonedCallsDay']+=0x1;_0x1b2ce1[_0x31a1('0xe5')]+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut[_0x31a1('0xa3')](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0xb,_0x31a1('0xe6'));rpcDb[_0x31a1('0x96')](_0x1b2ce1,'[callProgressDetectingCustomer][logAbandoned]');_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'11',_0x151592)['then'](function(_0x2d78c2){_0x132b53=_0x2d78c2[_0x31a1('0xa8')]==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0xf,_0x31a1('0xcf'));rpcDb[_0x31a1('0x9a')](_0xbb3982,_0x31a1('0xe7'));}else{if(_0x1b2ce1['countabandonedetry']>=_0x151592[_0x31a1('0xe8')]){rpcDb[_0x31a1('0x9a')](_0x1b2ce1,_0x31a1('0xe7'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x1b2ce1,_0x31a1('0xe5'),_0x151592[_0x31a1('0xe9')]),_0x1b2ce1[_0x31a1('0xb1')],_0x1b2ce1[_0x31a1('0xb2')]);}}}else{_0x1b2ce1[_0x31a1('0xd3')]++;_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1[_0x31a1('0xb5')],'field':{'countnoanswerretry':_0x1b2ce1[_0x31a1('0xd3')]}})['then'](function(){_0x2a9670['swapAdditionalPhones'](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});break;case'18':_0x151592[_0x31a1('0xea')]+=0x1;_0x1b2ce1[_0x31a1('0xeb')]+=0x1;_0x1b2ce1['countglobal']=ut[_0x31a1('0xa3')](_0x1b2ce1);ut['logCustomer'](_0x1b2ce1,0x12,_0x5bb7ba[_0x31a1('0xec')]||_0x5bb7ba[_0x31a1('0xed')]);ami[_0x31a1('0x27')](_0x31a1('0xee'),ut[_0x31a1('0xa6')](_0x1b2ce1,_0x31a1('0xef')));rpcDb[_0x31a1('0x96')](_0x1b2ce1,'[callProgressDetectingCustomer][hangupInAMD]');_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'18',_0x151592)[_0x31a1('0x90')](function(_0x26147a){_0x132b53=_0x26147a[_0x31a1('0xa8')]==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut['cloneAction'](_0x1b2ce1,0x12,'Global');rpcDb[_0x31a1('0x9a')](_0xbb3982,_0x31a1('0xf0'));}else{rpcDb['createCustomerFinal'](_0x1b2ce1,'[callProgressDetectingCustomer][hangupInAMD]');}}else{_0x1b2ce1[_0x31a1('0xd3')]++;_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1[_0x31a1('0xb5')],'field':{'countnoanswerretry':_0x1b2ce1[_0x31a1('0xd3')]}})[_0x31a1('0x90')](function(){_0x2a9670[_0x31a1('0xb7')](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});delete this[_0x31a1('0x19')][_0x5bb7ba['linkedid']];break;case'19':_0x151592[_0x31a1('0xea')]+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut['totalGlobal'](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0x13,_0x5bb7ba['cause-txt']||_0x5bb7ba[_0x31a1('0xed')]);ami[_0x31a1('0x27')](_0x31a1('0xee'),ut[_0x31a1('0xa6')](_0x1b2ce1,'amd'));rpcDb[_0x31a1('0x96')](_0x1b2ce1,_0x31a1('0xf1'));_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'18',_0x151592)['then'](function(_0x2fbc8f){_0x132b53=_0x2fbc8f['additional']==0x1;if(!_0x132b53){if(ut['totalGlobal'](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0xf,_0x31a1('0xcf'));rpcDb['createCustomerFinal'](_0xbb3982,'[callProgressDetectingCustomer][machine]');}else{rpcDb[_0x31a1('0x9a')](_0x1b2ce1,'[callProgressDetectingCustomer][machine]');}}else{_0x1b2ce1[_0x31a1('0xd3')]++;_0x2a9670[_0x31a1('0xb6')]({'id':_0x1b2ce1[_0x31a1('0xb5')],'field':{'countnoanswerretry':_0x1b2ce1[_0x31a1('0xd3')]}})[_0x31a1('0x90')](function(){_0x2a9670['swapAdditionalPhones'](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});});}});delete this[_0x31a1('0x19')][_0x5bb7ba[_0x31a1('0xb3')]];break;default:if(_0x1b2ce1[_0x31a1('0x77')]){ut[_0x31a1('0x81')](_0x151592,'[default]');ut[_0x31a1('0x82')](_0x31a1('0xf2')+_0x151592[_0x31a1('0x55')],_0x5bb7ba);}_0x151592[_0x31a1('0xea')]+=0x1;_0x1b2ce1[_0x31a1('0xa2')]=ut[_0x31a1('0xa3')](_0x1b2ce1);ut[_0x31a1('0x98')](_0x1b2ce1,0xc,_0x5bb7ba[_0x31a1('0xec')]||_0x5bb7ba[_0x31a1('0xed')]);_0x4a3490=_0x151592[_0x31a1('0xe0')];_0x3d2101=_0x151592['callAdditionalPhoneAfterMin'];rpcDb['createCustomerHistory'](_0x1b2ce1,_0x31a1('0xf3'));_0x2a9670[_0x31a1('0xce')](_0x1b2ce1,'20',_0x151592)[_0x31a1('0x90')](function(_0x309b7d){_0x132b53=_0x309b7d[_0x31a1('0xa8')]==0x1;if(!_0x132b53){if(ut[_0x31a1('0xa3')](_0x1b2ce1)>=_0x151592[_0x31a1('0xaa')]){_0xbb3982=ut[_0x31a1('0xab')](_0x1b2ce1,0xf,_0x31a1('0xcf'));rpcDb[_0x31a1('0x9a')](_0xbb3982,'[callProgressDetectingCustomer][logUnknownGlobal]');}else{rpcDb[_0x31a1('0x9a')](_0x1b2ce1,'[callProgressDetectingCustomer][logUnknownGlobal]');}delete this['actions'][_0x5bb7ba[_0x31a1('0xb3')]];}else{_0x2a9670['swapAdditionalPhones'](_0x1b2ce1,_0x4a3490,_0x3d2101)[_0x31a1('0x90')](function(){});}});}if(!(_0x1b2ce1[_0x31a1('0x77')]&&_0x1b1510==='16')){ut[_0x31a1('0x7f')](_0x151592,_0x31a1('0xf4'));logger[_0x31a1('0x5c')](_0x31a1('0xf5'),_0x1b2ce1['uniqueid'],_0x31a1('0xbd'),_0x151592[_0x31a1('0x55')],_0x31a1('0x75'),_0x151592[_0x31a1('0x5f')]);}if(_0x1b1510!==_0x31a1('0xb8')){delete this['actions'][_0x5bb7ba['linkedid']];delete this[_0x31a1('0x19')][_0x5bb7ba[_0x31a1('0xf6')]];}}};Preview[_0x31a1('0x12')][_0x31a1('0xf7')]=function(_0x17bf11,_0x3b9fc6,_0x243e1f){if(_[_0x31a1('0xf8')](_0x3b9fc6)&&_0x31a1('0xf9')!==typeof _0x3b9fc6){return;}if(_[_0x31a1('0xf8')](_0x243e1f)&&_0x31a1('0xf9')!==typeof _0x243e1f){return;}switch(_0x243e1f[_0x31a1('0xfa')]){case'0':ut[_0x31a1('0xfb')](_0x17bf11,0x0,_0x31a1('0xa4'));rpcDb[_0x31a1('0xfc')](_0x17bf11,_0x31a1('0xfd'));break;case'3':ut[_0x31a1('0xfb')](_0x17bf11,0x3,_0x31a1('0xd4'));rpcDb[_0x31a1('0xfc')](_0x17bf11,_0x31a1('0xfe'));break;case'5':ut[_0x31a1('0xfb')](_0x17bf11,0x5,_0x31a1('0xca'));rpcDb['createAgentHistory'](_0x17bf11,_0x31a1('0xff'));break;case'8':ut[_0x31a1('0xfb')](_0x17bf11,0x8,_0x31a1('0xdb'));rpcDb[_0x31a1('0xfc')](_0x17bf11,_0x31a1('0x100'));break;case'22':ut['logAgent'](_0x17bf11,0x16,'AnswerAGI');rpcDb['createAgentHistory'](_0x17bf11,_0x31a1('0x101'));break;default:ut[_0x31a1('0xfb')](_0x17bf11,0xc,_0x243e1f[_0x31a1('0xfa')]);rpcDb[_0x31a1('0xfc')](_0x17bf11,_0x31a1('0x100'));}ut[_0x31a1('0x7f')](_0x3b9fc6,_0x31a1('0x102'));logger[_0x31a1('0x5c')](_0x31a1('0x103'),_0x17bf11[_0x31a1('0xbc')],_0x31a1('0xbd'),_0x3b9fc6['name'],_0x31a1('0x75'),_0x3b9fc6[_0x31a1('0x5f')]);delete this[_0x31a1('0x19')][_0x17bf11[_0x31a1('0xbc')]];};Preview['prototype'][_0x31a1('0xce')]=function(_0x5f0295,_0x33cef9,_0x3337e1){return Promise['resolve']()[_0x31a1('0x90')](cmHopperAdditionalPhone['verifyAdditionalPhones'](_0x5f0295,_0x33cef9,_0x3337e1))['catch'](logger[_0x31a1('0x5c')](_0x31a1('0x104')));};Preview['prototype'][_0x31a1('0xb7')]=function(_0x278bf9,_0x37b0c2,_0x2a650d){return Promise[_0x31a1('0x105')]()['then'](cmHopperAdditionalPhone[_0x31a1('0xb7')](_0x278bf9,_0x37b0c2,_0x2a650d))[_0x31a1('0x7e')](logger[_0x31a1('0x5c')](_0x31a1('0x106')));};Preview[_0x31a1('0x12')][_0x31a1('0xb6')]=function(_0x187411){return Promise[_0x31a1('0x105')]()[_0x31a1('0x90')](cmHopperAdditionalPhone[_0x31a1('0xb6')](_0x187411))[_0x31a1('0x7e')](logger[_0x31a1('0x5c')](_0x31a1('0x107')));};Preview['prototype'][_0x31a1('0x108')]=function(_0x1a703f,_0x25f5cd,_0x45ef53,_0x2cd1d3,_0x21418b){var _0x1d9db5=this;return new Promise(function(_0x59e7c6,_0x236940){if(_['isNil'](_0x25f5cd)||_[_0x31a1('0x73')](_0x25f5cd[_0x31a1('0x109')])||_[_0x31a1('0x73')](_0x25f5cd[_0x31a1('0x10a')])||_[_0x31a1('0x73')](_0x25f5cd[_0x31a1('0x7a')])){_0x236940(ut[_0x31a1('0x62')]('Contact\x20is\x20undefined',_0x2cd1d3,_0x21418b));return;}var _0x1dcfc3=uuid['v4']();var _0x458f3e=_0x1d9db5[_0x31a1('0x6b')][_0x25f5cd[_0x31a1('0x10b')][_0x31a1('0x55')]];var _0x94bdef=_0x45ef53?_0x1d9db5[_0x31a1('0x1a')][_0x45ef53]['id']:undefined;_0x1d9db5[_0x31a1('0x19')][_0x1dcfc3]=new Action(_0x25f5cd,_0x458f3e,_0x1dcfc3,_0x45ef53,_0x94bdef);var _0x558da1=_0x1d9db5['actions'][_0x1dcfc3];_0x558da1[_0x31a1('0xb1')]=_0x2cd1d3;_0x558da1[_0x31a1('0xb2')]=_0x21418b;_0x558da1[_0x31a1('0x10c')]=_0x45ef53;if(_[_0x31a1('0x10d')](_0x1a703f)){_0x1d9db5[_0x31a1('0x10e')](_0x558da1,_0x458f3e,_0x25f5cd,_0x45ef53)['then'](function(_0x3649b5){logger[_0x31a1('0x5c')](_0x31a1('0x10f'),_0x31a1('0x110')+_0x558da1[_0x31a1('0x76')]+_0x31a1('0x111')+_0x558da1['idContact'],JSON['stringify'](_0x3649b5));ami[_0x31a1('0x27')](_0x31a1('0x112'),ut['buildObj'](_0x558da1,_0x31a1('0x113'),_0x1d9db5[_0x31a1('0x6b')][_0x558da1['queue']]));_0x59e7c6(ut[_0x31a1('0x62')](_0x31a1('0x114')));})[_0x31a1('0x7e')](function(_0x4fd540){ut[_0x31a1('0x64')](_0x31a1('0x115'),_0x4fd540);_0x236940(ut[_0x31a1('0x62')](_0x31a1('0x116'),_0x2cd1d3,_0x21418b));});}else{_0x458f3e[_0x31a1('0x3a')]+=0x1;ut[_0x31a1('0x117')](_0x558da1);rpcDb[_0x31a1('0x118')](_0x558da1,_0x31a1('0x119'));delete _0x1d9db5[_0x31a1('0x19')][_0x1dcfc3];_0x236940(ut[_0x31a1('0x62')](_0x31a1('0x11a'),_0x2cd1d3,_0x21418b));}});};Preview[_0x31a1('0x12')][_0x31a1('0x9e')]=function(_0x9d9db0){return!_[_0x31a1('0x73')](_0x9d9db0)&&!_[_0x31a1('0x73')](_0x9d9db0[_0x31a1('0x55')])&&!_[_0x31a1('0x73')](_0x9d9db0['active'])&&_0x9d9db0[_0x31a1('0x56')]&&!_[_0x31a1('0x73')](this[_0x31a1('0x18')][util['format']('SIP/%s',_0x9d9db0[_0x31a1('0x55')])])&&!_[_0x31a1('0x73')](this[_0x31a1('0x18')][util[_0x31a1('0x5a')](_0x31a1('0x11b'),_0x9d9db0[_0x31a1('0x55')])][_0x31a1('0x7c')])&&(this['trunks'][util['format'](_0x31a1('0x11b'),_0x9d9db0[_0x31a1('0x55')])][_0x31a1('0x7c')]==='reachable'||this[_0x31a1('0x18')][util[_0x31a1('0x5a')]('SIP/%s',_0x9d9db0[_0x31a1('0x55')])]['status']===_0x31a1('0x11c'));};Preview[_0x31a1('0x12')][_0x31a1('0x8f')]=function(_0x579807,_0xf2e43e){var _0x31027a=this;return new Promise(function(_0x2285d8,_0x12a602){_0x31027a[_0x31a1('0x11d')](_0x579807,_0xf2e43e)[_0x31a1('0x90')](function(_0x4b7769){_0x2285d8(_[_0x31a1('0x78')](_0x4b7769,[_0x31a1('0x62')]));})[_0x31a1('0x7e')](function(_0x1e776e){if(_0x1e776e[_0x31a1('0x11e')]){rpcDb[_0x31a1('0x11f')](_0x579807);}if(_0x1e776e[_0x31a1('0x56')]){rpcDb[_0x31a1('0x120')](_0x579807);}_0x12a602(_[_0x31a1('0x78')](_0x1e776e,[_0x31a1('0x62')]));});});};Preview[_0x31a1('0x12')][_0x31a1('0x11d')]=function(_0x3109a5,_0x535a63){var _0x523d6c=this;return new Promise(function(_0x51d20a,_0x384c7e){var _0x3e0027,_0x3028ae;rpcDb[_0x31a1('0x121')](_0x3109a5)[_0x31a1('0x90')](function(_0x8cdb06){if(!_[_0x31a1('0x73')](_0x8cdb06[0x0])){_0x3028ae=_0x8cdb06[0x0][_0x31a1('0x122')]?![]:!![];_0x3e0027=_0x8cdb06[0x0][_0x31a1('0x122')]?!![]:![];_0x3e0027=_0x535a63?!![]:_0x3e0027;}var _0x12f6f1=_0x523d6c[_0x31a1('0x123')](_0x8cdb06);if(_0x12f6f1[_0x31a1('0x124')]){rpcDb[_0x31a1('0x125')](_['pick'](_0x8cdb06[0x0],[_0x31a1('0x7a'),'phone']))[_0x31a1('0x90')](function(_0x50d12c){_0x523d6c[_0x31a1('0x108')](_0x50d12c,_0x8cdb06[0x0],_0x535a63,_0x3028ae,_0x3e0027)[_0x31a1('0x90')](function(_0x2ffa4e){_0x51d20a(_0x2ffa4e);})[_0x31a1('0x7e')](function(_0x133961){_0x384c7e(_0x133961);});})[_0x31a1('0x7e')](function(_0x335f5b){ut['logger'](_0x31a1('0x126'),_0x335f5b);_0x384c7e(ut[_0x31a1('0x62')](_0x31a1('0x127'),_0x3028ae,_0x3e0027));});}else{_0x384c7e(ut[_0x31a1('0x62')](_0x12f6f1[_0x31a1('0x62')],_0x3028ae,_0x3e0027));}})[_0x31a1('0x7e')](function(_0x175523){ut[_0x31a1('0x64')](_0x31a1('0x128'),_0x175523);_0x384c7e(ut[_0x31a1('0x62')](_0x31a1('0x127'),![],!![]));});});};Preview[_0x31a1('0x12')][_0x31a1('0x123')]=function(_0x115001){if(_[_0x31a1('0x73')](_0x115001)||_[_0x31a1('0x10d')](_0x115001)||!_[_0x31a1('0x73')](_0x115001[0x0]['Agent'])&&_['isNil'](_0x115001[0x0][_0x31a1('0x8d')][_0x31a1('0x55')])){ut[_0x31a1('0x64')](_0x31a1('0x129'),_0x115001);return{'isValid':![],'message':_0x31a1('0x12a')};}var _0x21bdf9=this[_0x31a1('0x6b')][_0x115001[0x0][_0x31a1('0x10b')][_0x31a1('0x55')]];_0x21bdf9['message']=_0x31a1('0xa1');if(_[_0x31a1('0x73')](_0x21bdf9)){ut[_0x31a1('0x64')](_0x31a1('0x12b'),_0x21bdf9);return{'isValid':![],'message':_0x31a1('0x12c')};}if(!this['isTrunkReachable'](_0x21bdf9['Trunk'])){ut[_0x31a1('0x64')](_0x31a1('0x12d'),_0x31a1('0x12e')+_0x21bdf9[_0x31a1('0x55')]+_0x31a1('0x12f'));if(!this[_0x31a1('0x9e')](_0x21bdf9[_0x31a1('0x9f')])){ut[_0x31a1('0x64')](_0x31a1('0x12d'),_0x21bdf9['name']+'\x20Trunk\x20Backup\x20is\x20not\x20active');return{'isValid':![],'message':_0x31a1('0x130')};}}if(!ut[_0x31a1('0x131')](_0x21bdf9[_0x31a1('0x6f')])){ut['logger'](_0x31a1('0x132'),_0x21bdf9[_0x31a1('0x55')]+'\x20Not\x20Active');return{'isValid':![],'message':_0x31a1('0x12e')+_0x21bdf9[_0x31a1('0x55')]+_0x31a1('0x133')};}return{'isValid':!![],'message':_0x31a1('0x134')};};Preview[_0x31a1('0x12')][_0x31a1('0x10e')]=function(_0x54e85c,_0x35a899,_0x24db2c,_0x13c63c){var _0x23536d=this;return new Promise(function(_0xee3dc3,_0x12e68c){var _0x4c08d5=_0x54e85c[_0x31a1('0xbc')];var _0xdffc89=_0x23536d['isTrunkReachable'](_0x35a899[_0x31a1('0x54')])?util[_0x31a1('0x5a')](_0x31a1('0x135'),_0x35a899[_0x31a1('0x54')][_0x31a1('0x55')],_[_0x31a1('0x73')](_0x35a899[_0x31a1('0x38')])?'':_0x35a899[_0x31a1('0x38')][_0x31a1('0x136')]()||'',_0x35a899[_0x31a1('0x137')]>0x0?_0x24db2c[_0x31a1('0x10a')][_0x31a1('0x138')](_0x35a899[_0x31a1('0x137')]):_0x24db2c[_0x31a1('0x10a')]):util[_0x31a1('0x5a')](_0x31a1('0x135'),_[_0x31a1('0x73')](_0x35a899[_0x31a1('0x9f')])?_0x35a899[_0x31a1('0x54')][_0x31a1('0x55')]:_0x35a899[_0x31a1('0x9f')][_0x31a1('0x55')],_[_0x31a1('0x73')](_0x35a899[_0x31a1('0x38')])?'':_0x35a899[_0x31a1('0x38')]['trim']()||'',_0x35a899[_0x31a1('0x137')]>0x0?_0x24db2c[_0x31a1('0x10a')]['substring'](_0x35a899[_0x31a1('0x137')]):_0x24db2c['phone']);var _0xb8065e=_0x23536d[_0x31a1('0x9e')](_0x35a899[_0x31a1('0x54')])?ut['getCallerId'](_0x35a899[_0x31a1('0x54')][_0x31a1('0x57')],_0x35a899[_0x31a1('0x35')],_0x35a899[_0x31a1('0x139')]>0x0?ut[_0x31a1('0x13a')](_0x35a899[_0x31a1('0x36')],_0x35a899[_0x31a1('0x139')]):_0x35a899[_0x31a1('0x36')]):ut[_0x31a1('0x13b')](_[_0x31a1('0x73')](_0x35a899['TrunkBackup'])?_0x35a899['Trunk'][_0x31a1('0x57')]:_0x35a899['TrunkBackup'][_0x31a1('0x57')],_0x35a899[_0x31a1('0x35')],_0x35a899[_0x31a1('0x139')]>0x0?ut[_0x31a1('0x13a')](_0x35a899[_0x31a1('0x36')],_0x35a899[_0x31a1('0x139')]):_0x35a899[_0x31a1('0x36')]);if(_0xb8065e){_0x54e85c[_0x31a1('0x13c')]=ut[_0x31a1('0x13d')](_0xb8065e);_0x54e85c[_0x31a1('0x13e')]=ut['extractCalleridNumber'](_0xb8065e);}var _0x38da59=ut[_0x31a1('0x13f')](_0x35a899,_0x24db2c,_0xdffc89,_0xb8065e,_0x4c08d5,_0x54e85c);_[_0x31a1('0x140')](_0x54e85c,ut[_0x31a1('0x141')](_0x38da59));_0x54e85c[_0x31a1('0x142')]=moment()['format'](_0x31a1('0xb9'));_0x35a899[_0x31a1('0x143')]=_0x38da59;ami[_0x31a1('0x144')](ut[_0x31a1('0x145')](_0x54e85c,_0x35a899,_0x38da59,_0x54e85c[_0x31a1('0xb2')],_0x13c63c))[_0x31a1('0x90')](function(_0x30457a){_0x35a899[_0x31a1('0x5f')]+=0x1;logger[_0x31a1('0x5c')](_0x31a1('0x146'),_0x4c08d5,_0x31a1('0xbd'),_0x35a899[_0x31a1('0x55')],_0x31a1('0x75'),_0x35a899['originated']);_0xee3dc3(_0x30457a);})[_0x31a1('0x7e')](function(_0x2c7495){ut[_0x31a1('0xfb')](_0x54e85c,0xe,_0x31a1('0x147'));rpcDb[_0x31a1('0xfc')](_0x54e85c,_0x31a1('0x148'));_0x12e68c(_0x2c7495);});});};Preview[_0x31a1('0x12')][_0x31a1('0x149')]=function(_0x5ac025){if(this['actions'][_0x5ac025[_0x31a1('0xb3')]]){this[_0x31a1('0x19')][_0x5ac025[_0x31a1('0xb3')]][_0x31a1('0x7d')]=_0x5ac025[_0x31a1('0x7d')];}};Preview['prototype'][_0x31a1('0x14a')]=function(_0x49d462){var _0x3fc2bd=this;var _0x434c92=this[_0x31a1('0x19')][_0x49d462[_0x31a1('0x14b')]];if(_0x434c92){if(_0x434c92[_0x31a1('0x10c')]&&this[_0x31a1('0x1a')][_0x434c92['lookAgent']]){ut[_0x31a1('0x14c')](_0x434c92,this['agents'][_0x434c92[_0x31a1('0x10c')]][_0x31a1('0x55')],this['agents'][_0x434c92['lookAgent']]['id']);}var _0x18082c=_[_0x31a1('0x14d')](_0x434c92);_0x18082c[_0x31a1('0xba')]=moment()[_0x31a1('0x5a')](_0x31a1('0xb9'));var _0x24ed2c=_0x3fc2bd['campaignsPreview'][_0x434c92[_0x31a1('0x76')]];if(ut[_0x31a1('0x14e')](_0x49d462[_0x31a1('0x14f')])){if(_0x434c92[_0x31a1('0xb1')]){rpcDb[_0x31a1('0x11f')](_0x434c92[_0x31a1('0xb5')]);}if(_0x434c92[_0x31a1('0xb2')]){rpcDb[_0x31a1('0x120')](_0x434c92[_0x31a1('0xb5')]);}ami[_0x31a1('0x27')](_0x31a1('0x150'),ut['buildObj'](_0x434c92,_0x31a1('0x151'),this['campaignsPreview'][_0x434c92['queue']]));this[_0x31a1('0xf7')](_0x18082c,_0x24ed2c,_0x49d462);}else{_0x434c92['starttime']=moment()[_0x31a1('0x5a')]('YYYY-MM-DD\x20HH:mm:ss');ut[_0x31a1('0xfb')](_0x18082c,0x4,_0x31a1('0xc5'));rpcDb[_0x31a1('0xfc')](_0x18082c,_0x31a1('0x152'));}}};Preview['prototype'][_0x31a1('0x1f')]=function(_0x2f9db8){var _0x5d7e0a=this[_0x31a1('0x19')][_0x2f9db8[_0x31a1('0xb3')]];var _0x5dc37e;if(_0x5d7e0a){_0x5dc37e=this[_0x31a1('0x6b')][_0x5d7e0a[_0x31a1('0x76')]];logger['info']('[syncHangup][talking]',_0x2f9db8[_0x31a1('0xb3')],_0x31a1('0xbd'),_0x5dc37e[_0x31a1('0x55')],_0x31a1('0xbe'),_0x5dc37e[_0x31a1('0x60')]);}if(this[_0x31a1('0x19')][_0x2f9db8[_0x31a1('0xb3')]]&&_0x2f9db8[_0x31a1('0xb3')]!==_0x2f9db8['uniqueid']){if(_0x2f9db8[_0x31a1('0x153')]==='16'&&this[_0x31a1('0x19')][_0x2f9db8[_0x31a1('0xb3')]][_0x31a1('0x77')]){this[_0x31a1('0x154')](_0x2f9db8,_0x2f9db8[_0x31a1('0xb3')],_0x2f9db8[_0x31a1('0x153')]);}else if(this['actions'][_0x2f9db8[_0x31a1('0xb3')]][_0x31a1('0x77')]){logger['info'](_0x31a1('0x155'),_0x2f9db8[_0x31a1('0xb3')],_0x2f9db8['cause'],_0x31a1('0xbd'),_0x5dc37e[_0x31a1('0x55')],'pTalking:\x20',_0x5dc37e[_0x31a1('0x60')]);this[_0x31a1('0x154')](_0x2f9db8,_0x2f9db8[_0x31a1('0xb3')],_0x2f9db8[_0x31a1('0x153')]);}}else if(_0x5d7e0a&&_[_0x31a1('0x73')](_0x5d7e0a[_0x31a1('0x156')])&&_0x5dc37e[_0x31a1('0x157')]&&_0x2f9db8[_0x31a1('0xb3')]===_0x2f9db8[_0x31a1('0xbc')]&&_[_0x31a1('0x73')](_0x2f9db8[_0x31a1('0xfa')])&&_0x2f9db8[_0x31a1('0x153')]==='16'&&_0x2f9db8[_0x31a1('0x158')]==='6'&&_[_0x31a1('0xf8')](_0x5d7e0a[_0x31a1('0x159')])){if(_0x5d7e0a[_0x31a1('0xb1')]){rpcDb[_0x31a1('0x11f')](_0x5d7e0a[_0x31a1('0xb5')]);}if(_0x5d7e0a['activeContact']){rpcDb[_0x31a1('0x120')](_0x5d7e0a[_0x31a1('0xb5')]);}_0x2f9db8[_0x31a1('0xfa')]='22';this[_0x31a1('0xf7')](_0x5d7e0a,_0x5dc37e,_0x2f9db8);}else if(_0x5d7e0a&&_0x5d7e0a['transfer']){if(_0x2f9db8[_0x31a1('0x153')]==='16'&&this[_0x31a1('0x19')][_0x2f9db8[_0x31a1('0xb3')]]['dialAnswer']){logger[_0x31a1('0x5c')](_0x31a1('0x15a'),_0x2f9db8['linkedid'],_0x2f9db8[_0x31a1('0x153')],'\x20Queue',_0x5dc37e['name'],_0x31a1('0xbe'),_0x5dc37e[_0x31a1('0x60')]);this[_0x31a1('0x154')](_0x2f9db8,_0x2f9db8[_0x31a1('0xb3')],_0x2f9db8[_0x31a1('0x153')]);}else if(this['actions'][_0x2f9db8[_0x31a1('0xb3')]][_0x31a1('0x77')]){logger['info'](_0x31a1('0x155'),_0x2f9db8['linkedid'],_0x2f9db8[_0x31a1('0x153')],'\x20Queue',_0x5dc37e[_0x31a1('0x55')],_0x31a1('0xbe'),_0x5dc37e[_0x31a1('0x60')]);this[_0x31a1('0x154')](_0x2f9db8,_0x2f9db8[_0x31a1('0xb3')],_0x2f9db8['cause']);}}};Preview['prototype'][_0x31a1('0x21')]=function(_0x5ba587){if(this[_0x31a1('0x19')][_0x5ba587[_0x31a1('0xf6')]]&&_0x5ba587[_0x31a1('0xf6')]!==_0x5ba587[_0x31a1('0x15b')]){this[_0x31a1('0x154')](_0x5ba587,_0x5ba587[_0x31a1('0xf6')],_0x5ba587[_0x31a1('0xed')]);}};Preview['prototype'][_0x31a1('0x15c')]=function(_0x408cb7){if(this[_0x31a1('0x19')][_0x408cb7['linkedid']]&&_0x408cb7[_0x31a1('0xb3')]!==_0x408cb7[_0x31a1('0xbc')]&&!this[_0x31a1('0x19')][_0x408cb7[_0x31a1('0xb3')]][_0x31a1('0x77')]){if(_0x408cb7[_0x31a1('0x153')]==='1'){this[_0x31a1('0x154')](_0x408cb7,_0x408cb7[_0x31a1('0xb3')],_0x408cb7[_0x31a1('0x153')]);}}};Preview[_0x31a1('0x12')]['addVariable']=function(_0x3b1bb5,_0x2cb060,_0x243d16){if(this[_0x31a1('0x19')][_0x3b1bb5]){if(_[_0x31a1('0x73')](this[_0x31a1('0x19')][_0x3b1bb5][_0x31a1('0x143')])){this[_0x31a1('0x19')][_0x3b1bb5]['variables']={};}this[_0x31a1('0x19')][_0x3b1bb5][_0x31a1('0x143')][_0x2cb060]=_0x243d16;}};Preview[_0x31a1('0x12')][_0x31a1('0x24')]=function(_0x1f239c){try{if(!_[_0x31a1('0x73')](_0x1f239c)){if(ut[_0x31a1('0x15d')](_[_0x31a1('0x15e')](_0x1f239c[_0x31a1('0x15f')])[0x0])){this[_0x31a1('0x160')](_0x1f239c[_0x31a1('0xbc')],_[_0x31a1('0x15e')](_0x1f239c[_0x31a1('0x15f')])[0x0],_0x1f239c['value']);}}}catch(_0x5ca443){logger[_0x31a1('0x161')](_0x31a1('0x162'),util[_0x31a1('0x163')](_0x5ca443,{'showHidden':![],'depth':null}));}};Preview[_0x31a1('0x12')]['syncAttendedTransfer']=function(_0x5100a5){if(_0x5100a5){if(this[_0x31a1('0x19')][_0x5100a5['transfertargetlinkedid']]){this['actions'][_0x5100a5[_0x31a1('0x164')]][_0x31a1('0x159')]=!![];}}};Preview[_0x31a1('0x12')][_0x31a1('0x26')]=function(_0x3e4e4d){if(_0x3e4e4d){if(this['actions'][_0x3e4e4d[_0x31a1('0x165')]]){this[_0x31a1('0x19')][_0x3e4e4d['transfererlinkedid']][_0x31a1('0x159')]=!![];}}};module['exports']=Preview;