5540f73c913d1a2363da078c93f6be7c2f0afdea
[motion-next.git] / server / services / routing / server / applications / gotop.js
1 const a1207_0x336b=['lodash','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','next','join','findIndex','info','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','error','validate','priority','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','stringify','length','../../../../config/logger','stop','map','routing','[%s][GOTOP]\x20%s'];(function(_0x1968f7,_0x336be3){const _0x134f83=function(_0x4dca30){while(--_0x4dca30){_0x1968f7['push'](_0x1968f7['shift']());}};_0x134f83(++_0x336be3);}(a1207_0x336b,0x8a));const a1207_0x134f=function(_0x1968f7,_0x336be3){_0x1968f7=_0x1968f7-0x0;let _0x134f83=a1207_0x336b[_0x1968f7];return _0x134f83;};const _0x395a53=a1207_0x134f;'use strict';const schema=require('validate'),_=require(_0x395a53('0xe')),logger=require(_0x395a53('0x9'))(_0x395a53('0xc')),gotop=schema({'priority':{'type':'number','required':!![],'message':_0x395a53('0x5')}});exports[_0x395a53('0x6')]=function(_0x4dca30,_0x14e20f){return function(_0x27e1b8){const _0x30bd9b=a1207_0x134f;try{const _0x156045={'priority':_0x14e20f[0x0]},_0x4699ce=gotop[_0x30bd9b('0x3')](_0x156045,{'typecast':!![]});if(_0x4699ce[_0x30bd9b('0x8')])logger[_0x30bd9b('0x2')](_0x30bd9b('0xd'),_0x4dca30,_[_0x30bd9b('0xb')](_0x4699ce,'message')[_0x30bd9b('0x11')](',\x20')),_0x27e1b8[_0x30bd9b('0xa')]();else{logger[_0x30bd9b('0x0')]('[%s][GOTOP]\x20priority\x20%s',_0x4dca30,_0x156045['priority']);if(_0x156045[_0x30bd9b('0x4')]){const _0x3891c4=_[_0x30bd9b('0x12')](_0x27e1b8['rules'](),{'p':_0x156045[_0x30bd9b('0x4')]});_0x3891c4>=0x0?(logger[_0x30bd9b('0x0')](_0x30bd9b('0x1'),_0x4dca30,_0x156045[_0x30bd9b('0x4')]||'next',_0x3891c4),_0x27e1b8[_0x30bd9b('0x10')](_0x3891c4)):(logger['info'](_0x30bd9b('0xf'),_0x4dca30,_0x156045[_0x30bd9b('0x4')]||_0x30bd9b('0x10')),_0x27e1b8[_0x30bd9b('0xa')]());}else _0x27e1b8[_0x30bd9b('0x10')]();}}catch(_0x3b178f){logger[_0x30bd9b('0x2')](_0x30bd9b('0xd'),_0x4dca30,JSON[_0x30bd9b('0x7')](_0x3b178f)),_0x27e1b8[_0x30bd9b('0xa')]();}};};