Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / api / openchannelInteraction / openchannelInteraction.controller.js
1 'use strict';const a569_0x5a77=['./openchannelInteraction.socket','u.id\x20=\x20ui.UserId','13139IHExdy','all','YYYY-MM-DD\x20HH:mm:ss','System','isEmpty','buildExpression','sequelize','body','u.fullname','mkdirSync','conditions','1mqXrrX','params','register','count','487739EzMnFL','omit','c.lastName','OpenchannelAccountId','zip-dir','direction','sendStatus','users','parse','it.OpenchannelInteractionId\x20=\x20i.id','firstName','field','Contact.lastName','Account.mandatoryDisposition','@rediscache','$gte','emit','Owner','cm_contacts','split','show','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','keys','sort','`unreadMessages`\x20>\x200','start','filter','me.OpenchannelInteractionId\x20=\x20i.id','@components/export/lib/pdf','Owner.internal','i.OpenchannelAccountId\x20IN\x20?','@components/parsers/qs','error','find','filters','@components/parsers/advancedSearch','transcript-','setTags','toString','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','1263292UznLuw','tmp','createdAt','findOne','keyBy','groupBy','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','OpenchannelInteraction','json','findAll','Contact.mobile','280414zEtibr','status','$substring','Tag','@config/logger','download','1THZKmi','role','having','Tags','a.mandatoryDisposition','2yHMWFT','pathExists','\x20IS\x20NULL','squel','limit','UserId','i.OpenchannelAccountId\x20IS\x20NULL','describe','parseSearch','Public','t.id\x20=\x20it.TagId','operator','t.id\x20IN\x20?','gte','i.OpenchannelAccountId\x20IS\x20NOT\x20NULL','2PNWDUC','o.internal','root','lastName','views','rawAttributes','tools_tags','left_join','Users','attributes','query','disposition','2760861WtXEdR','openchannelInteractionTags:save','Account','color','ui.OpenchannelInteractionId\x20IN\x20?','files','c.mobile','then','addTags','out','nolimit','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','createWriteStream','Contact','end','c.email','fullname','undefined','err','intersection','TagIds','rows','pick','openchannel_accounts','update','util','getFullTextValue','a.key','openchannel_interactions','set','closed','select','path','index','o.fullname','union','`\x20>\x200','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','from','removeTags','@config/get-config','Account.key','push','370537XgtXOD','forEach','merge','clone','`unreadMessages`\x20=\x200','getOpenchannelAccounts','resolve','create','.pdf','model','getMessages','name','basename','ContactId','order','fields','a.id\x20=\x20i.OpenchannelAccountId','isNumeric','search','where','User','95SQjQEu','openchannel_messages','replace','Attachment','options','197181PSXRKx','expr','Contact.fax','length','rimraf','SELECT','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','@utils/filter-attributes','unlinkSync','text','@utils/console-logger','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','compact','offset','CmContact','Contact.phone','tag','Content-Range','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','Contact.firstName','includeAll','join','unix','destroy','\x20=\x20?','user','type','existsSync','lodash','renderFile','format','concat','OpenchannelInteractionId','u.id','attachments','pipe','value','Messages','str','c.firstName','agent','stack','catch','unreadMessages','i.id','c.phone','ejs','map','addMessage','OpenchannelMessage','read','ids','get','$lte'];const a569_0x1916=function(_0x27ae5d,_0x1ea6b7){_0x27ae5d=_0x27ae5d-0x1ab;let _0x5a7705=a569_0x5a77[_0x27ae5d];return _0x5a7705;};const a569_0x1e833d=a569_0x1916;(function(_0x51b025,_0x3fda60){const _0x131eb6=a569_0x1916;while(!![]){try{const _0x5e2a13=parseInt(_0x131eb6(0x264))+-parseInt(_0x131eb6(0x1f0))*-parseInt(_0x131eb6(0x22d))+-parseInt(_0x131eb6(0x289))*-parseInt(_0x131eb6(0x23c))+parseInt(_0x131eb6(0x275))*-parseInt(_0x131eb6(0x26f))+-parseInt(_0x131eb6(0x1f5))+-parseInt(_0x131eb6(0x1db))*-parseInt(_0x131eb6(0x27a))+-parseInt(_0x131eb6(0x238))*parseInt(_0x131eb6(0x1b0));if(_0x5e2a13===_0x3fda60)break;else _0x51b025['push'](_0x51b025['shift']());}catch(_0x541f95){_0x51b025['push'](_0x51b025['shift']());}}}(a569_0x5a77,0xf1999));const {createPdfFromHTML}=require(a569_0x1e833d(0x258)),rimraf=require(a569_0x1e833d(0x1f9)),zipdir=require(a569_0x1e833d(0x240)),moment=require('moment'),util=require(a569_0x1e833d(0x1c9)),path=require(a569_0x1e833d(0x1d0)),ejs=require(a569_0x1e833d(0x223)),fs=require('fs-extra'),_=require(a569_0x1e833d(0x211)),squel=require(a569_0x1e833d(0x27d)),{getSocket}=require(a569_0x1e833d(0x24a)),socket=getSocket(),qs=require(a569_0x1e833d(0x25b)),as=require(a569_0x1e833d(0x25f)),logger=require(a569_0x1e833d(0x273))('api'),{getConfig}=require(a569_0x1e833d(0x1d8)),config=getConfig(),{db}=require('@mysqldb'),{Op,QueryTypes}=require('sequelize'),{consoleLogger}=require(a569_0x1e833d(0x1ff)),{filterAttributes}=require(a569_0x1e833d(0x1fc));require(a569_0x1e833d(0x22b))[a569_0x1e833d(0x23a)](socket);function respondWithStatusCode(_0x250eef,_0x1a40e6){return _0x1a40e6=_0x1a40e6||0xcc,function(_0xb8e2d2){const _0x37ae7f=a569_0x1916;if(_0xb8e2d2)return _0x250eef[_0x37ae7f(0x242)](_0x1a40e6);return _0x250eef['status'](_0x1a40e6)['end']();};}function respondWithResult(_0x1feb0b,_0x285a6a){return _0x285a6a=_0x285a6a||0xc8,function(_0x2a91e9){const _0x2f602e=a569_0x1916;if(_0x2a91e9)return _0x1feb0b[_0x2f602e(0x270)](_0x285a6a)['json'](_0x2a91e9);};}function respondWithFilteredResult(_0x2f939a,_0x4c50e5){return function(_0x51ca29){const _0x2cfcfc=a569_0x1916;if(_0x51ca29){const _0x52bbe0=_0x51ca29[_0x2cfcfc(0x23b)],_0x1d1097=_0x4c50e5['offset'];let _0x4789da=_0x4c50e5[_0x2cfcfc(0x202)]+_0x4c50e5[_0x2cfcfc(0x27e)],_0x1d4c25;return _0x4789da>=_0x52bbe0?(_0x4789da=_0x52bbe0,_0x1d4c25=0xc8):_0x1d4c25=0xce,_0x2f939a[_0x2cfcfc(0x270)](_0x1d4c25),_0x2f939a[_0x2cfcfc(0x1cd)](_0x2cfcfc(0x206),_0x1d1097+'-'+_0x4789da+'/'+_0x52bbe0)[_0x2cfcfc(0x26c)](_0x51ca29);}return null;};}function saveUpdates(_0xaf3b7a){return function(_0x500e49){const _0x13545b=a569_0x1916;if(_0x500e49)return _0x500e49['update'](_0xaf3b7a)[_0x13545b(0x1b7)](function(_0x6e1ef8){return _0x6e1ef8;});return null;};}function removeEntity(_0x34cfbe){return function(_0x55410a){const _0x263487=a569_0x1916;if(_0x55410a)return _0x55410a[_0x263487(0x20c)]()[_0x263487(0x1b7)](function(){const _0x352de0=_0x263487;_0x34cfbe['status'](0xcc)[_0x352de0(0x1be)]();});};}function handleEntityNotFound(_0x2319a5){return function(_0x18ab25){const _0x2cdf77=a569_0x1916;return!_0x18ab25&&_0x2319a5[_0x2cdf77(0x242)](0x194),_0x18ab25;};}function handleError(_0xc0c8a3,_0x3be5a6){return _0x3be5a6=_0x3be5a6||0x1f4,function(_0x3bf087){const _0x541c29=a569_0x1916;logger[_0x541c29(0x25c)](_0x3bf087[_0x541c29(0x21e)]),_0x3bf087['name']&&delete _0x3bf087[_0x541c29(0x1e6)],_0xc0c8a3[_0x541c29(0x270)](_0x3be5a6)['send'](_0x3bf087);};}function getInteractionUsers(_0x5ce46f,_0x186df1){return new Promise(function(_0x357b57,_0x25a7e4){const _0x4b07a7=a569_0x1916;try{_0x186df1[_0x5ce46f['id']]&&(_0x5ce46f[_0x4b07a7(0x1ac)]=_['map'](_0x186df1[_0x5ce46f['id']],function(_0x55074d){const _0x410c3a=_0x4b07a7;return{'id':_0x55074d['id'],'fullname':_0x55074d[_0x410c3a(0x1c0)]};}));}catch(_0x4efba2){_0x25a7e4(_0x4efba2);}_0x357b57(_0x5ce46f);});}function getInteractionTags(_0x4c068e,_0x388810){return new Promise(function(_0x1b70c5,_0x18aecb){const _0x2c3a7b=a569_0x1916;try{_0x4c068e['TagIds']&&(_0x4c068e[_0x2c3a7b(0x278)]=[],_0x4c068e[_0x2c3a7b(0x1c4)][_0x2c3a7b(0x24f)](',')[_0x2c3a7b(0x1dc)](function(_0x5d9093){const _0x47cfe9=_0x2c3a7b;_0x4c068e[_0x47cfe9(0x278)][_0x47cfe9(0x1da)](_0x388810[_0x5d9093]);})),delete _0x4c068e[_0x2c3a7b(0x1c4)];}catch(_0x2207ab){_0x18aecb(_0x2207ab);}_0x1b70c5(_0x4c068e);});}function updateOpenchannelInteraction(_0x38d4a9,_0x524846,_0x4d5270){return new Promise(function(_0x30d860,_0x75a115){const _0x3bf2cc=a569_0x1916;return getInteractionUsers(_0x38d4a9,_0x4d5270)[_0x3bf2cc(0x1b7)](function(_0x407ade){return getInteractionTags(_0x407ade,_0x524846);})[_0x3bf2cc(0x1b7)](function(_0x2bb970){_0x30d860(_0x2bb970);})[_0x3bf2cc(0x21f)](function(_0x27fbb4){_0x75a115(_0x27fbb4);});});}exports[a569_0x1e833d(0x1d1)]=function(_0x1f8144,_0x26800f){const _0x56970f=a569_0x1e833d,_0x2f2736={},_0x5d9d8c={},_0x4509d5={'count':0x0,'rows':[]},_0x45ee90=_['map'](db[_0x56970f(0x26b)][_0x56970f(0x28e)],function(_0x1305f5){const _0x2257fa=_0x56970f;return{'name':_0x1305f5['fieldName'],'type':_0x1305f5[_0x2257fa(0x20f)]['key']};});_0x5d9d8c[_0x56970f(0x1e4)]=_[_0x56970f(0x224)](_0x45ee90,'name'),_0x5d9d8c[_0x56970f(0x1ae)]=_[_0x56970f(0x252)](_0x1f8144[_0x56970f(0x1ae)]),_0x5d9d8c[_0x56970f(0x25e)]=_['intersection'](_0x5d9d8c[_0x56970f(0x1e4)],_0x5d9d8c['query']),_0x2f2736['attributes']=_[_0x56970f(0x1c3)](_0x5d9d8c['model'],qs['fields'](_0x1f8144['query'][_0x56970f(0x1ea)])),_0x2f2736[_0x56970f(0x1ad)]=_0x2f2736[_0x56970f(0x1ad)][_0x56970f(0x1f8)]?_0x2f2736[_0x56970f(0x1ad)]:_0x5d9d8c[_0x56970f(0x1e4)];typeof _0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x1ba)]==='undefined'&&(_0x2f2736['limit']=qs[_0x56970f(0x27e)](_0x1f8144[_0x56970f(0x1ae)]['limit']),_0x2f2736['offset']=qs[_0x56970f(0x202)](_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x202)]));_0x2f2736[_0x56970f(0x1e9)]=qs[_0x56970f(0x253)](_0x1f8144[_0x56970f(0x1ae)]['sort']),_0x2f2736[_0x56970f(0x1ee)]=qs['filters'](_['pick'](_0x1f8144[_0x56970f(0x1ae)],_0x5d9d8c[_0x56970f(0x25e)]),_0x45ee90);let _0x54dae4=[];const _0x4837ad=squel[_0x56970f(0x1cf)]()['field']('id')[_0x56970f(0x247)](_0x56970f(0x1e6))[_0x56970f(0x247)](_0x56970f(0x1b3))[_0x56970f(0x1d6)](_0x56970f(0x28f)),_0x21ecc6=squel[_0x56970f(0x1cf)]()[_0x56970f(0x247)](_0x56970f(0x216))[_0x56970f(0x247)](_0x56970f(0x235))['field']('ui.OpenchannelInteractionId')['from']('user_has_openchannel_interactions','ui')[_0x56970f(0x1ab)](_0x56970f(0x243),'u',_0x56970f(0x22c)),_0x2fedec=squel[_0x56970f(0x1cf)]()['from'](_0x56970f(0x1cc),'i')[_0x56970f(0x1ab)](_0x56970f(0x24e),'c',_0x56970f(0x26a))[_0x56970f(0x1ab)](_0x56970f(0x243),'o','o.id\x20=\x20i.UserId')[_0x56970f(0x1ab)](_0x56970f(0x1c7),'a',_0x56970f(0x1eb))[_0x56970f(0x1ab)](_0x56970f(0x1f1),'me',_0x56970f(0x257))['left_join']('openchannel_interaction_has_tags','it',_0x56970f(0x245))[_0x56970f(0x1ab)]('tools_tags','t',_0x56970f(0x284)),_0x67e0b1=squel['expr']();let _0x491d1c=[];const _0x4a8276=squel[_0x56970f(0x1f6)]();let _0x43d363;if(_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x1ed)]){_0x43d363=as[_0x56970f(0x282)](_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x1ed)]);const _0x3a40f7=_0x43d363['sqlOperator'];for(let _0x26eb57=0x0;_0x26eb57<_0x43d363[_0x56970f(0x237)][_0x56970f(0x1f8)];_0x26eb57++){const _0x45f7cc=_0x43d363[_0x56970f(0x237)][_0x26eb57],_0x12f121='i';let _0x5cc712,_0x2cd16c=null,_0x199e11=_['find'](_0x45ee90,[_0x56970f(0x1e6),_0x45f7cc[_0x56970f(0x247)]]);if(!_0x199e11)switch(_0x45f7cc[_0x56970f(0x247)]){case'unreadMessages':Number(_0x45f7cc['value'])===0x1?_0x2fedec[_0x56970f(0x277)]('`'+_0x45f7cc[_0x56970f(0x247)]+'`\x20=\x200'):_0x2fedec[_0x56970f(0x277)]('`'+_0x45f7cc[_0x56970f(0x247)]+_0x56970f(0x1d4));break;case _0x56970f(0x1bd):if(_0x45f7cc[_0x56970f(0x285)]===_0x56970f(0x271)){if(_0x45f7cc[_0x56970f(0x219)][_0x56970f(0x24f)]('\x20')[_0x56970f(0x1f8)]>0x1)_0x2cd16c=squel[_0x56970f(0x21b)](_0x56970f(0x263),qs['getFullTextValue'](_0x45f7cc[_0x56970f(0x219)]),null);else{const _0x5820a1='%'+_0x45f7cc[_0x56970f(0x219)]+'%';_0x2cd16c=squel[_0x56970f(0x21b)]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x5820a1,_0x5820a1,_0x5820a1);}}else _0x199e11=_[_0x56970f(0x25d)](_0x45ee90,[_0x56970f(0x1e6),_0x56970f(0x1e8)]),_0x45f7cc[_0x56970f(0x247)]=_0x56970f(0x1e8),_0x5cc712=as[_0x56970f(0x232)](_0x12f121,_0x199e11[_0x56970f(0x20f)],_0x45f7cc),_0x2cd16c=squel[_0x56970f(0x21b)](_0x5cc712[_0x56970f(0x1fe)],_0x5cc712['value']['start'],_0x5cc712['value'][_0x56970f(0x1be)]);break;case _0x56970f(0x272):{const _0x53ec71=_0x45f7cc[_0x56970f(0x219)][_0x56970f(0x24f)](',')[_0x56970f(0x224)](function(_0x534de8){return Number(_0x534de8);});_0x53ec71[_0x56970f(0x1dc)](function(_0x1ae428){const _0x339628=_0x56970f;_0x4a8276['or'](squel[_0x339628(0x21b)](_0x339628(0x1d5),'%,'+_0x1ae428+',%'));}),_0x491d1c=_[_0x56970f(0x1d3)](_0x491d1c,_0x53ec71);}break;case'User':_0x45f7cc[_0x56970f(0x285)]===_0x56970f(0x271)?_0x2cd16c=squel[_0x56970f(0x21b)](_0x56970f(0x251),'%'+_0x45f7cc[_0x56970f(0x219)]+'%',null):(_0x199e11=_[_0x56970f(0x25d)](_0x45ee90,[_0x56970f(0x1e6),_0x56970f(0x27f)]),_0x45f7cc[_0x56970f(0x247)]=_0x56970f(0x27f),_0x5cc712=as[_0x56970f(0x232)](_0x12f121,_0x199e11[_0x56970f(0x20f)],_0x45f7cc),_0x2cd16c=squel['str'](_0x5cc712[_0x56970f(0x1fe)],_0x5cc712['value'][_0x56970f(0x255)],_0x5cc712['value'][_0x56970f(0x1be)]));break;case'body':_0x5cc712=as[_0x56970f(0x232)]('me',null,_0x45f7cc),_0x2cd16c=squel['str'](_0x5cc712['text'],_0x5cc712[_0x56970f(0x219)][_0x56970f(0x255)],_0x5cc712[_0x56970f(0x219)][_0x56970f(0x1be)]);break;}else _0x5cc712=as[_0x56970f(0x232)](_0x12f121,_0x199e11['type'],_0x45f7cc),_0x2cd16c=squel[_0x56970f(0x21b)](_0x5cc712[_0x56970f(0x1fe)],_0x5cc712[_0x56970f(0x219)]['start'],_0x5cc712['value'][_0x56970f(0x1be)]);_0x2cd16c&&_0x67e0b1[_0x3a40f7](_0x2cd16c);}}else{const _0x21c661=_(_0x1f8144[_0x56970f(0x1ae)])[_0x56970f(0x252)]()[_0x56970f(0x224)](function(_0x55bd46){const _0x330072=_0x56970f;return _['some'](_0x45ee90,[_0x330072(0x1e6),_0x55bd46])?_0x55bd46:undefined;})[_0x56970f(0x201)]()['value']();!_[_0x56970f(0x231)](_0x21c661)&&_0x21c661[_0x56970f(0x1dc)](function(_0x5efa6f){const _0x3e9654=_0x56970f;if(_0x5efa6f===_0x3e9654(0x23f))_0x2fedec[_0x3e9654(0x1ee)]('i.OpenchannelAccountId\x20IN\x20?',[][_0x3e9654(0x214)](_0x1f8144[_0x3e9654(0x1ae)][_0x5efa6f]));else{if(_0x5efa6f===_0x3e9654(0x266)){const _0x21b561=JSON[_0x3e9654(0x244)](_0x1f8144[_0x3e9654(0x1ae)][_0x5efa6f])[_0x3e9654(0x24b)],_0x2418d9=JSON[_0x3e9654(0x244)](_0x1f8144[_0x3e9654(0x1ae)][_0x5efa6f])[_0x3e9654(0x22a)];_0x2fedec['where'](_0x3e9654(0x1fb),_0x21b561,_0x2418d9);}else _0x1f8144[_0x3e9654(0x1ae)][_0x5efa6f]==='null'?_0x2fedec[_0x3e9654(0x1ee)]('i.'+_0x5efa6f+_0x3e9654(0x27c)):_0x2fedec['where']('i.'+_0x5efa6f+_0x3e9654(0x20d),_0x1f8144['query'][_0x5efa6f]);}});_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x227)]&&(_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x227)]===0x1?_0x2fedec[_0x56970f(0x277)](_0x56970f(0x1df)):_0x2fedec['having'](_0x56970f(0x254)));_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x205)]&&(_0x491d1c=_['isArray'](_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x205)])?_0x1f8144['query'][_0x56970f(0x205)]:new Array(_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x205)]),_0x491d1c[_0x56970f(0x1dc)](function(_0x5f1257){const _0x30ff6b=_0x56970f;_0x4a8276['or'](squel[_0x30ff6b(0x21b)](_0x30ff6b(0x1d5),'%,'+_0x5f1257+',%'));}));if(_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x256)]){const _0x499699=_0x1f8144[_0x56970f(0x1ae)][_0x56970f(0x256)]['replace']('\x5c','\x5c\x5c')[_0x56970f(0x1f2)](/'/g,'\x27\x27');qs[_0x56970f(0x1ec)](_0x499699)?_0x67e0b1['or'](squel[_0x56970f(0x21b)]('i.id\x20LIKE\x20?',_0x499699+'%')):_0x67e0b1['or'](squel[_0x56970f(0x21b)](_0x56970f(0x207),qs[_0x56970f(0x1ca)](_0x499699)))['or'](squel[_0x56970f(0x21b)]('i.from\x20LIKE\x20?',_0x499699+'%'))['or'](squel[_0x56970f(0x21b)](_0x56970f(0x1bb),_0x499699+'%'));}}_0x2fedec[_0x56970f(0x1ee)](_0x67e0b1),_0x2fedec['group'](_0x56970f(0x221));let _0x2d06f3={'type':QueryTypes[_0x56970f(0x1fa)],'raw':!![]};const _0x4ecdd4=_0x2fedec[_0x56970f(0x1de)]();return _0x4ecdd4[_0x56970f(0x247)]('i.id'),_0x4ecdd4[_0x56970f(0x247)](_0x56970f(0x200),'unreadMessages'),_0x2f2736[_0x56970f(0x1e9)]&&_0x2f2736[_0x56970f(0x1e9)]['forEach'](function(_0x4e6827){const _0xe89069=_0x56970f,_0x20a164=_0x4e6827[0x0]==='contactName'?_0x4e6827[0x0]:'i.'+_0x4e6827[0x0];_0x2fedec[_0xe89069(0x1e9)](_0x20a164,_0x4e6827[0x1]==='DESC'?![]:!![]);}),!_[_0x56970f(0x231)](_0x491d1c)&&(_0x2fedec[_0x56970f(0x277)](_0x4a8276),_0x4ecdd4['where'](_0x56970f(0x286),_0x491d1c)),Promise[_0x56970f(0x1e1)]()[_0x56970f(0x1b7)](function(){const _0x1071be=_0x56970f;if(!_0x43d363){if(_0x1f8144['query']['OpenchannelAccountId'])return;_0x4ecdd4[_0x1071be(0x1ee)](_0x1071be(0x288)),_0x2fedec['where'](_0x1071be(0x288));return;}if(_0x1f8144[_0x1071be(0x20e)][_0x1071be(0x276)]!==_0x1071be(0x21d))return;return _0x1f8144[_0x1071be(0x20e)][_0x1071be(0x1e0)]({'attributes':['id'],'raw':!![]})[_0x1071be(0x1b7)](function(_0x1f59d6){const _0x4346df=_0x1071be;_[_0x4346df(0x231)](_0x1f59d6)?(_0x4ecdd4[_0x4346df(0x1ee)](_0x4346df(0x280)),_0x2fedec['where'](_0x4346df(0x280))):(_0x4ecdd4[_0x4346df(0x1ee)]('i.OpenchannelAccountId\x20IN\x20?',_[_0x4346df(0x224)](_0x1f59d6,'id')),_0x2fedec[_0x4346df(0x1ee)](_0x4346df(0x25a),_[_0x4346df(0x224)](_0x1f59d6,'id')));});})[_0x56970f(0x1b7)](function(){const _0x256f6f=_0x56970f;if(_0x1f8144['user']['role']==='agent'&&!_0x43d363&&!_0x1f8144['query'][_0x256f6f(0x23f)])return[];return db['sequelize'][_0x256f6f(0x1ae)](_0x4ecdd4[_0x256f6f(0x262)](),_0x2d06f3);})[_0x56970f(0x1b7)](function(_0x18947b){const _0x20034c=_0x56970f;_0x4509d5[_0x20034c(0x23b)]=_0x18947b[_0x20034c(0x1f8)];if(_0x4509d5['count']===0x0)return[];return db[_0x20034c(0x233)][_0x20034c(0x1ae)](_0x4837ad['toString'](),_0x2d06f3)[_0x20034c(0x1b7)](function(_0x207705){const _0x2a34d6=_0x20034c;_0x54dae4=_[_0x2a34d6(0x268)](_0x207705,'id'),_0x2d06f3=_['merge'](_0x2d06f3,{'model':db['OpenchannelInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});_0x1f8144[_0x2a34d6(0x1ae)][_0x2a34d6(0x1ea)]?_0x2f2736[_0x2a34d6(0x1ad)][_0x2a34d6(0x1dc)](function(_0x5390f3){const _0x58eb24=_0x2a34d6;_0x2fedec[_0x58eb24(0x247)]('i.'+_0x5390f3);}):(_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x200),_0x2a34d6(0x220)),_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x1cb),_0x2a34d6(0x1d9)),_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x279),_0x2a34d6(0x249)),_0x2fedec[_0x2a34d6(0x247)]('CASE\x20WHEN\x20i.from\x20IS\x20NOT\x20NULL\x20AND\x20i.from\x20<>\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName'),_0x2fedec[_0x2a34d6(0x247)]('i.*'),_0x2fedec['field'](_0x2a34d6(0x21c),_0x2a34d6(0x208)),_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x23e),_0x2a34d6(0x248)),_0x2fedec['field'](_0x2a34d6(0x1bf),'Contact.email'),_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x222),_0x2a34d6(0x204)),_0x2fedec['field'](_0x2a34d6(0x1b6),_0x2a34d6(0x26e)),_0x2fedec['field']('c.fax',_0x2a34d6(0x1f7)),_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x1d2),'Owner.fullname'),_0x2fedec[_0x2a34d6(0x247)](_0x2a34d6(0x28a),_0x2a34d6(0x259)),_0x2fedec[_0x2a34d6(0x247)]('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds'));if(_0x2f2736[_0x2a34d6(0x27e)])_0x2fedec[_0x2a34d6(0x27e)](_0x2f2736[_0x2a34d6(0x27e)]);if(_0x2f2736[_0x2a34d6(0x202)])_0x2fedec[_0x2a34d6(0x202)](_0x2f2736['offset']);return db[_0x2a34d6(0x233)][_0x2a34d6(0x1ae)](_0x2fedec[_0x2a34d6(0x262)](),_0x2d06f3);})[_0x20034c(0x1b7)](function(_0x3fcbab){const _0x593e6f=_0x20034c;return _0x21ecc6[_0x593e6f(0x1ee)](_0x593e6f(0x1b4),_['map'](_0x3fcbab,'id')),db[_0x593e6f(0x233)][_0x593e6f(0x1ae)](_0x21ecc6['toString'](),_0x2d06f3)['then'](function(_0x4179e4){const _0x48e766=_0x593e6f,_0x12b1f6=_[_0x48e766(0x269)](_0x4179e4,'OpenchannelInteractionId'),_0xc22918=[];return _0x3fcbab[_0x48e766(0x1dc)](function(_0x335697){_0xc22918['push'](updateOpenchannelInteraction(_0x335697,_0x54dae4,_0x12b1f6));}),Promise[_0x48e766(0x22e)](_0xc22918);});});})[_0x56970f(0x1b7)](function(_0x59f860){return _0x4509d5['rows']=_0x59f860,_0x4509d5;})[_0x56970f(0x1b7)](respondWithFilteredResult(_0x26800f,_0x2f2736))[_0x56970f(0x21f)](handleError(_0x26800f,null));},exports[a569_0x1e833d(0x250)]=function(_0x22e1b4,_0x13dcb5){const _0x3081d6=a569_0x1e833d,_0x532169={};_0x22e1b4[_0x3081d6(0x1ae)][_0x3081d6(0x20f)]&&_0x22e1b4['query'][_0x3081d6(0x20f)]==='from'?_0x532169[_0x3081d6(0x1d6)]=_0x22e1b4['params']['id']:_0x532169['id']=_0x22e1b4[_0x3081d6(0x239)]['id'];let _0x13f82b={'raw':![],'where':_0x532169};const _0x35c2b4={};return _0x35c2b4['model']=_['keys'](db['OpenchannelInteraction']['rawAttributes']),_0x35c2b4[_0x3081d6(0x1ae)]=_[_0x3081d6(0x252)](_0x22e1b4[_0x3081d6(0x1ae)]),_0x35c2b4[_0x3081d6(0x25e)]=_[_0x3081d6(0x1c3)](_0x35c2b4[_0x3081d6(0x1e4)],_0x35c2b4['query']),_0x13f82b[_0x3081d6(0x1ad)]=_[_0x3081d6(0x1c3)](_0x35c2b4[_0x3081d6(0x1e4)],qs[_0x3081d6(0x1ea)](_0x22e1b4[_0x3081d6(0x1ae)][_0x3081d6(0x1ea)])),_0x13f82b[_0x3081d6(0x1ad)]=_0x13f82b[_0x3081d6(0x1ad)][_0x3081d6(0x1f8)]?_0x13f82b['attributes']:_0x35c2b4[_0x3081d6(0x1e4)],_0x22e1b4['query'][_0x3081d6(0x209)]&&(_0x13f82b['include']=[{'all':!![]}]),_0x13f82b=_[_0x3081d6(0x1dd)]({},_0x13f82b,_0x22e1b4[_0x3081d6(0x1f4)]),db[_0x3081d6(0x26b)]['findOne'](_0x13f82b)[_0x3081d6(0x1b7)](handleEntityNotFound(_0x13dcb5,null))['then'](respondWithResult(_0x13dcb5,null))[_0x3081d6(0x21f)](handleError(_0x13dcb5,null));},exports['create']=function(_0x371d65,_0x385175){const _0x26f375=a569_0x1e833d;return db['OpenchannelInteraction'][_0x26f375(0x1e2)](_0x371d65[_0x26f375(0x234)],{})[_0x26f375(0x1b7)](respondWithResult(_0x385175,0xc9))[_0x26f375(0x21f)](handleError(_0x385175,null));},exports[a569_0x1e833d(0x1c8)]=function(_0x2c4db5,_0x2ce5da){const _0x2f1556=a569_0x1e833d;return _0x2c4db5[_0x2f1556(0x234)]['id']&&delete _0x2c4db5[_0x2f1556(0x234)]['id'],db[_0x2f1556(0x26b)][_0x2f1556(0x267)]({'where':{'id':_0x2c4db5['params']['id']}})['then'](handleEntityNotFound(_0x2ce5da,null))[_0x2f1556(0x1b7)](saveUpdates(_0x2c4db5[_0x2f1556(0x234)],null))[_0x2f1556(0x1b7)](respondWithResult(_0x2ce5da,null))[_0x2f1556(0x21f)](handleError(_0x2ce5da,null));},exports[a569_0x1e833d(0x20c)]=function(_0x2db68e,_0x312068){const _0x46ca9f=a569_0x1e833d;return db[_0x46ca9f(0x26b)][_0x46ca9f(0x267)]({'where':{'id':_0x2db68e['params']['id']}})[_0x46ca9f(0x1b7)](handleEntityNotFound(_0x312068,null))[_0x46ca9f(0x1b7)](removeEntity(_0x312068,null))[_0x46ca9f(0x21f)](handleError(_0x312068,null));},exports['describe']=function(_0x5f0461,_0x16353e){const _0x4fd1ae=a569_0x1e833d;return db['OpenchannelInteraction'][_0x4fd1ae(0x281)]()[_0x4fd1ae(0x1b7)](respondWithResult(_0x16353e,null))[_0x4fd1ae(0x21f)](handleError(_0x16353e,null));},exports[a569_0x1e833d(0x225)]=function(_0x21d520,_0x39034f){const _0x72b79a=a569_0x1e833d;return db[_0x72b79a(0x226)][_0x72b79a(0x267)]({'where':{'id':_0x21d520[_0x72b79a(0x239)]['id']}})[_0x72b79a(0x1b7)](function(_0x319219){const _0x5a733a=_0x72b79a;if(_0x319219)return _0x319219[_0x5a733a(0x225)](_0x21d520[_0x5a733a(0x234)]['ids'],{'through':_[_0x5a733a(0x23d)](_0x21d520['body'],[_0x5a733a(0x228),'id'])});})['then'](respondWithResult(_0x39034f,null))['catch'](handleError(_0x39034f,null));},exports[a569_0x1e833d(0x1e5)]=function(_0x4f6321,_0x2d06b5){const _0x1e8cde=a569_0x1e833d;let _0x86f8b8={'raw':![],'where':{}};const _0x5b331d={},_0x174a9f={'count':0x0,'rows':[]};return db[_0x1e8cde(0x26b)][_0x1e8cde(0x267)]({'where':{'id':_0x4f6321[_0x1e8cde(0x239)]['id']}})['then'](handleEntityNotFound(_0x2d06b5,null))[_0x1e8cde(0x1b7)](function(_0x5e9557){const _0x16e940=_0x1e8cde;if(_0x5e9557){_0x5b331d[_0x16e940(0x1e4)]=_[_0x16e940(0x252)](db[_0x16e940(0x226)][_0x16e940(0x28e)]),_0x5b331d[_0x16e940(0x1ae)]=_[_0x16e940(0x252)](_0x4f6321['query']),_0x5b331d[_0x16e940(0x25e)]=_[_0x16e940(0x1c3)](_0x5b331d[_0x16e940(0x1e4)],_0x5b331d[_0x16e940(0x1ae)]),_0x86f8b8['attributes']=_[_0x16e940(0x1c3)](_0x5b331d[_0x16e940(0x1e4)],qs[_0x16e940(0x1ea)](_0x4f6321[_0x16e940(0x1ae)][_0x16e940(0x1ea)])),_0x86f8b8[_0x16e940(0x1ad)]=_0x86f8b8['attributes'][_0x16e940(0x1f8)]?_0x86f8b8[_0x16e940(0x1ad)]:_0x5b331d['model'];typeof _0x4f6321[_0x16e940(0x1ae)]['nolimit']===_0x16e940(0x1c1)&&(_0x86f8b8[_0x16e940(0x27e)]=qs[_0x16e940(0x27e)](_0x4f6321[_0x16e940(0x1ae)]['limit']),_0x86f8b8['offset']=qs[_0x16e940(0x202)](_0x4f6321[_0x16e940(0x1ae)]['offset']));_0x86f8b8[_0x16e940(0x1e9)]=qs[_0x16e940(0x253)](_0x4f6321[_0x16e940(0x1ae)][_0x16e940(0x253)]),_0x86f8b8['where']=qs[_0x16e940(0x25e)](_[_0x16e940(0x1c6)](_0x4f6321[_0x16e940(0x1ae)],_0x5b331d[_0x16e940(0x25e)])),_0x86f8b8[_0x16e940(0x1ee)][_0x16e940(0x215)]=_0x5e9557['id'];_0x4f6321[_0x16e940(0x1ae)][_0x16e940(0x256)]&&(_0x86f8b8=filterAttributes(_0x86f8b8,_0x4f6321[_0x16e940(0x1ae)][_0x16e940(0x256)],_0x86f8b8[_0x16e940(0x1ad)],_0x4f6321[_0x16e940(0x1f4)],![]));if(_0x4f6321[_0x16e940(0x1ae)][_0x16e940(0x24b)]){const _0x239731=_0x4f6321[_0x16e940(0x1ae)][_0x16e940(0x24b)][_0x16e940(0x24f)](','),_0x368f4f={};_0x368f4f[_0x239731[0x0]]={[Op[_0x16e940(0x287)]]:moment(_0x239731[0x1])[_0x16e940(0x213)]('YYYY-MM-DD\x20HH:mm:ss')},_0x86f8b8[_0x16e940(0x1ee)]={..._0x86f8b8['where'],..._0x368f4f};}return _0x86f8b8={..._0x86f8b8,..._0x4f6321['options']},db['OpenchannelMessage'][_0x16e940(0x23b)]({'where':_0x86f8b8['where']})[_0x16e940(0x1b7)](function(_0x1034db){const _0x46c165=_0x16e940;return _0x174a9f[_0x46c165(0x23b)]=_0x1034db,_0x4f6321[_0x46c165(0x1ae)][_0x46c165(0x209)]&&(_0x86f8b8['include']=[{'all':!![]}]),db['OpenchannelMessage'][_0x46c165(0x26d)](_0x86f8b8);})[_0x16e940(0x1b7)](function(_0x3ef4aa){const _0xe73ad7=_0x16e940;return _0x174a9f[_0xe73ad7(0x1c5)]=_0x3ef4aa,_0x174a9f;});}})[_0x1e8cde(0x1b7)](respondWithFilteredResult(_0x2d06b5,_0x86f8b8))[_0x1e8cde(0x21f)](handleError(_0x2d06b5,null));},exports[a569_0x1e833d(0x1b8)]=function(_0x415fda,_0x5c0b5b){const _0x479707=a569_0x1e833d;return db[_0x479707(0x26b)][_0x479707(0x267)]({'where':{'id':_0x415fda[_0x479707(0x239)]['id']}})['then'](function(_0x442da5){const _0x5b4d33=_0x479707;if(_0x442da5)return _0x442da5[_0x5b4d33(0x261)](_0x415fda[_0x5b4d33(0x234)][_0x5b4d33(0x228)],{'through':_[_0x5b4d33(0x23d)](_0x415fda['body'],[_0x5b4d33(0x228),'id'])})['then'](function(){const _0x50e161=_0x5b4d33;return db[_0x50e161(0x272)][_0x50e161(0x26d)]({'attributes':['id','name','color'],'where':{'id':_0x415fda[_0x50e161(0x234)]['ids']}});})['then'](function(_0x4559ad){const _0x3d1957=_0x5b4d33;return socket[_0x3d1957(0x24c)](_0x3d1957(0x1b1),{'id':Number(_0x415fda[_0x3d1957(0x239)]['id']),'tags':_0x4559ad||[]}),{'id':Number(_0x415fda[_0x3d1957(0x239)]['id']),'tags':_0x4559ad||[]};});})[_0x479707(0x1b7)](respondWithResult(_0x5c0b5b,null))[_0x479707(0x21f)](handleError(_0x5c0b5b,null));},exports[a569_0x1e833d(0x1d7)]=function(_0x548dd0,_0xb3dc81){const _0x3845d5=a569_0x1e833d;return db[_0x3845d5(0x26b)][_0x3845d5(0x267)]({'where':{'id':_0x548dd0[_0x3845d5(0x239)]['id']}})[_0x3845d5(0x1b7)](handleEntityNotFound(_0xb3dc81,null))[_0x3845d5(0x1b7)](function(_0x468c7f){const _0x4a7c81=_0x3845d5;if(_0x468c7f)return _0x468c7f['removeTags'](_0x548dd0['query'][_0x4a7c81(0x228)]);})[_0x3845d5(0x1b7)](respondWithStatusCode(_0xb3dc81,null))[_0x3845d5(0x21f)](handleError(_0xb3dc81,null));},exports[a569_0x1e833d(0x274)]=function(_0x189d20,_0x339fea){const _0x137d4e=a569_0x1e833d,_0x18df62=moment()[_0x137d4e(0x20b)]()[_0x137d4e(0x262)](),_0xe43584=path[_0x137d4e(0x20a)](config['root'],_0x137d4e(0x1b5),_0x137d4e(0x265)),_0x2017ae=path[_0x137d4e(0x20a)](config[_0x137d4e(0x28b)],_0x137d4e(0x1b5),_0x137d4e(0x217)),_0x1694e9=path[_0x137d4e(0x20a)](_0xe43584,_0x18df62),_0x3fe75c=util[_0x137d4e(0x213)]('transcript-%d-%s.zip',_0x189d20[_0x137d4e(0x239)]['id'],_0x18df62),_0x1fbe9a=path[_0x137d4e(0x20a)](_0xe43584,_0x3fe75c),_0x3933e4=[];_0x3933e4[_0x137d4e(0x1da)]({'model':db[_0x137d4e(0x1ef)],'as':_0x137d4e(0x1ef),'attributes':['id',_0x137d4e(0x1c0)],'raw':!![]}),_0x3933e4['push']({'model':db[_0x137d4e(0x203)],'as':_0x137d4e(0x1bd),'attributes':['id',_0x137d4e(0x246),_0x137d4e(0x28c)],'raw':!![]});_0x189d20[_0x137d4e(0x1ae)][_0x137d4e(0x217)]&&_0x3933e4[_0x137d4e(0x1da)]({'model':db[_0x137d4e(0x1f3)],'as':'Attachment','raw':!![]});const _0x544cb5=[{'model':db[_0x137d4e(0x226)],'as':'Messages','attributes':['id','body',_0x137d4e(0x266),_0x137d4e(0x241),'secret',_0x137d4e(0x227)],'include':_0x3933e4}];return _0x544cb5[_0x137d4e(0x1da)]({'model':db['OpenchannelAccount'],'as':_0x137d4e(0x1b2),'attributes':['id',_0x137d4e(0x1e6)]}),_0x544cb5[_0x137d4e(0x1da)]({'model':db[_0x137d4e(0x1ef)],'as':_0x137d4e(0x24d),'attributes':['id',_0x137d4e(0x1c0)]}),db['OpenchannelInteraction'][_0x137d4e(0x267)]({'where':{'id':_0x189d20[_0x137d4e(0x239)]['id']},'include':_0x544cb5})['then'](handleEntityNotFound(_0x339fea,null))['then'](function(_0x1ee659){const _0x55c96c=_0x137d4e;if(_0x1ee659){const _0x2b0026=_0x1ee659[_0x55c96c(0x229)]({'plain':!![]});fs[_0x55c96c(0x236)](_0x1694e9);const _0x56b4dc={'channel':'Openchannel','account':_0x2b0026[_0x55c96c(0x1b2)][_0x55c96c(0x1e6)],'agent':_0x2b0026[_0x55c96c(0x24d)]?_0x2b0026[_0x55c96c(0x24d)][_0x55c96c(0x1c0)]:'N.A.','createdAt':moment(_0x2b0026[_0x55c96c(0x266)])[_0x55c96c(0x213)](_0x55c96c(0x22f))['toString'](),'closedAt':_0x2b0026[_0x55c96c(0x1ce)]?moment(_0x2b0026['closedAt'])[_0x55c96c(0x213)](_0x55c96c(0x22f))[_0x55c96c(0x262)]():'','disposition':_0x2b0026[_0x55c96c(0x1af)],'visibility':_0x2b0026['threadId']?_0x55c96c(0x283):'Private','messages':_(_0x2b0026[_0x55c96c(0x21a)])[_0x55c96c(0x256)]({'secret':![]})[_0x55c96c(0x224)](function(_0x29786e){const _0x384788=_0x55c96c;if(_0x29786e[_0x384788(0x1f3)]){const _0x46ad80=path[_0x384788(0x20a)](_0x2017ae,_0x29786e['Attachment'][_0x384788(0x1e7)]);fs[_0x384788(0x210)](_0x46ad80)&&fs['createReadStream'](_0x46ad80)[_0x384788(0x218)](fs[_0x384788(0x1bc)](path['join'](_0x1694e9,_0x29786e[_0x384788(0x1f3)][_0x384788(0x1e7)])));}return{'date':moment(_0x29786e['createdAt'])[_0x384788(0x213)](_0x384788(0x22f))['toString'](),'sender':_0x29786e['direction']===_0x384788(0x1b9)?_0x29786e[_0x384788(0x1ef)]?_0x29786e[_0x384788(0x1ef)][_0x384788(0x1c0)]:_0x384788(0x230):_0x29786e[_0x384788(0x1bd)][_0x384788(0x246)]+(_0x29786e[_0x384788(0x1bd)][_0x384788(0x28c)]?'\x20'+_0x29786e['Contact'][_0x384788(0x28c)]:''),'body':_0x29786e[_0x384788(0x1f3)]?_0x29786e[_0x384788(0x1f3)][_0x384788(0x1e7)]:_0x29786e['body'],'direction':_0x29786e['direction']===_0x384788(0x1b9)?'A':'C','secret':_0x29786e['secret'],'read':_0x29786e[_0x384788(0x227)],'attachment':_0x29786e[_0x384788(0x1f3)]};})[_0x55c96c(0x219)]()};return ejs[_0x55c96c(0x212)](path[_0x55c96c(0x20a)](config[_0x55c96c(0x28b)],_0x55c96c(0x28d),'downloadInteraction.ejs'),{'interaction':_0x56b4dc})[_0x55c96c(0x1b7)](async function(_0x496dea){const _0x2de4de=_0x55c96c,_0x16108e=path[_0x2de4de(0x20a)](_0x1694e9,_0x2de4de(0x260)+_0x2b0026['id']+'-'+_0x18df62+_0x2de4de(0x1e3)),_0x1ff62e={'path':_0x16108e,'channel':'Openchannel','interactionId':_0x2b0026['id']};return await createPdfFromHTML(_0x496dea,_0x1ff62e),fs[_0x2de4de(0x27b)](_0x16108e);})[_0x55c96c(0x1b7)](function(){const _0x4087fb=_0x55c96c;return new Promise(function(_0x94ba67,_0x164ba1){zipdir(_0x1694e9,{'saveTo':_0x1fbe9a},function(_0x1b6433,_0x42d848){if(_0x1b6433)return _0x164ba1(_0x1b6433);return _0x94ba67(_0x42d848);});})[_0x4087fb(0x1b7)](function(){return new Promise(function(_0x3641f0,_0x3a6c48){rimraf(_0x1694e9,function(_0x13a8d6){if(_0x13a8d6)_0x3a6c48(_0x13a8d6);return _0x3641f0();});});})[_0x4087fb(0x1b7)](function(){const _0x1ca529=_0x4087fb;return _0x339fea[_0x1ca529(0x274)](_0x1fbe9a,_0x3fe75c,function(_0x3589b8){const _0x26a20d=_0x1ca529;_0x3589b8?consoleLogger[_0x26a20d(0x25c)](_0x26a20d(0x1c2),_0x3589b8):fs[_0x26a20d(0x1fd)](_0x1fbe9a);});});});}else return _0x339fea[_0x55c96c(0x242)](0xc8);})['catch'](handleError(_0x339fea,null));};