Built motion from commit 9d0783e6.|2.6.13
[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 _0xa106=['emit','headers','_inBody','line','exports','stream','Transform','call','_localBuffer','prototype','_transform','\x0d\x0a\x0d\x0a','toString','substring','indexOf','slice','trim','length'];(function(_0x181ca7,_0x298b30){var _0x1019f9=function(_0x3e956b){while(--_0x3e956b){_0x181ca7['push'](_0x181ca7['shift']());}};_0x1019f9(++_0x298b30);}(_0xa106,0x17f));var _0x6a10=function(_0x39772f,_0x5605cb){_0x39772f=_0x39772f-0x0;var _0xc9edbf=_0xa106[_0x39772f];return _0xc9edbf;};'use strict';var util=require('util');var Transform=require(_0x6a10('0x0'))[_0x6a10('0x1')];function AGIReply(_0x31b3bd){Transform[_0x6a10('0x2')](this,_0x31b3bd);this[_0x6a10('0x3')]='';this['_inBody']=![];}util['inherits'](AGIReply,Transform);AGIReply[_0x6a10('0x4')][_0x6a10('0x5')]=function(_0x236f7f,_0x3fb065,_0x21ad3){var _0x2a9468='\x0a',_0x4ee006=['\x0a\x0a',_0x6a10('0x6')],_0x1fa672=-0x1,_0x4988d8=-0x1,_0x3b605b='',_0x3404c4=0x0,_0x52cac8='',_0x5f1c5e='';this[_0x6a10('0x3')]+=_0x236f7f[_0x6a10('0x7')]();_0x52cac8=this[_0x6a10('0x3')];if(!this['_inBody']){_0x3404c4=0x0;while(_0x4ee006[_0x3404c4]){while((_0x4988d8=_0x52cac8['indexOf'](_0x4ee006[_0x3404c4]))!=-0x1){_0x3b605b=_0x4ee006[_0x3404c4];_0x5f1c5e=_0x52cac8[_0x6a10('0x8')](0x0,_0x4988d8);_0x52cac8=_0x52cac8[_0x6a10('0x8')](_0x4988d8+_0x3b605b['length']);var _0x142b09=_0x5f1c5e['split'](_0x2a9468),_0x255138=0x0,_0x5b8d14={},_0x525a8f='',_0x4986ee='',_0x5c3fd0=-0x1;while(_0x142b09[_0x255138]){_0x5c3fd0=_0x142b09[_0x255138][_0x6a10('0x9')](':');if(_0x5c3fd0!=-0x1){_0x525a8f=_0x142b09[_0x255138][_0x6a10('0xa')](0x0,_0x5c3fd0)[_0x6a10('0xb')]();_0x4986ee=_0x142b09[_0x255138][_0x6a10('0xa')](_0x5c3fd0+0x1)[_0x6a10('0xb')]();if(_0x525a8f[_0x6a10('0xc')]>0x0){_0x5b8d14[_0x525a8f]=_0x4986ee;}}else{}_0x255138++;}this[_0x6a10('0xd')](_0x6a10('0xe'),_0x5b8d14);this[_0x6a10('0xf')]=!![];}_0x3404c4++;}this[_0x6a10('0x3')]=_0x52cac8;}else{while((_0x1fa672=_0x52cac8['indexOf'](_0x2a9468))!=-0x1){_0x5f1c5e=_0x52cac8['substring'](0x0,_0x1fa672);this[_0x6a10('0xd')](_0x6a10('0x10'),_0x5f1c5e);_0x52cac8=_0x52cac8[_0x6a10('0x8')](_0x1fa672+_0x2a9468[_0x6a10('0xc')]);}this[_0x6a10('0x3')]=_0x52cac8;}_0x21ad3();};module[_0x6a10('0x11')]=AGIReply;