Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / voiceDialReport / voiceDialReport.controller.js
index 83df6bf..ae77079 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x151c=['attributes','fields','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','options','includeAll','include','rows','catch','show','params','find','create','body','describe','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','VoiceDialReport','rawAttributes','fieldName','type','key','query','keys','intersection','model'];(function(_0x2067e2,_0xa23eac){var _0x51bd43=function(_0x328729){while(--_0x328729){_0x2067e2['push'](_0x2067e2['shift']());}};_0x51bd43(++_0xa23eac);}(_0x151c,0x145));var _0xc151=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x151c[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xc151('0x0'));var emlformat=require(_0xc151('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xc151('0x2'));var jsonpatch=require(_0xc151('0x3'));var rp=require(_0xc151('0x4'));var moment=require(_0xc151('0x5'));var BPromise=require(_0xc151('0x6'));var Mustache=require(_0xc151('0x7'));var util=require(_0xc151('0x8'));var path=require(_0xc151('0x9'));var sox=require(_0xc151('0xa'));var csv=require('to-csv');var ejs=require(_0xc151('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc151('0xc'));var deskjs=require(_0xc151('0xd'));var toCsv=require('to-csv');var querystring=require(_0xc151('0xe'));var Papa=require(_0xc151('0xf'));var Redis=require(_0xc151('0x10'));var authService=require(_0xc151('0x11'));var qs=require(_0xc151('0x12'));var as=require(_0xc151('0x13'));var hardwareService=require(_0xc151('0x14'));var logger=require('../../config/logger')(_0xc151('0x15'));var utils=require(_0xc151('0x16'));var config=require(_0xc151('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xc151('0x18'))['db'];function respondWithStatusCode(_0x51b9ec,_0x1aae9b){_0x1aae9b=_0x1aae9b||0xcc;return function(_0x1d00f8){if(_0x1d00f8){return _0x51b9ec[_0xc151('0x19')](_0x1aae9b);}return _0x51b9ec[_0xc151('0x1a')](_0x1aae9b)[_0xc151('0x1b')]();};}function respondWithResult(_0x1f1883,_0x3ff358){_0x3ff358=_0x3ff358||0xc8;return function(_0x27eb2c){if(_0x27eb2c){return _0x1f1883[_0xc151('0x1a')](_0x3ff358)['json'](_0x27eb2c);}};}function respondWithFilteredResult(_0x39c7ce,_0x336d76){return function(_0x26f008){if(_0x26f008){var _0x54099f=_0x26f008[_0xc151('0x1c')],_0x2f5e72=_0x336d76['offset'],_0x37a4dd=_0x336d76[_0xc151('0x1d')]+_0x336d76[_0xc151('0x1e')],_0x3dbfb9;if(_0x37a4dd>=_0x54099f){_0x37a4dd=_0x54099f;_0x3dbfb9=0xc8;}else{_0x3dbfb9=0xce;}_0x39c7ce[_0xc151('0x1a')](_0x3dbfb9);return _0x39c7ce[_0xc151('0x1f')](_0xc151('0x20'),_0x2f5e72+'-'+_0x37a4dd+'/'+_0x54099f)[_0xc151('0x21')](_0x26f008);}return null;};}function patchUpdates(_0x47f49e){return function(_0x2258bf){try{jsonpatch[_0xc151('0x22')](_0x2258bf,_0x47f49e,!![]);}catch(_0x4eb2cd){return BPromise[_0xc151('0x23')](_0x4eb2cd);}return _0x2258bf[_0xc151('0x24')]();};}function saveUpdates(_0x181f84,_0x215491){return function(_0x57a159){if(_0x57a159){return _0x57a159[_0xc151('0x25')](_0x181f84)[_0xc151('0x26')](function(_0xbf2d80){return _0xbf2d80;});}return null;};}function removeEntity(_0x5e28c2,_0x2b7062){return function(_0x6d06e3){if(_0x6d06e3){return _0x6d06e3[_0xc151('0x27')]()['then'](function(){_0x5e28c2[_0xc151('0x1a')](0xcc)[_0xc151('0x1b')]();});}};}function handleEntityNotFound(_0x2c5e9a,_0x5152dc){return function(_0x1ebb5c){if(!_0x1ebb5c){_0x2c5e9a['sendStatus'](0x194);}return _0x1ebb5c;};}function handleError(_0x26f055,_0x477eab){_0x477eab=_0x477eab||0x1f4;return function(_0x2793df){logger[_0xc151('0x28')](_0x2793df[_0xc151('0x29')]);if(_0x2793df['name']){delete _0x2793df[_0xc151('0x2a')];}_0x26f055[_0xc151('0x1a')](_0x477eab)[_0xc151('0x2b')](_0x2793df);};}exports[_0xc151('0x2c')]=function(_0x1e854b,_0x5ba643){var _0x17ebdf={},_0x20e7ec={},_0x3ab8ae={'count':0x0,'rows':[]};var _0x12918f=_[_0xc151('0x2d')](db[_0xc151('0x2e')][_0xc151('0x2f')],function(_0x314255){return{'name':_0x314255[_0xc151('0x30')],'type':_0x314255[_0xc151('0x31')][_0xc151('0x32')]};});_0x20e7ec['model']=_[_0xc151('0x2d')](_0x12918f,_0xc151('0x2a'));_0x20e7ec[_0xc151('0x33')]=_[_0xc151('0x34')](_0x1e854b[_0xc151('0x33')]);_0x20e7ec['filters']=_[_0xc151('0x35')](_0x20e7ec[_0xc151('0x36')],_0x20e7ec[_0xc151('0x33')]);_0x17ebdf[_0xc151('0x37')]=_[_0xc151('0x35')](_0x20e7ec[_0xc151('0x36')],qs[_0xc151('0x38')](_0x1e854b['query'][_0xc151('0x38')]));_0x17ebdf[_0xc151('0x37')]=_0x17ebdf[_0xc151('0x37')]['length']?_0x17ebdf[_0xc151('0x37')]:_0x20e7ec['model'];if(!_0x1e854b['query'][_0xc151('0x39')](_0xc151('0x3a'))){_0x17ebdf['limit']=qs[_0xc151('0x1e')](_0x1e854b[_0xc151('0x33')]['limit']);_0x17ebdf[_0xc151('0x1d')]=qs[_0xc151('0x1d')](_0x1e854b[_0xc151('0x33')]['offset']);}_0x17ebdf['order']=qs[_0xc151('0x3b')](_0x1e854b[_0xc151('0x33')][_0xc151('0x3b')]);_0x17ebdf[_0xc151('0x3c')]=qs[_0xc151('0x3d')](_[_0xc151('0x3e')](_0x1e854b[_0xc151('0x33')],_0x20e7ec[_0xc151('0x3d')]),_0x12918f);if(_0x1e854b['query'][_0xc151('0x3f')]){_0x17ebdf[_0xc151('0x3c')]=_['merge'](_0x17ebdf['where'],{'$or':_[_0xc151('0x2d')](_0x12918f,function(_0xf9647d){if(_0xf9647d[_0xc151('0x31')]!=='VIRTUAL'){var _0xc694d3={};_0xc694d3[_0xf9647d[_0xc151('0x2a')]]={'$like':'%'+_0x1e854b[_0xc151('0x33')]['filter']+'%'};return _0xc694d3;}})});}_0x17ebdf=_[_0xc151('0x40')]({},_0x17ebdf,_0x1e854b[_0xc151('0x41')]);var _0x4f2bdb={'where':_0x17ebdf[_0xc151('0x3c')]};return db[_0xc151('0x2e')][_0xc151('0x1c')](_0x4f2bdb)['then'](function(_0x126300){_0x3ab8ae[_0xc151('0x1c')]=_0x126300;if(_0x1e854b[_0xc151('0x33')][_0xc151('0x42')]){_0x17ebdf[_0xc151('0x43')]=[{'all':!![]}];}return db['VoiceDialReport']['findAll'](_0x17ebdf);})[_0xc151('0x26')](function(_0x330106){_0x3ab8ae[_0xc151('0x44')]=_0x330106;return _0x3ab8ae;})[_0xc151('0x26')](respondWithFilteredResult(_0x5ba643,_0x17ebdf))[_0xc151('0x45')](handleError(_0x5ba643,null));};exports[_0xc151('0x46')]=function(_0x53a603,_0x2da179){var _0x55c50d={'raw':!![],'where':{'id':_0x53a603[_0xc151('0x47')]['id']}},_0x15cade={};_0x15cade[_0xc151('0x36')]=_['keys'](db['VoiceDialReport'][_0xc151('0x2f')]);_0x15cade['query']=_[_0xc151('0x34')](_0x53a603['query']);_0x15cade['filters']=_[_0xc151('0x35')](_0x15cade[_0xc151('0x36')],_0x15cade[_0xc151('0x33')]);_0x55c50d[_0xc151('0x37')]=_[_0xc151('0x35')](_0x15cade['model'],qs[_0xc151('0x38')](_0x53a603[_0xc151('0x33')][_0xc151('0x38')]));_0x55c50d['attributes']=_0x55c50d[_0xc151('0x37')]['length']?_0x55c50d[_0xc151('0x37')]:_0x15cade[_0xc151('0x36')];if(_0x53a603['query'][_0xc151('0x42')]){_0x55c50d[_0xc151('0x43')]=[{'all':!![]}];}_0x55c50d=_[_0xc151('0x40')]({},_0x55c50d,_0x53a603['options']);return db[_0xc151('0x2e')][_0xc151('0x48')](_0x55c50d)[_0xc151('0x26')](handleEntityNotFound(_0x2da179,null))[_0xc151('0x26')](respondWithResult(_0x2da179,null))[_0xc151('0x45')](handleError(_0x2da179,null));};exports[_0xc151('0x49')]=function(_0x490dc6,_0x45773e){return db[_0xc151('0x2e')][_0xc151('0x49')](_0x490dc6[_0xc151('0x4a')],{})[_0xc151('0x26')](respondWithResult(_0x45773e,0xc9))[_0xc151('0x45')](handleError(_0x45773e,null));};exports[_0xc151('0x25')]=function(_0x2ad029,_0x294352){if(_0x2ad029[_0xc151('0x4a')]['id']){delete _0x2ad029[_0xc151('0x4a')]['id'];}return db[_0xc151('0x2e')]['find']({'where':{'id':_0x2ad029[_0xc151('0x47')]['id']}})[_0xc151('0x26')](handleEntityNotFound(_0x294352,null))[_0xc151('0x26')](saveUpdates(_0x2ad029[_0xc151('0x4a')],null))[_0xc151('0x26')](respondWithResult(_0x294352,null))['catch'](handleError(_0x294352,null));};exports[_0xc151('0x27')]=function(_0xf6984d,_0x557e90){return db['VoiceDialReport']['find']({'where':{'id':_0xf6984d[_0xc151('0x47')]['id']}})[_0xc151('0x26')](handleEntityNotFound(_0x557e90,null))['then'](removeEntity(_0x557e90,null))[_0xc151('0x45')](handleError(_0x557e90,null));};exports[_0xc151('0x4b')]=function(_0x2f7f2d,_0x1b68c5){return db[_0xc151('0x2e')][_0xc151('0x4b')]()['then'](respondWithResult(_0x1b68c5,null))[_0xc151('0x45')](handleError(_0x1b68c5,null));};
\ No newline at end of file
+var _0xc5ff=['params','intersection','catch','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','apply','reject','save','then','destroy','stack','name','map','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','VoiceDialReport','count','includeAll','include','findAll','rows','show'];(function(_0x235f7f,_0x5ea1a0){var _0x33ea79=function(_0x114e4c){while(--_0x114e4c){_0x235f7f['push'](_0x235f7f['shift']());}};_0x33ea79(++_0x5ea1a0);}(_0xc5ff,0x169));var _0xfc5f=function(_0x9d0c86,_0x54ef56){_0x9d0c86=_0x9d0c86-0x0;var _0x49cec8=_0xc5ff[_0x9d0c86];return _0x49cec8;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xfc5f('0x0'));var rimraf=require(_0xfc5f('0x1'));var zipdir=require(_0xfc5f('0x2'));var jsonpatch=require(_0xfc5f('0x3'));var rp=require(_0xfc5f('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xfc5f('0x5'));var util=require('util');var path=require(_0xfc5f('0x6'));var sox=require(_0xfc5f('0x7'));var csv=require(_0xfc5f('0x8'));var ejs=require(_0xfc5f('0x9'));var fs=require('fs');var _=require(_0xfc5f('0xa'));var squel=require(_0xfc5f('0xb'));var crypto=require(_0xfc5f('0xc'));var jsforce=require(_0xfc5f('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xfc5f('0x8'));var querystring=require(_0xfc5f('0xe'));var Papa=require(_0xfc5f('0xf'));var Redis=require(_0xfc5f('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xfc5f('0x11'));var as=require(_0xfc5f('0x12'));var hardwareService=require(_0xfc5f('0x13'));var logger=require(_0xfc5f('0x14'))(_0xfc5f('0x15'));var utils=require(_0xfc5f('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xfc5f('0x17'))['db'];function respondWithStatusCode(_0x927476,_0x1aba93){_0x1aba93=_0x1aba93||0xcc;return function(_0x5915ac){if(_0x5915ac){return _0x927476[_0xfc5f('0x18')](_0x1aba93);}return _0x927476[_0xfc5f('0x19')](_0x1aba93)[_0xfc5f('0x1a')]();};}function respondWithResult(_0x488457,_0x2e1f42){_0x2e1f42=_0x2e1f42||0xc8;return function(_0x2a2ce8){if(_0x2a2ce8){return _0x488457[_0xfc5f('0x19')](_0x2e1f42)[_0xfc5f('0x1b')](_0x2a2ce8);}};}function respondWithFilteredResult(_0x2e6752,_0x578955){return function(_0x13cd33){if(_0x13cd33){var _0x331f1d=_0x13cd33['count'],_0x23a872=_0x578955[_0xfc5f('0x1c')],_0xb6cc25=_0x578955['offset']+_0x578955[_0xfc5f('0x1d')],_0x15cab1;if(_0xb6cc25>=_0x331f1d){_0xb6cc25=_0x331f1d;_0x15cab1=0xc8;}else{_0x15cab1=0xce;}_0x2e6752['status'](_0x15cab1);return _0x2e6752['set']('Content-Range',_0x23a872+'-'+_0xb6cc25+'/'+_0x331f1d)[_0xfc5f('0x1b')](_0x13cd33);}return null;};}function patchUpdates(_0x4cabda){return function(_0x5821ab){try{jsonpatch[_0xfc5f('0x1e')](_0x5821ab,_0x4cabda,!![]);}catch(_0x11e30b){return BPromise[_0xfc5f('0x1f')](_0x11e30b);}return _0x5821ab[_0xfc5f('0x20')]();};}function saveUpdates(_0x1752a2,_0x1f2f29){return function(_0x211cce){if(_0x211cce){return _0x211cce['update'](_0x1752a2)[_0xfc5f('0x21')](function(_0x58feef){return _0x58feef;});}return null;};}function removeEntity(_0x1858d9,_0x4bd5ab){return function(_0x350d46){if(_0x350d46){return _0x350d46[_0xfc5f('0x22')]()['then'](function(){_0x1858d9['status'](0xcc)[_0xfc5f('0x1a')]();});}};}function handleEntityNotFound(_0x2bd041,_0x92c4ee){return function(_0x34ad13){if(!_0x34ad13){_0x2bd041['sendStatus'](0x194);}return _0x34ad13;};}function handleError(_0x3aec73,_0x141f1d){_0x141f1d=_0x141f1d||0x1f4;return function(_0x4aa7e3){logger['error'](_0x4aa7e3[_0xfc5f('0x23')]);if(_0x4aa7e3[_0xfc5f('0x24')]){delete _0x4aa7e3['name'];}_0x3aec73['status'](_0x141f1d)['send'](_0x4aa7e3);};}exports['index']=function(_0x518389,_0x1e307f){var _0x313587={},_0x50088c={},_0x475d62={'count':0x0,'rows':[]};var _0x1fb3dc=_[_0xfc5f('0x25')](db['VoiceDialReport'][_0xfc5f('0x26')],function(_0x59f973){return{'name':_0x59f973[_0xfc5f('0x27')],'type':_0x59f973[_0xfc5f('0x28')][_0xfc5f('0x29')]};});_0x50088c[_0xfc5f('0x2a')]=_[_0xfc5f('0x25')](_0x1fb3dc,_0xfc5f('0x24'));_0x50088c[_0xfc5f('0x2b')]=_[_0xfc5f('0x2c')](_0x518389[_0xfc5f('0x2b')]);_0x50088c[_0xfc5f('0x2d')]=_['intersection'](_0x50088c[_0xfc5f('0x2a')],_0x50088c[_0xfc5f('0x2b')]);_0x313587[_0xfc5f('0x2e')]=_['intersection'](_0x50088c['model'],qs[_0xfc5f('0x2f')](_0x518389['query'][_0xfc5f('0x2f')]));_0x313587[_0xfc5f('0x2e')]=_0x313587['attributes'][_0xfc5f('0x30')]?_0x313587[_0xfc5f('0x2e')]:_0x50088c['model'];if(!_0x518389[_0xfc5f('0x2b')][_0xfc5f('0x31')](_0xfc5f('0x32'))){_0x313587[_0xfc5f('0x1d')]=qs[_0xfc5f('0x1d')](_0x518389['query'][_0xfc5f('0x1d')]);_0x313587[_0xfc5f('0x1c')]=qs['offset'](_0x518389['query'][_0xfc5f('0x1c')]);}_0x313587[_0xfc5f('0x33')]=qs[_0xfc5f('0x34')](_0x518389[_0xfc5f('0x2b')][_0xfc5f('0x34')]);_0x313587[_0xfc5f('0x35')]=qs[_0xfc5f('0x2d')](_['pick'](_0x518389[_0xfc5f('0x2b')],_0x50088c[_0xfc5f('0x2d')]),_0x1fb3dc);if(_0x518389[_0xfc5f('0x2b')][_0xfc5f('0x36')]){_0x313587[_0xfc5f('0x35')]=_[_0xfc5f('0x37')](_0x313587['where'],{'$or':_['map'](_0x1fb3dc,function(_0x484973){if(_0x484973['type']!==_0xfc5f('0x38')){var _0x1ec60f={};_0x1ec60f[_0x484973[_0xfc5f('0x24')]]={'$like':'%'+_0x518389[_0xfc5f('0x2b')]['filter']+'%'};return _0x1ec60f;}})});}_0x313587=_['merge']({},_0x313587,_0x518389[_0xfc5f('0x39')]);var _0x2c2c15={'where':_0x313587['where']};return db[_0xfc5f('0x3a')][_0xfc5f('0x3b')](_0x2c2c15)[_0xfc5f('0x21')](function(_0x45ea5a){_0x475d62['count']=_0x45ea5a;if(_0x518389[_0xfc5f('0x2b')][_0xfc5f('0x3c')]){_0x313587[_0xfc5f('0x3d')]=[{'all':!![]}];}return db[_0xfc5f('0x3a')][_0xfc5f('0x3e')](_0x313587);})['then'](function(_0x27020e){_0x475d62[_0xfc5f('0x3f')]=_0x27020e;return _0x475d62;})[_0xfc5f('0x21')](respondWithFilteredResult(_0x1e307f,_0x313587))['catch'](handleError(_0x1e307f,null));};exports[_0xfc5f('0x40')]=function(_0x312d84,_0x85d5e6){var _0x2c691f={'raw':!![],'where':{'id':_0x312d84[_0xfc5f('0x41')]['id']}},_0x3e5ab7={};_0x3e5ab7['model']=_[_0xfc5f('0x2c')](db[_0xfc5f('0x3a')]['rawAttributes']);_0x3e5ab7[_0xfc5f('0x2b')]=_[_0xfc5f('0x2c')](_0x312d84[_0xfc5f('0x2b')]);_0x3e5ab7[_0xfc5f('0x2d')]=_[_0xfc5f('0x42')](_0x3e5ab7[_0xfc5f('0x2a')],_0x3e5ab7['query']);_0x2c691f[_0xfc5f('0x2e')]=_[_0xfc5f('0x42')](_0x3e5ab7[_0xfc5f('0x2a')],qs['fields'](_0x312d84[_0xfc5f('0x2b')][_0xfc5f('0x2f')]));_0x2c691f[_0xfc5f('0x2e')]=_0x2c691f['attributes'][_0xfc5f('0x30')]?_0x2c691f[_0xfc5f('0x2e')]:_0x3e5ab7['model'];if(_0x312d84[_0xfc5f('0x2b')]['includeAll']){_0x2c691f['include']=[{'all':!![]}];}_0x2c691f=_[_0xfc5f('0x37')]({},_0x2c691f,_0x312d84[_0xfc5f('0x39')]);return db[_0xfc5f('0x3a')]['find'](_0x2c691f)[_0xfc5f('0x21')](handleEntityNotFound(_0x85d5e6,null))['then'](respondWithResult(_0x85d5e6,null))[_0xfc5f('0x43')](handleError(_0x85d5e6,null));};exports['create']=function(_0x367c9d,_0x4be856){return db[_0xfc5f('0x3a')]['create'](_0x367c9d[_0xfc5f('0x44')],{})[_0xfc5f('0x21')](respondWithResult(_0x4be856,0xc9))[_0xfc5f('0x43')](handleError(_0x4be856,null));};exports['update']=function(_0x33579f,_0x4632d3){if(_0x33579f[_0xfc5f('0x44')]['id']){delete _0x33579f[_0xfc5f('0x44')]['id'];}return db['VoiceDialReport'][_0xfc5f('0x45')]({'where':{'id':_0x33579f[_0xfc5f('0x41')]['id']}})[_0xfc5f('0x21')](handleEntityNotFound(_0x4632d3,null))[_0xfc5f('0x21')](saveUpdates(_0x33579f[_0xfc5f('0x44')],null))['then'](respondWithResult(_0x4632d3,null))[_0xfc5f('0x43')](handleError(_0x4632d3,null));};exports[_0xfc5f('0x22')]=function(_0x3fd2d,_0x541738){return db[_0xfc5f('0x3a')][_0xfc5f('0x45')]({'where':{'id':_0x3fd2d[_0xfc5f('0x41')]['id']}})['then'](handleEntityNotFound(_0x541738,null))[_0xfc5f('0x21')](removeEntity(_0x541738,null))[_0xfc5f('0x43')](handleError(_0x541738,null));};exports[_0xfc5f('0x46')]=function(_0x1527f8,_0x4239e5){return db[_0xfc5f('0x3a')][_0xfc5f('0x46')]()[_0xfc5f('0x21')](respondWithResult(_0x4239e5,null))['catch'](handleError(_0x4239e5,null));};
\ No newline at end of file