Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / services / agi / reply.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 _0x1a41=['headers','_localBuffer','emit','line','exports','stream','call','_inBody','inherits','prototype','toString','substring','length','split','indexOf','slice','trim'];(function(_0x9ac04e,_0x5d1835){var _0x4c64c4=function(_0x2e8a1c){while(--_0x2e8a1c){_0x9ac04e['push'](_0x9ac04e['shift']());}};_0x4c64c4(++_0x5d1835);}(_0x1a41,0x126));var _0x11a4=function(_0x25a6dc,_0x2e1a0a){_0x25a6dc=_0x25a6dc-0x0;var _0x238823=_0x1a41[_0x25a6dc];return _0x238823;};'use strict';var util=require('util');var Transform=require(_0x11a4('0x0'))['Transform'];function AGIReply(_0x24290e){Transform[_0x11a4('0x1')](this,_0x24290e);this['_localBuffer']='';this[_0x11a4('0x2')]=![];}util[_0x11a4('0x3')](AGIReply,Transform);AGIReply[_0x11a4('0x4')]['_transform']=function(_0x3e9544,_0x22077c,_0x5f019c){var _0x3fef3b='\x0a',_0x3044c2=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0x2f3cbc=-0x1,_0x47e999=-0x1,_0x49e7ff='',_0x29a029=0x0,_0x151f73='',_0x8eec18='';this['_localBuffer']+=_0x3e9544[_0x11a4('0x5')]();_0x151f73=this['_localBuffer'];if(!this[_0x11a4('0x2')]){_0x29a029=0x0;while(_0x3044c2[_0x29a029]){while((_0x47e999=_0x151f73['indexOf'](_0x3044c2[_0x29a029]))!=-0x1){_0x49e7ff=_0x3044c2[_0x29a029];_0x8eec18=_0x151f73[_0x11a4('0x6')](0x0,_0x47e999);_0x151f73=_0x151f73['substring'](_0x47e999+_0x49e7ff[_0x11a4('0x7')]);var _0xbe2ca1=_0x8eec18[_0x11a4('0x8')](_0x3fef3b),_0x33d343=0x0,_0x216eea={},_0x423570='',_0x2988bb='',_0x2e6816=-0x1;while(_0xbe2ca1[_0x33d343]){_0x2e6816=_0xbe2ca1[_0x33d343][_0x11a4('0x9')](':');if(_0x2e6816!=-0x1){_0x423570=_0xbe2ca1[_0x33d343][_0x11a4('0xa')](0x0,_0x2e6816)[_0x11a4('0xb')]();_0x2988bb=_0xbe2ca1[_0x33d343][_0x11a4('0xa')](_0x2e6816+0x1)[_0x11a4('0xb')]();if(_0x423570[_0x11a4('0x7')]>0x0){_0x216eea[_0x423570]=_0x2988bb;}}else{}_0x33d343++;}this['emit'](_0x11a4('0xc'),_0x216eea);this[_0x11a4('0x2')]=!![];}_0x29a029++;}this[_0x11a4('0xd')]=_0x151f73;}else{while((_0x2f3cbc=_0x151f73[_0x11a4('0x9')](_0x3fef3b))!=-0x1){_0x8eec18=_0x151f73[_0x11a4('0x6')](0x0,_0x2f3cbc);this[_0x11a4('0xe')](_0x11a4('0xf'),_0x8eec18);_0x151f73=_0x151f73[_0x11a4('0x6')](_0x2f3cbc+_0x3fef3b[_0x11a4('0x7')]);}this[_0x11a4('0xd')]=_0x151f73;}_0x5f019c();};module[_0x11a4('0x10')]=AGIReply;