Built motion from commit d5e4af8c.|2.6.23
[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 _0x7aad=['\x0d\x0a\x0d\x0a','toString','substring','length','indexOf','slice','trim','emit','exports','util','stream','Transform','_localBuffer','inherits','prototype'];(function(_0x5418ad,_0x40742f){var _0x2cae56=function(_0x36d317){while(--_0x36d317){_0x5418ad['push'](_0x5418ad['shift']());}};_0x2cae56(++_0x40742f);}(_0x7aad,0x180));var _0xd7aa=function(_0x139a3c,_0x4fc883){_0x139a3c=_0x139a3c-0x0;var _0x2b375b=_0x7aad[_0x139a3c];return _0x2b375b;};'use strict';var util=require(_0xd7aa('0x0'));var Transform=require(_0xd7aa('0x1'))[_0xd7aa('0x2')];function AGIReply(_0x1541cd){Transform['call'](this,_0x1541cd);this[_0xd7aa('0x3')]='';this['_inBody']=![];}util[_0xd7aa('0x4')](AGIReply,Transform);AGIReply[_0xd7aa('0x5')]['_transform']=function(_0x1459f9,_0x5b009f,_0x5860f7){var _0x174767='\x0a',_0x9cf409=['\x0a\x0a',_0xd7aa('0x6')],_0x475852=-0x1,_0x2c264b=-0x1,_0x3382f8='',_0x4f3cf9=0x0,_0x2d62f1='',_0x4a8c9a='';this[_0xd7aa('0x3')]+=_0x1459f9[_0xd7aa('0x7')]();_0x2d62f1=this['_localBuffer'];if(!this['_inBody']){_0x4f3cf9=0x0;while(_0x9cf409[_0x4f3cf9]){while((_0x2c264b=_0x2d62f1['indexOf'](_0x9cf409[_0x4f3cf9]))!=-0x1){_0x3382f8=_0x9cf409[_0x4f3cf9];_0x4a8c9a=_0x2d62f1['substring'](0x0,_0x2c264b);_0x2d62f1=_0x2d62f1[_0xd7aa('0x8')](_0x2c264b+_0x3382f8[_0xd7aa('0x9')]);var _0x2ff9ad=_0x4a8c9a['split'](_0x174767),_0x3d8301=0x0,_0x29b850={},_0x49c88c='',_0x4580b0='',_0x46af5b=-0x1;while(_0x2ff9ad[_0x3d8301]){_0x46af5b=_0x2ff9ad[_0x3d8301][_0xd7aa('0xa')](':');if(_0x46af5b!=-0x1){_0x49c88c=_0x2ff9ad[_0x3d8301][_0xd7aa('0xb')](0x0,_0x46af5b)['trim']();_0x4580b0=_0x2ff9ad[_0x3d8301][_0xd7aa('0xb')](_0x46af5b+0x1)[_0xd7aa('0xc')]();if(_0x49c88c[_0xd7aa('0x9')]>0x0){_0x29b850[_0x49c88c]=_0x4580b0;}}else{}_0x3d8301++;}this['emit']('headers',_0x29b850);this['_inBody']=!![];}_0x4f3cf9++;}this[_0xd7aa('0x3')]=_0x2d62f1;}else{while((_0x475852=_0x2d62f1[_0xd7aa('0xa')](_0x174767))!=-0x1){_0x4a8c9a=_0x2d62f1[_0xd7aa('0x8')](0x0,_0x475852);this[_0xd7aa('0xd')]('line',_0x4a8c9a);_0x2d62f1=_0x2d62f1['substring'](_0x475852+_0x174767[_0xd7aa('0x9')]);}this[_0xd7aa('0x3')]=_0x2d62f1;}_0x5860f7();};module[_0xd7aa('0xe')]=AGIReply;