Built motion from commit e2826ce0c.|1.0.24
[motion.git] / server / config / tools / interval.js
index 8b1b7a3..54cf726 100644 (file)
@@ -1 +1 @@
-var _0x5c86=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x64\x65\x62\x75\x67","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x20\x75\x70\x64\x61\x74\x65\x20\x62\x79\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x50\x52\x49\x4D\x41\x52\x59","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x61\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x5c86[0];var _=require(_0x5c86[1]);var util=require(_0x5c86[2]);var IntervalModel=require(_0x5c86[4])[_0x5c86[3]];var VoiceExtension=require(_0x5c86[4])[_0x5c86[5]];var veUtil=require(_0x5c86[6]);var sequelize=require(_0x5c86[4])[_0x5c86[7]];var Applications=veUtil[_0x5c86[8]];var logger=require(_0x5c86[10])(_0x5c86[9]);function Interval(){logger[_0x5c86[12]](_0x5c86[11]);IntervalModel[_0x5c86[14]](function(_0xf009xa){if(_0xf009xa[_0x5c86[13]]!== null){updatevoiceExtension(_0xf009xa)}});IntervalModel[_0x5c86[15]](function(_0xf009xa){if(_0xf009xa[_0x5c86[13]]!== null){updatevoiceExtension(_0xf009xa)}});IntervalModel[_0x5c86[16]](function(_0xf009xa){if(_0xf009xa[_0x5c86[13]]!== null){updatevoiceExtension(_0xf009xa)}})}function updatevoiceExtension(_0xf009xa){var _0xf009xc=_0xf009xa[_0x5c86[13]]=== null?_0xf009xa[_0x5c86[17]]:_0xf009xa[_0x5c86[13]];return sequelize[_0x5c86[39]](function(_0xf009xe){return VoiceExtension[_0x5c86[36]]({where:{VoiceExtensionId:{$ne:null},IntervalId:_0xf009xc},raw:true,distinct:_0x5c86[34],attributes:[_0x5c86[17]]})[_0x5c86[33]](function(_0xf009x12){var _0xf009x13=_[_0x5c86[35]](_0xf009x12,_0x5c86[34]);return VoiceExtension[_0x5c86[38]](_0x5c86[37])[_0x5c86[36]]({where:{id:_0xf009x13}})})[_0x5c86[33]](function(_0xf009xf){var _0xf009x10=[];_0xf009xf[_0x5c86[32]](function(_0xf009x11){_0xf009x10[_0x5c86[31]](veUtil[_0x5c86[30]]({body:_0xf009x11[_0x5c86[29]],params:{id:_0xf009x11[_0x5c86[17]]}},_0xf009xe))});return _0xf009x10})[_0x5c86[28]]()})[_0x5c86[21]](sequelize.UniqueConstraintError,function(_0xf009xd){if(_0xf009xd[_0x5c86[23]][_0x5c86[22]]){_0xf009xd[_0x5c86[24]]= _0x5c86[25];_0xf009xd[_0x5c86[26]]= _0x5c86[27]};logger[_0x5c86[20]](_0xf009xd[_0x5c86[19]])})[_0x5c86[21]](function(_0xf009xd){logger[_0x5c86[20]](_0x5c86[18],_0xf009xd[_0x5c86[19]])})}module[_0x5c86[40]]= Interval
\ No newline at end of file
+var _0xb10f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x64\x65\x62\x75\x67","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x20\x75\x70\x64\x61\x74\x65\x20\x62\x79\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x50\x52\x49\x4D\x41\x52\x59","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x61\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xb10f[0];var _=require(_0xb10f[1]);var util=require(_0xb10f[2]);var IntervalModel=require(_0xb10f[4])[_0xb10f[3]];var VoiceExtension=require(_0xb10f[4])[_0xb10f[5]];var veUtil=require(_0xb10f[6]);var sequelize=require(_0xb10f[4])[_0xb10f[7]];var Applications=veUtil[_0xb10f[8]];var logger=require(_0xb10f[10])(_0xb10f[9]);function Interval(){logger[_0xb10f[12]](_0xb10f[11]);IntervalModel[_0xb10f[14]](function(_0x90fexa){if(_0x90fexa[_0xb10f[13]]!== null){updatevoiceExtension(_0x90fexa)}});IntervalModel[_0xb10f[15]](function(_0x90fexa){if(_0x90fexa[_0xb10f[13]]!== null){updatevoiceExtension(_0x90fexa)}});IntervalModel[_0xb10f[16]](function(_0x90fexa){if(_0x90fexa[_0xb10f[13]]!== null){updatevoiceExtension(_0x90fexa)}})}function updatevoiceExtension(_0x90fexa){var _0x90fexc=_0x90fexa[_0xb10f[13]]=== null?_0x90fexa[_0xb10f[17]]:_0x90fexa[_0xb10f[13]];return sequelize[_0xb10f[39]](function(_0x90fexe){return VoiceExtension[_0xb10f[36]]({where:{VoiceExtensionId:{$ne:null},IntervalId:_0x90fexc},raw:true,distinct:_0xb10f[34],attributes:[_0xb10f[17]]})[_0xb10f[33]](function(_0x90fex12){var _0x90fex13=_[_0xb10f[35]](_0x90fex12,_0xb10f[34]);return VoiceExtension[_0xb10f[38]](_0xb10f[37])[_0xb10f[36]]({where:{id:_0x90fex13}})})[_0xb10f[33]](function(_0x90fexf){var _0x90fex10=[];_0x90fexf[_0xb10f[32]](function(_0x90fex11){_0x90fex10[_0xb10f[31]](veUtil[_0xb10f[30]]({body:_0x90fex11[_0xb10f[29]],params:{id:_0x90fex11[_0xb10f[17]]}},_0x90fexe))});return _0x90fex10})[_0xb10f[28]]()})[_0xb10f[21]](sequelize.UniqueConstraintError,function(_0x90fexd){if(_0x90fexd[_0xb10f[23]][_0xb10f[22]]){_0x90fexd[_0xb10f[24]]= _0xb10f[25];_0x90fexd[_0xb10f[26]]= _0xb10f[27]};logger[_0xb10f[20]](_0x90fexd[_0xb10f[19]])})[_0xb10f[21]](function(_0x90fexd){logger[_0xb10f[20]](_0xb10f[18],_0x90fexd[_0xb10f[19]])})}module[_0xb10f[40]]= Interval
\ No newline at end of file