Built motion from commit 753c950e.|2.5.42
[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 _0xcf74=['substring','length','split','trim','slice','headers','indexOf','line','exports','util','stream','_localBuffer','_inBody','inherits','prototype','\x0d\x0a\x0d\x0a','toString'];(function(_0x3d68cb,_0x48d362){var _0x5db0af=function(_0x29f12e){while(--_0x29f12e){_0x3d68cb['push'](_0x3d68cb['shift']());}};_0x5db0af(++_0x48d362);}(_0xcf74,0x17f));var _0x4cf7=function(_0x5d3a6,_0x5135fa){_0x5d3a6=_0x5d3a6-0x0;var _0x263e6d=_0xcf74[_0x5d3a6];return _0x263e6d;};'use strict';var util=require(_0x4cf7('0x0'));var Transform=require(_0x4cf7('0x1'))['Transform'];function AGIReply(_0x175312){Transform['call'](this,_0x175312);this[_0x4cf7('0x2')]='';this[_0x4cf7('0x3')]=![];}util[_0x4cf7('0x4')](AGIReply,Transform);AGIReply[_0x4cf7('0x5')]['_transform']=function(_0x2751dd,_0x2a5b48,_0x3c8edf){var _0x40275f='\x0a',_0x437af4=['\x0a\x0a',_0x4cf7('0x6')],_0x1aa06f=-0x1,_0x750c13=-0x1,_0x14056b='',_0x569a0f=0x0,_0x260eca='',_0x1a390c='';this[_0x4cf7('0x2')]+=_0x2751dd[_0x4cf7('0x7')]();_0x260eca=this[_0x4cf7('0x2')];if(!this[_0x4cf7('0x3')]){_0x569a0f=0x0;while(_0x437af4[_0x569a0f]){while((_0x750c13=_0x260eca['indexOf'](_0x437af4[_0x569a0f]))!=-0x1){_0x14056b=_0x437af4[_0x569a0f];_0x1a390c=_0x260eca[_0x4cf7('0x8')](0x0,_0x750c13);_0x260eca=_0x260eca[_0x4cf7('0x8')](_0x750c13+_0x14056b[_0x4cf7('0x9')]);var _0x35f4c6=_0x1a390c[_0x4cf7('0xa')](_0x40275f),_0x4eda56=0x0,_0x5f51ed={},_0x1bc7c2='',_0xad2b4c='',_0x12ac4a=-0x1;while(_0x35f4c6[_0x4eda56]){_0x12ac4a=_0x35f4c6[_0x4eda56]['indexOf'](':');if(_0x12ac4a!=-0x1){_0x1bc7c2=_0x35f4c6[_0x4eda56]['slice'](0x0,_0x12ac4a)[_0x4cf7('0xb')]();_0xad2b4c=_0x35f4c6[_0x4eda56][_0x4cf7('0xc')](_0x12ac4a+0x1)[_0x4cf7('0xb')]();if(_0x1bc7c2[_0x4cf7('0x9')]>0x0){_0x5f51ed[_0x1bc7c2]=_0xad2b4c;}}else{}_0x4eda56++;}this['emit'](_0x4cf7('0xd'),_0x5f51ed);this[_0x4cf7('0x3')]=!![];}_0x569a0f++;}this[_0x4cf7('0x2')]=_0x260eca;}else{while((_0x1aa06f=_0x260eca[_0x4cf7('0xe')](_0x40275f))!=-0x1){_0x1a390c=_0x260eca[_0x4cf7('0x8')](0x0,_0x1aa06f);this['emit'](_0x4cf7('0xf'),_0x1a390c);_0x260eca=_0x260eca['substring'](_0x1aa06f+_0x40275f[_0x4cf7('0x9')]);}this[_0x4cf7('0x2')]=_0x260eca;}_0x3c8edf();};module[_0x4cf7('0x10')]=AGIReply;