flexbiz-server 12.4.21 → 12.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1068) hide show
  1. package/package.json +2 -1
  2. package/server/app.js +1 -22
  3. package/server/auths/bearer.js +1 -3
  4. package/server/auths/facebook.js +1 -12
  5. package/server/auths/google.js +1 -13
  6. package/server/auths/local.js +1 -64
  7. package/server/cluster.js +1 -27
  8. package/server/controllers/controller.js +1 -107
  9. package/server/controllers/controllerRPT.js +1 -27
  10. package/server/controllers/controllerUtils.js +1 -76
  11. package/server/controllers/createHandler.js +1 -35
  12. package/server/controllers/createRouteHandler.js +1 -4
  13. package/server/controllers/deleteHandler.js +1 -11
  14. package/server/controllers/deleteManyHandler.js +1 -2
  15. package/server/controllers/exportHandler.js +1 -17
  16. package/server/controllers/findHandler.js +1 -53
  17. package/server/controllers/handlers.js +1 -3
  18. package/server/controllers/historyHandler.js +1 -5
  19. package/server/controllers/importFromExcelHandler.js +1 -14
  20. package/server/controllers/importFromGsHandler.js +1 -10
  21. package/server/controllers/importFromJsonHandler.js +1 -7
  22. package/server/controllers/importHandler.js +1 -21
  23. package/server/controllers/logHandler.js +1 -5
  24. package/server/controllers/rptCreateRouteHandler.js +1 -4
  25. package/server/controllers/rptExcelHandler.js +1 -32
  26. package/server/controllers/rptHandler.js +1 -13
  27. package/server/controllers/updateBookHandler.js +1 -10
  28. package/server/controllers/updateFieldHandler.js +1 -12
  29. package/server/controllers/updateHandler.js +1 -39
  30. package/server/controllers/updateKeyHandler.js +1 -14
  31. package/server/controllers/viewHandler.js +1 -13
  32. package/server/flow/FlowEngine.js +1 -64
  33. package/server/flow/WebhookManager.js +1 -26
  34. package/server/flow/handlers.js +1 -3
  35. package/server/flow/nodes/aiAnalysis.js +1 -9
  36. package/server/flow/nodes/customer.js +1 -15
  37. package/server/flow/nodes/data.js +1 -14
  38. package/server/flow/nodes/debug.js +1 -2
  39. package/server/flow/nodes/delay.js +1 -3
  40. package/server/flow/nodes/email.js +1 -9
  41. package/server/flow/nodes/event.js +1 -11
  42. package/server/flow/nodes/facebook.js +1 -3
  43. package/server/flow/nodes/facebookConversations.js +1 -5
  44. package/server/flow/nodes/facebookCreatePost.js +1 -10
  45. package/server/flow/nodes/facebookSendMessage.js +1 -12
  46. package/server/flow/nodes/forEachItem.js +1 -8
  47. package/server/flow/nodes/function.js +1 -4
  48. package/server/flow/nodes/httprequest.js +1 -7
  49. package/server/flow/nodes/inject.js +1 -12
  50. package/server/flow/nodes/pushNotification.js +1 -5
  51. package/server/flow/nodes/report.js +1 -6
  52. package/server/flow/nodes/saveData.js +1 -2
  53. package/server/flow/nodes/switch.js +1 -20
  54. package/server/flow/nodes/webhook.js +1 -1
  55. package/server/flow/nodes/zaloSendMessage.js +1 -4
  56. package/server/flow/utils.js +1 -2
  57. package/server/global.js +1 -23
  58. package/server/libs/BlockchainTransactionPool.js +1 -3
  59. package/server/libs/WorkerPool.js +1 -4
  60. package/server/libs/WorkerStaticPool.js +1 -16
  61. package/server/libs/WorkerStaticPool_v1.js +1 -5
  62. package/server/libs/assbonus.js +1 -7
  63. package/server/libs/backup.js +1 -2
  64. package/server/libs/blockchainconnect.js +1 -12
  65. package/server/libs/cdpsdiem.js +1 -5
  66. package/server/libs/cdpsdt.js +1 -7
  67. package/server/libs/cdpskh.js +1 -9
  68. package/server/libs/cdpsnphep.js +1 -6
  69. package/server/libs/cdpstk.js +1 -11
  70. package/server/libs/ckcn.js +1 -12
  71. package/server/libs/ckdiem.js +1 -5
  72. package/server/libs/ckdt.js +1 -6
  73. package/server/libs/cknphep.js +1 -6
  74. package/server/libs/cktk.js +1 -4
  75. package/server/libs/cktt.js +1 -9
  76. package/server/libs/ckvt.js +1 -12
  77. package/server/libs/ckvtcapphat.js +1 -6
  78. package/server/libs/ckvtnpp.js +1 -8
  79. package/server/libs/ckvttt.js +1 -11
  80. package/server/libs/createSocaitheongay.js +1 -9
  81. package/server/libs/ctdiem.js +1 -5
  82. package/server/libs/ctvt.js +1 -7
  83. package/server/libs/ctvtnpp.js +1 -7
  84. package/server/libs/ctvttt.js +1 -7
  85. package/server/libs/databanle.js +1 -17
  86. package/server/libs/databanlenpp.js +1 -8
  87. package/server/libs/databanletheongay.js +1 -27
  88. package/server/libs/dkcn.js +1 -10
  89. package/server/libs/dkdiem.js +1 -5
  90. package/server/libs/dkdt.js +1 -6
  91. package/server/libs/dknphep.js +1 -7
  92. package/server/libs/dktk.js +1 -4
  93. package/server/libs/dktt.js +1 -8
  94. package/server/libs/dkvt.js +1 -9
  95. package/server/libs/dkvtnpp.js +1 -7
  96. package/server/libs/dkvttt.js +1 -7
  97. package/server/libs/dncn.js +1 -6
  98. package/server/libs/dntk.js +1 -4
  99. package/server/libs/dntt.js +1 -6
  100. package/server/libs/docs.js +1 -452
  101. package/server/libs/dstkcn.js +1 -1
  102. package/server/libs/dstktt.js +1 -1
  103. package/server/libs/dtbanletheonpp.js +1 -17
  104. package/server/libs/dtbanletheosp.js +1 -15
  105. package/server/libs/dtbanletheospnpp.js +1 -15
  106. package/server/libs/email.js +1 -3
  107. package/server/libs/excel.js +1 -2
  108. package/server/libs/getGiaban.js +1 -67
  109. package/server/libs/getGiabanAsync.js +1 -1
  110. package/server/libs/getNotifies.js +1 -1
  111. package/server/libs/htmlReport.js +1 -9
  112. package/server/libs/initDatabase.js +1 -9
  113. package/server/libs/invoiceEasy.js +1 -109
  114. package/server/libs/invoiceViettel.js +1 -29
  115. package/server/libs/invoiceVnpt.js +1 -22
  116. package/server/libs/kpistatus.js +1 -32
  117. package/server/libs/load-template.js +1 -3
  118. package/server/libs/mailmanagement.js +1 -13
  119. package/server/libs/mongooseDeletePost.js +1 -6
  120. package/server/libs/mongooseLeanId.js +1 -1
  121. package/server/libs/mongoosePatch.js +1 -8
  122. package/server/libs/onepay-payment.js +1 -4
  123. package/server/libs/optimizeBookkeeping.js +1 -14
  124. package/server/libs/parse-template.js +1 -5
  125. package/server/libs/permission.js +1 -51
  126. package/server/libs/phanbokh.js +1 -3
  127. package/server/libs/post-book.js +1 -23
  128. package/server/libs/post-socai.js +1 -25
  129. package/server/libs/post-sokho.js +1 -27
  130. package/server/libs/prototypes.js +1 -29
  131. package/server/libs/psdt.js +1 -1
  132. package/server/libs/pskh.js +1 -1
  133. package/server/libs/pstk.js +1 -1
  134. package/server/libs/redis-cache.js +1 -17
  135. package/server/libs/restore.js +1 -1
  136. package/server/libs/schedule.js +1 -18
  137. package/server/libs/sessionContext.js +2 -14
  138. package/server/libs/textReport.js +1 -3
  139. package/server/libs/thnxt.js +1 -9
  140. package/server/libs/thnxtnpp.js +1 -9
  141. package/server/libs/thnxttt.js +1 -8
  142. package/server/libs/tinhGt.js +1 -7
  143. package/server/libs/tinhGtCapnhatPNK.js +1 -7
  144. package/server/libs/tinhGtPhanboHeSo.js +1 -12
  145. package/server/libs/tinhGtPhanboSltp.js +1 -10
  146. package/server/libs/tinhGtPhanboYtcp.js +1 -11
  147. package/server/libs/tinhGtSltk.js +1 -9
  148. package/server/libs/tinhGtThcppstk.js +1 -10
  149. package/server/libs/tinhGtTrucTiep.js +1 -7
  150. package/server/libs/tinhGtXoa.js +1 -3
  151. package/server/libs/tinhgiatb.js +1 -38
  152. package/server/libs/tinhgiatb1vt.js +1 -5
  153. package/server/libs/tinhhoahong.js +1 -64
  154. package/server/libs/tinhhoahongnpp.js +1 -46
  155. package/server/libs/tinhkhauhao1ts.js +1 -12
  156. package/server/libs/tinhkhauhaots.js +1 -8
  157. package/server/libs/tuoinophaithu.js +1 -10
  158. package/server/libs/tuoinophaitra.js +1 -11
  159. package/server/libs/utils.js +1 -78
  160. package/server/libs/validate.js +1 -4
  161. package/server/libs/validator-acc-cust.js +1 -1
  162. package/server/libs/validator-account.js +1 -4
  163. package/server/libs/validator-vt.js +1 -2
  164. package/server/libs/validator.js +1 -11
  165. package/server/libs/vsocai.js +1 -8
  166. package/server/models/account.js +1 -7
  167. package/server/models/afflink.js +1 -2
  168. package/server/models/app.js +1 -15
  169. package/server/models/approve.js +1 -93
  170. package/server/models/assabcihandler.js +1 -35
  171. package/server/models/assbank.js +1 -19
  172. package/server/models/assbooking.js +1 -4
  173. package/server/models/assbuy.js +1 -3
  174. package/server/models/asscashwithdraw.js +1 -4
  175. package/server/models/assfindhash.js +1 -2
  176. package/server/models/assinvestment.js +1 -13
  177. package/server/models/assissue.js +1 -2
  178. package/server/models/asskey.js +1 -15
  179. package/server/models/assneedtobuy.js +1 -6
  180. package/server/models/assperiod.js +1 -7
  181. package/server/models/assproduct.js +1 -13
  182. package/server/models/assprofitsharing.js +1 -4
  183. package/server/models/assreceiver.js +1 -2
  184. package/server/models/assrequest.js +1 -11
  185. package/server/models/asssell.js +1 -7
  186. package/server/models/asstransaction.js +1 -3
  187. package/server/models/asstransfer.js +1 -4
  188. package/server/models/assuser_identity.js +1 -4
  189. package/server/models/asswithdraw.js +1 -4
  190. package/server/models/attend.js +1 -2
  191. package/server/models/banggiaban.js +1 -8
  192. package/server/models/bangtinhluong.js +1 -6
  193. package/server/models/base.js +1 -1
  194. package/server/models/bds_area.js +1 -4
  195. package/server/models/bds_block.js +1 -3
  196. package/server/models/bds_building.js +1 -4
  197. package/server/models/bds_floor.js +1 -3
  198. package/server/models/bds_floordetail.js +1 -9
  199. package/server/models/bds_nhadat.js +1 -11
  200. package/server/models/bds_nhomnhadat.js +1 -4
  201. package/server/models/bds_phanloainhadat.js +1 -3
  202. package/server/models/bg1.js +1 -9
  203. package/server/models/bg2.js +1 -10
  204. package/server/models/cache.js +1 -3
  205. package/server/models/calllog.js +1 -4
  206. package/server/models/campaign.js +1 -6
  207. package/server/models/cart.js +1 -5
  208. package/server/models/cddiem.js +1 -2
  209. package/server/models/cddt.js +1 -3
  210. package/server/models/cdkh.js +1 -5
  211. package/server/models/cdkhtheongay.js +1 -5
  212. package/server/models/cdnphep.js +1 -2
  213. package/server/models/cdtk.js +1 -3
  214. package/server/models/cdtktheongay.js +1 -3
  215. package/server/models/cdvt.js +1 -5
  216. package/server/models/cdvtnpp.js +1 -6
  217. package/server/models/cdvttheongay.js +1 -5
  218. package/server/models/chamcong.js +1 -7
  219. package/server/models/checkin.js +1 -4
  220. package/server/models/checkinactivity.js +1 -3
  221. package/server/models/checkinkpi.js +1 -4
  222. package/server/models/checkinlocation.js +1 -2
  223. package/server/models/chitieukpi.js +1 -3
  224. package/server/models/chudethaoluan.js +1 -3
  225. package/server/models/ckgtluong.js +1 -2
  226. package/server/models/colleague.js +1 -2
  227. package/server/models/comment.js +1 -4
  228. package/server/models/congdoansx.js +1 -4
  229. package/server/models/congtacvien.js +1 -4
  230. package/server/models/congthuctinhgiaban.js +1 -8
  231. package/server/models/consultant.js +1 -4
  232. package/server/models/contract.js +1 -6
  233. package/server/models/counter.js +1 -2
  234. package/server/models/ctds.js +1 -5
  235. package/server/models/ctds2.js +1 -6
  236. package/server/models/currency.js +1 -3
  237. package/server/models/customer.js +1 -31
  238. package/server/models/databanle.js +1 -8
  239. package/server/models/datlich.js +1 -4
  240. package/server/models/department.js +1 -4
  241. package/server/models/dh2.js +1 -20
  242. package/server/models/diagram.js +1 -2
  243. package/server/models/dinhmucsx.js +1 -8
  244. package/server/models/dkhoc.js +1 -6
  245. package/server/models/dknphep.js +1 -2
  246. package/server/models/dmban.js +1 -4
  247. package/server/models/dmbp.js +1 -12
  248. package/server/models/dmca.js +1 -2
  249. package/server/models/dmchietkhau.js +1 -9
  250. package/server/models/dmchietkhauhd.js +1 -20
  251. package/server/models/dmcpmh.js +1 -2
  252. package/server/models/dmdiemthuong.js +1 -5
  253. package/server/models/dmdoi.js +1 -4
  254. package/server/models/dmdoituongdanhgia.js +1 -2
  255. package/server/models/dmdt.js +1 -8
  256. package/server/models/dmdvt.js +1 -3
  257. package/server/models/dmgiaban.js +1 -9
  258. package/server/models/dmgiamua.js +1 -5
  259. package/server/models/dmgiathitruong.js +1 -5
  260. package/server/models/dmgiathitruong_ngay.js +1 -2
  261. package/server/models/dmgiathitruong_theodoi.js +1 -2
  262. package/server/models/dmhoahonghd.js +1 -9
  263. package/server/models/dmhoahongnpp.js +1 -9
  264. package/server/models/dmkc.js +1 -3
  265. package/server/models/dmkho.js +1 -6
  266. package/server/models/dmkhuyenmai.js +1 -9
  267. package/server/models/dmkhuyenmaihd.js +1 -11
  268. package/server/models/dmletet.js +1 -2
  269. package/server/models/dmlo.js +1 -4
  270. package/server/models/dmloaicong.js +1 -4
  271. package/server/models/dmloaitask.js +1 -2
  272. package/server/models/dmloaits.js +1 -2
  273. package/server/models/dmnckkm.js +1 -4
  274. package/server/models/dmnghiepvu.js +1 -4
  275. package/server/models/dmnguonvon.js +1 -2
  276. package/server/models/dmnhnv.js +1 -4
  277. package/server/models/dmnv.js +1 -17
  278. package/server/models/dmnvt.js +1 -9
  279. package/server/models/dmphatdichvu.js +1 -5
  280. package/server/models/dmphi.js +1 -3
  281. package/server/models/dmqct.js +1 -3
  282. package/server/models/dmqddvt.js +1 -3
  283. package/server/models/dmtanggiamts.js +1 -3
  284. package/server/models/dmto.js +1 -4
  285. package/server/models/dmtt.js +1 -6
  286. package/server/models/dmvt.js +1 -17
  287. package/server/models/dmyt.js +1 -4
  288. package/server/models/dn0.js +1 -13
  289. package/server/models/dnm.js +1 -11
  290. package/server/models/dokho.js +1 -2
  291. package/server/models/domain.js +1 -2
  292. package/server/models/dvcs.js +1 -3
  293. package/server/models/ecomcategories.js +1 -3
  294. package/server/models/ecomcategories_cty.js +1 -3
  295. package/server/models/ecomproductlines.js +1 -2
  296. package/server/models/ecompromotion_flashsales.js +1 -2
  297. package/server/models/ecompromotion_freeships.js +1 -2
  298. package/server/models/email.js +1 -2
  299. package/server/models/endpoint.js +1 -1
  300. package/server/models/events.js +1 -3
  301. package/server/models/evoucher.js +1 -5
  302. package/server/models/experiencejourney.js +1 -2
  303. package/server/models/experiencejourneydata.js +1 -4
  304. package/server/models/experiencejourneypersona.js +1 -3
  305. package/server/models/experiencejourneystage.js +1 -2
  306. package/server/models/exportexceltemplate.js +1 -2
  307. package/server/models/fbconversation.js +1 -15
  308. package/server/models/fbmessage.js +1 -2
  309. package/server/models/fbpage.js +1 -2
  310. package/server/models/fbpost.js +1 -2
  311. package/server/models/fieldright.js +1 -2
  312. package/server/models/file.js +1 -4
  313. package/server/models/financialroadmap.js +1 -3
  314. package/server/models/flow.js +1 -2
  315. package/server/models/flowdata.js +1 -3
  316. package/server/models/folder.js +1 -4
  317. package/server/models/follow.js +1 -2
  318. package/server/models/form.js +1 -3
  319. package/server/models/forminfo.js +1 -5
  320. package/server/models/formvalue.js +1 -3
  321. package/server/models/giaoca.js +1 -4
  322. package/server/models/giatb.js +1 -3
  323. package/server/models/group.js +1 -11
  324. package/server/models/gt_ctgt.js +1 -4
  325. package/server/models/gt_hspb.js +1 -3
  326. package/server/models/gt_sltk.js +1 -3
  327. package/server/models/gt_thcppstk.js +1 -3
  328. package/server/models/hanmucton.js +1 -4
  329. package/server/models/hd1.js +1 -11
  330. package/server/models/hd2.js +1 -27
  331. package/server/models/hd3.js +1 -18
  332. package/server/models/hd4.js +1 -13
  333. package/server/models/hd7.js +1 -17
  334. package/server/models/hd8.js +1 -12
  335. package/server/models/hde.js +1 -11
  336. package/server/models/hlink.js +1 -2
  337. package/server/models/hlinkvalue.js +1 -2
  338. package/server/models/hmcn.js +1 -3
  339. package/server/models/hmcnct.js +1 -2
  340. package/server/models/hspbts.js +1 -4
  341. package/server/models/htl.js +1 -13
  342. package/server/models/importexceltemplate.js +1 -2
  343. package/server/models/introducebonus.js +1 -4
  344. package/server/models/introducecode.js +1 -3
  345. package/server/models/introducer.js +1 -4
  346. package/server/models/kbbtpb.js +1 -7
  347. package/server/models/kbmPttct.js +1 -4
  348. package/server/models/kbmTkgtgt.js +1 -5
  349. package/server/models/kbm_bcdkt.js +1 -4
  350. package/server/models/kbm_kqhdkd.js +1 -3
  351. package/server/models/kbm_lcttgt.js +1 -5
  352. package/server/models/kbm_lctttt.js +1 -4
  353. package/server/models/kbm_pttct.js +1 -4
  354. package/server/models/kbm_tkgtgt.js +1 -5
  355. package/server/models/kbmbcdkt.js +1 -4
  356. package/server/models/kbmbcqt.js +1 -4
  357. package/server/models/kbmkqhdkd.js +1 -3
  358. package/server/models/kbmlcttgt.js +1 -6
  359. package/server/models/kbmlctttt.js +1 -4
  360. package/server/models/kbmtmbctc.js +1 -4
  361. package/server/models/kehoachdtcp.js +1 -3
  362. package/server/models/kehoachmh.js +1 -8
  363. package/server/models/keyresult.js +1 -7
  364. package/server/models/khunghangthanhvien.js +1 -3
  365. package/server/models/label.js +1 -2
  366. package/server/models/labelinfo.js +1 -2
  367. package/server/models/lenhcapphat.js +1 -8
  368. package/server/models/lenhsx.js +1 -8
  369. package/server/models/lienhe.js +1 -4
  370. package/server/models/like_module.js +1 -2
  371. package/server/models/link.js +1 -2
  372. package/server/models/loaidiem.js +1 -2
  373. package/server/models/lock.js +1 -2
  374. package/server/models/log.js +1 -5
  375. package/server/models/mailaccount.js +1 -3
  376. package/server/models/mailgroup.js +1 -3
  377. package/server/models/mailreceived.js +1 -2
  378. package/server/models/mailschedule.js +1 -2
  379. package/server/models/mailsent.js +1 -2
  380. package/server/models/mailtemplate.js +1 -2
  381. package/server/models/maudanhgia.js +1 -2
  382. package/server/models/menuinfo.js +1 -2
  383. package/server/models/message.js +1 -8
  384. package/server/models/message2.js +1 -4
  385. package/server/models/message2setting.js +1 -3
  386. package/server/models/moduleinfo.js +1 -4
  387. package/server/models/momo.js +1 -17
  388. package/server/models/news.js +1 -3
  389. package/server/models/newsfeed.js +1 -4
  390. package/server/models/note.js +1 -2
  391. package/server/models/notification.js +1 -7
  392. package/server/models/okr.js +1 -4
  393. package/server/models/okrdiagram.js +1 -3
  394. package/server/models/onepay.js +1 -24
  395. package/server/models/opportunity.js +1 -4
  396. package/server/models/options.js +1 -2
  397. package/server/models/originimportid.js +1 -1
  398. package/server/models/otp.js +1 -1
  399. package/server/models/parameter.js +1 -2
  400. package/server/models/participant.js +1 -20
  401. package/server/models/partner.js +1 -1
  402. package/server/models/payload.js +1 -1
  403. package/server/models/pbl.js +1 -16
  404. package/server/models/pc0.js +1 -13
  405. package/server/models/pc1.js +1 -14
  406. package/server/models/pc2.js +1 -13
  407. package/server/models/pc3.js +1 -13
  408. package/server/models/pc5.js +1 -8
  409. package/server/models/pc6.js +1 -14
  410. package/server/models/pcl.js +1 -6
  411. package/server/models/pdn.js +1 -9
  412. package/server/models/pdx.js +1 -9
  413. package/server/models/pgh.js +1 -5
  414. package/server/models/phieudanhgia.js +1 -3
  415. package/server/models/pht.js +1 -8
  416. package/server/models/phucap.js +1 -4
  417. package/server/models/pkc.js +1 -6
  418. package/server/models/pkh.js +1 -6
  419. package/server/models/pkk.js +1 -10
  420. package/server/models/pkt.js +1 -12
  421. package/server/models/pn1.js +1 -17
  422. package/server/models/pn2.js +1 -11
  423. package/server/models/pn3.js +1 -13
  424. package/server/models/pn5.js +1 -14
  425. package/server/models/pn6.js +1 -14
  426. package/server/models/pn9.js +1 -17
  427. package/server/models/pnc.js +1 -10
  428. package/server/models/pnh.js +1 -12
  429. package/server/models/pnk.js +1 -10
  430. package/server/models/po1.js +1 -19
  431. package/server/models/ppb.js +1 -6
  432. package/server/models/profile.js +1 -4
  433. package/server/models/pt1.js +1 -12
  434. package/server/models/pt5.js +1 -8
  435. package/server/models/ptl.js +1 -6
  436. package/server/models/ptthanhtoan.js +1 -6
  437. package/server/models/purchase_contract.js +1 -17
  438. package/server/models/pxc.js +1 -9
  439. package/server/models/pxh.js +1 -12
  440. package/server/models/pxk.js +1 -10
  441. package/server/models/qts.js +1 -14
  442. package/server/models/qts_dieuchinh.js +1 -3
  443. package/server/models/qts_dieuchuyen.js +1 -4
  444. package/server/models/quanhuyen.js +1 -2
  445. package/server/models/reason.js +1 -2
  446. package/server/models/receivedinvoice.js +1 -2
  447. package/server/models/reportinfo.js +1 -5
  448. package/server/models/right.js +1 -4
  449. package/server/models/rpt.js +1 -2
  450. package/server/models/rptform.js +1 -5
  451. package/server/models/rptobject.js +1 -2
  452. package/server/models/sale_contract.js +1 -9
  453. package/server/models/schedule.js +1 -16
  454. package/server/models/schedule_log.js +1 -2
  455. package/server/models/service.js +1 -4
  456. package/server/models/shipbook.js +1 -12
  457. package/server/models/shortcut.js +1 -2
  458. package/server/models/smsaccount.js +1 -10
  459. package/server/models/smssend.js +1 -2
  460. package/server/models/so1.js +1 -22
  461. package/server/models/so2.js +1 -10
  462. package/server/models/so3.js +1 -9
  463. package/server/models/so5.js +1 -15
  464. package/server/models/so9.js +1 -19
  465. package/server/models/socai.js +1 -26
  466. package/server/models/socainpp.js +1 -18
  467. package/server/models/socaitc.js +1 -6
  468. package/server/models/socaitmp.js +1 -16
  469. package/server/models/socaitt.js +1 -4
  470. package/server/models/sodiemthuong.js +1 -4
  471. package/server/models/sokho.js +1 -28
  472. package/server/models/sokhocapphat.js +1 -18
  473. package/server/models/sokhokhongton.js +1 -19
  474. package/server/models/sokhonpp.js +1 -19
  475. package/server/models/sokhotc.js +1 -8
  476. package/server/models/sokhott.js +1 -18
  477. package/server/models/sophanbokh.js +1 -3
  478. package/server/models/sosanxuat.js +1 -5
  479. package/server/models/sotinhkh.js +1 -2
  480. package/server/models/spdd_ck.js +1 -3
  481. package/server/models/spdd_dk.js +1 -3
  482. package/server/models/step.js +1 -2
  483. package/server/models/strategicdiagram.js +1 -3
  484. package/server/models/strategicgoal.js +1 -4
  485. package/server/models/strategickpi.js +1 -6
  486. package/server/models/strategicobjective.js +1 -5
  487. package/server/models/strategicplan.js +1 -5
  488. package/server/models/subscribe.js +1 -2
  489. package/server/models/support.js +1 -2
  490. package/server/models/synctime.js +1 -2
  491. package/server/models/sysconfig.js +1 -2
  492. package/server/models/sysgroup.js +1 -2
  493. package/server/models/tableinfo.js +1 -3
  494. package/server/models/task.js +1 -9
  495. package/server/models/taskreg.js +1 -4
  496. package/server/models/tc.js +1 -2
  497. package/server/models/tdttco.js +1 -8
  498. package/server/models/tdttco_tt.js +1 -5
  499. package/server/models/tdttno.js +1 -8
  500. package/server/models/tdttno_tt.js +1 -5
  501. package/server/models/templaterpt.js +1 -2
  502. package/server/models/templatestore.js +1 -3
  503. package/server/models/templatevoucher.js +1 -3
  504. package/server/models/tinhthanh.js +1 -2
  505. package/server/models/tokens.js +1 -2
  506. package/server/models/tontucthoi.js +1 -9
  507. package/server/models/trangthai.js +1 -4
  508. package/server/models/trangthaiapp.js +1 -4
  509. package/server/models/transaction.js +1 -16
  510. package/server/models/trialinfo.js +1 -2
  511. package/server/models/user.js +1 -38
  512. package/server/models/usergroup.js +1 -7
  513. package/server/models/vanchuyen.js +1 -12
  514. package/server/models/vat.js +1 -3
  515. package/server/models/vatra.js +1 -6
  516. package/server/models/vatvao.js +1 -6
  517. package/server/models/versioninfo.js +1 -2
  518. package/server/models/vietqrbanks.js +1 -2
  519. package/server/models/vsocai.js +1 -6
  520. package/server/models/waitevent.js +1 -2
  521. package/server/models/wallet.js +1 -8
  522. package/server/models/warranty.js +1 -3
  523. package/server/models/warrantyclaim.js +1 -2
  524. package/server/models/warrantypolicy.js +1 -1
  525. package/server/models/xaphuong.js +1 -2
  526. package/server/models/xhd.js +1 -10
  527. package/server/models/ytdd_ck.js +1 -4
  528. package/server/models/ytdd_dk.js +1 -4
  529. package/server/models/zalo.js +1 -17
  530. package/server/modules/lists/bg-cddiem.js +1 -6
  531. package/server/modules/lists/bg-cddt.js +1 -7
  532. package/server/modules/lists/bg-cdkh.js +1 -11
  533. package/server/modules/lists/bg-cdnphep.js +1 -6
  534. package/server/modules/lists/bg-cdtk.js +1 -9
  535. package/server/modules/lists/bg-cdvt.js +1 -8
  536. package/server/modules/lists/bg-cdvtnpp.js +1 -8
  537. package/server/modules/lists/ls-account.js +1 -4
  538. package/server/modules/lists/ls-afflink.js +1 -3
  539. package/server/modules/lists/ls-approve.js +1 -4
  540. package/server/modules/lists/ls-assabcihandler.js +1 -3
  541. package/server/modules/lists/ls-assbank.js +1 -3
  542. package/server/modules/lists/ls-assbooking.js +1 -20
  543. package/server/modules/lists/ls-assbuy.js +1 -8
  544. package/server/modules/lists/ls-asscashwithdraw.js +1 -8
  545. package/server/modules/lists/ls-assinvestment.js +1 -31
  546. package/server/modules/lists/ls-assissue.js +1 -3
  547. package/server/modules/lists/ls-asskey.js +1 -41
  548. package/server/modules/lists/ls-assneedtobuy.js +1 -10
  549. package/server/modules/lists/ls-assperiod.js +1 -19
  550. package/server/modules/lists/ls-assproduct.js +1 -9
  551. package/server/modules/lists/ls-assprofitsharing.js +1 -8
  552. package/server/modules/lists/ls-assreceiver.js +1 -3
  553. package/server/modules/lists/ls-assrequest.js +1 -4
  554. package/server/modules/lists/ls-asssell.js +1 -13
  555. package/server/modules/lists/ls-asstransaction.js +1 -3
  556. package/server/modules/lists/ls-asstransfer.js +1 -3
  557. package/server/modules/lists/ls-assuser_identity.js +1 -1
  558. package/server/modules/lists/ls-asswithdraw.js +1 -12
  559. package/server/modules/lists/ls-bangtinhluong.js +1 -2
  560. package/server/modules/lists/ls-bds_area.js +1 -3
  561. package/server/modules/lists/ls-bds_block.js +1 -1
  562. package/server/modules/lists/ls-bds_building.js +1 -3
  563. package/server/modules/lists/ls-bds_dmnhbds.js +1 -6
  564. package/server/modules/lists/ls-bds_floor.js +1 -2
  565. package/server/modules/lists/ls-bds_floordetail.js +1 -19
  566. package/server/modules/lists/ls-bds_nhadat.js +1 -16
  567. package/server/modules/lists/ls-bds_nhomnhadat.js +1 -1
  568. package/server/modules/lists/ls-bds_phanloainhadat.js +1 -1
  569. package/server/modules/lists/ls-calllog.js +1 -4
  570. package/server/modules/lists/ls-campaign.js +1 -1
  571. package/server/modules/lists/ls-cart.js +1 -14
  572. package/server/modules/lists/ls-chamcong.js +1 -3
  573. package/server/modules/lists/ls-checkin.js +1 -12
  574. package/server/modules/lists/ls-checkinactivity.js +1 -8
  575. package/server/modules/lists/ls-checkinkpi.js +1 -3
  576. package/server/modules/lists/ls-checkinlocation.js +1 -1
  577. package/server/modules/lists/ls-chitieukpi.js +1 -1
  578. package/server/modules/lists/ls-chudethaoluan.js +1 -1
  579. package/server/modules/lists/ls-ckgtluong.js +1 -1
  580. package/server/modules/lists/ls-comment.js +1 -9
  581. package/server/modules/lists/ls-congdoansx.js +1 -3
  582. package/server/modules/lists/ls-congtacvien.js +1 -5
  583. package/server/modules/lists/ls-consultant.js +1 -2
  584. package/server/modules/lists/ls-contract.js +1 -7
  585. package/server/modules/lists/ls-ctds.js +1 -4
  586. package/server/modules/lists/ls-ctds2.js +1 -4
  587. package/server/modules/lists/ls-currency.js +1 -1
  588. package/server/modules/lists/ls-customer.js +1 -21
  589. package/server/modules/lists/ls-datlich.js +1 -9
  590. package/server/modules/lists/ls-dckhauhaots.js +1 -3
  591. package/server/modules/lists/ls-department.js +1 -3
  592. package/server/modules/lists/ls-diagram.js +1 -1
  593. package/server/modules/lists/ls-dkhoc.js +1 -6
  594. package/server/modules/lists/ls-dknphep.js +1 -1
  595. package/server/modules/lists/ls-dmban.js +1 -4
  596. package/server/modules/lists/ls-dmbp.js +1 -7
  597. package/server/modules/lists/ls-dmca.js +1 -1
  598. package/server/modules/lists/ls-dmchietkhau.js +1 -19
  599. package/server/modules/lists/ls-dmchietkhauhd.js +1 -4
  600. package/server/modules/lists/ls-dmchucvu.js +1 -2
  601. package/server/modules/lists/ls-dmcpmh.js +1 -1
  602. package/server/modules/lists/ls-dmdiemthuong.js +1 -4
  603. package/server/modules/lists/ls-dmdoi.js +1 -4
  604. package/server/modules/lists/ls-dmdoituongdanhgia.js +1 -1
  605. package/server/modules/lists/ls-dmdt.js +1 -11
  606. package/server/modules/lists/ls-dmdvt.js +1 -2
  607. package/server/modules/lists/ls-dmgiaban.js +1 -4
  608. package/server/modules/lists/ls-dmgiamua.js +1 -4
  609. package/server/modules/lists/ls-dmgiathitruong.js +1 -15
  610. package/server/modules/lists/ls-dmgiathitruong_ngay.js +1 -2
  611. package/server/modules/lists/ls-dmgiathitruong_theodoi.js +1 -1
  612. package/server/modules/lists/ls-dmhoahonghd.js +1 -1
  613. package/server/modules/lists/ls-dmhoahongnpp.js +1 -1
  614. package/server/modules/lists/ls-dmkc.js +1 -3
  615. package/server/modules/lists/ls-dmkho.js +1 -1
  616. package/server/modules/lists/ls-dmkhuyenmai.js +1 -5
  617. package/server/modules/lists/ls-dmkhuyenmaihd.js +1 -3
  618. package/server/modules/lists/ls-dmletet.js +1 -1
  619. package/server/modules/lists/ls-dmlo.js +1 -1
  620. package/server/modules/lists/ls-dmloaicong.js +1 -1
  621. package/server/modules/lists/ls-dmloaits.js +1 -1
  622. package/server/modules/lists/ls-dmnckkm.js +1 -7
  623. package/server/modules/lists/ls-dmnghiepvu.js +1 -1
  624. package/server/modules/lists/ls-dmnguonvon.js +1 -1
  625. package/server/modules/lists/ls-dmnhnv.js +1 -6
  626. package/server/modules/lists/ls-dmnhtask.js +1 -5
  627. package/server/modules/lists/ls-dmnkh.js +1 -6
  628. package/server/modules/lists/ls-dmntt.js +1 -6
  629. package/server/modules/lists/ls-dmnv.js +1 -17
  630. package/server/modules/lists/ls-dmnvt.js +1 -8
  631. package/server/modules/lists/ls-dmphatdichvu.js +1 -3
  632. package/server/modules/lists/ls-dmphi.js +1 -6
  633. package/server/modules/lists/ls-dmqct.js +1 -2
  634. package/server/modules/lists/ls-dmqddvt.js +1 -3
  635. package/server/modules/lists/ls-dmtanggiamts.js +1 -1
  636. package/server/modules/lists/ls-dmto.js +1 -5
  637. package/server/modules/lists/ls-dmtt.js +1 -7
  638. package/server/modules/lists/ls-dmvt.js +1 -68
  639. package/server/modules/lists/ls-dmyt.js +1 -1
  640. package/server/modules/lists/ls-dokho.js +1 -1
  641. package/server/modules/lists/ls-dvcs.js +1 -1
  642. package/server/modules/lists/ls-ecomcategories.js +1 -5
  643. package/server/modules/lists/ls-ecomcategories_cty.js +1 -5
  644. package/server/modules/lists/ls-email.js +1 -4
  645. package/server/modules/lists/ls-events.js +1 -3
  646. package/server/modules/lists/ls-evoucher.js +1 -3
  647. package/server/modules/lists/ls-experiencejourney.js +1 -1
  648. package/server/modules/lists/ls-experiencejourneydata.js +1 -3
  649. package/server/modules/lists/ls-experiencejourneypersona.js +1 -4
  650. package/server/modules/lists/ls-experiencejourneystage.js +1 -1
  651. package/server/modules/lists/ls-fbconversation.js +1 -2
  652. package/server/modules/lists/ls-fbmessage.js +1 -2
  653. package/server/modules/lists/ls-fbpage.js +1 -11
  654. package/server/modules/lists/ls-fbpost.js +1 -2
  655. package/server/modules/lists/ls-file.js +1 -31
  656. package/server/modules/lists/ls-financialroadmap.js +1 -3
  657. package/server/modules/lists/ls-flow.js +1 -6
  658. package/server/modules/lists/ls-flowdata.js +1 -1
  659. package/server/modules/lists/ls-folder.js +1 -1
  660. package/server/modules/lists/ls-form.js +1 -1
  661. package/server/modules/lists/ls-forminfo.js +1 -1
  662. package/server/modules/lists/ls-formvalue.js +1 -1
  663. package/server/modules/lists/ls-giaoca.js +1 -4
  664. package/server/modules/lists/ls-group.js +1 -5
  665. package/server/modules/lists/ls-hlink.js +1 -1
  666. package/server/modules/lists/ls-hlinkvalue.js +1 -1
  667. package/server/modules/lists/ls-hmcn.js +1 -2
  668. package/server/modules/lists/ls-hspbts.js +1 -3
  669. package/server/modules/lists/ls-introducebonus.js +1 -4
  670. package/server/modules/lists/ls-introducecode.js +1 -10
  671. package/server/modules/lists/ls-introducer.js +1 -20
  672. package/server/modules/lists/ls-kbm-bcdkt.js +1 -1
  673. package/server/modules/lists/ls-kbm-bcqt.js +1 -5
  674. package/server/modules/lists/ls-kbm-kqhdkd.js +1 -1
  675. package/server/modules/lists/ls-kbm-lcttgt.js +1 -1
  676. package/server/modules/lists/ls-kbm-lctttt.js +1 -1
  677. package/server/modules/lists/ls-kbm-pttct.js +1 -3
  678. package/server/modules/lists/ls-kbm-tkgtgt.js +1 -3
  679. package/server/modules/lists/ls-kbm-tmbctc.js +1 -3
  680. package/server/modules/lists/ls-kehoachdtcp.js +1 -4
  681. package/server/modules/lists/ls-keyresult.js +1 -7
  682. package/server/modules/lists/ls-khunghangthanhvien.js +1 -1
  683. package/server/modules/lists/ls-kygui.js +1 -19
  684. package/server/modules/lists/ls-label.js +1 -1
  685. package/server/modules/lists/ls-lienhe.js +1 -4
  686. package/server/modules/lists/ls-like-module.js +1 -1
  687. package/server/modules/lists/ls-link.js +1 -1
  688. package/server/modules/lists/ls-loaidiem.js +1 -1
  689. package/server/modules/lists/ls-lock.js +1 -1
  690. package/server/modules/lists/ls-log.js +1 -3
  691. package/server/modules/lists/ls-mailaccount.js +1 -5
  692. package/server/modules/lists/ls-mailreceived.js +1 -5
  693. package/server/modules/lists/ls-mailschedule.js +1 -7
  694. package/server/modules/lists/ls-mailsent.js +1 -4
  695. package/server/modules/lists/ls-mailtemplate.js +1 -4
  696. package/server/modules/lists/ls-maudanhgia.js +1 -3
  697. package/server/modules/lists/ls-message2.js +1 -8
  698. package/server/modules/lists/ls-message2setting.js +1 -5
  699. package/server/modules/lists/ls-news.js +1 -7
  700. package/server/modules/lists/ls-newsfeed.js +1 -4
  701. package/server/modules/lists/ls-note.js +1 -6
  702. package/server/modules/lists/ls-okr.js +1 -5
  703. package/server/modules/lists/ls-okrdiagram.js +1 -1
  704. package/server/modules/lists/ls-opportunity.js +1 -5
  705. package/server/modules/lists/ls-options.js +1 -4
  706. package/server/modules/lists/ls-parameter.js +1 -3
  707. package/server/modules/lists/ls-participant.js +1 -10
  708. package/server/modules/lists/ls-phieudanhgia.js +1 -7
  709. package/server/modules/lists/ls-phucap.js +1 -2
  710. package/server/modules/lists/ls-profile.js +1 -1
  711. package/server/modules/lists/ls-ptthanhtoan.js +1 -3
  712. package/server/modules/lists/ls-qts-dieuchinh.js +1 -2
  713. package/server/modules/lists/ls-qts-dieuchuyen.js +1 -8
  714. package/server/modules/lists/ls-reason.js +1 -1
  715. package/server/modules/lists/ls-rpt.js +1 -5
  716. package/server/modules/lists/ls-rptform.js +1 -4
  717. package/server/modules/lists/ls-service.js +1 -3
  718. package/server/modules/lists/ls-shortcut.js +1 -1
  719. package/server/modules/lists/ls-smsaccount.js +1 -1
  720. package/server/modules/lists/ls-smssend.js +1 -3
  721. package/server/modules/lists/ls-sosanxuat.js +1 -4
  722. package/server/modules/lists/ls-step.js +1 -1
  723. package/server/modules/lists/ls-strategicdiagram.js +1 -1
  724. package/server/modules/lists/ls-strategicgoal.js +1 -3
  725. package/server/modules/lists/ls-strategickpi.js +1 -7
  726. package/server/modules/lists/ls-strategicobjective.js +1 -3
  727. package/server/modules/lists/ls-strategicplan.js +1 -6
  728. package/server/modules/lists/ls-support.js +1 -3
  729. package/server/modules/lists/ls-task.js +1 -34
  730. package/server/modules/lists/ls-taskreg.js +1 -2
  731. package/server/modules/lists/ls-tc.js +1 -1
  732. package/server/modules/lists/ls-templaterpt.js +1 -5
  733. package/server/modules/lists/ls-templatevoucher.js +1 -1
  734. package/server/modules/lists/ls-tontucthoi.js +1 -3
  735. package/server/modules/lists/ls-trangthaiapp.js +1 -3
  736. package/server/modules/lists/ls-transaction.js +1 -4
  737. package/server/modules/lists/ls-usergroup.js +1 -7
  738. package/server/modules/lists/ls-vat.js +1 -1
  739. package/server/modules/lists/ls-vatra.js +1 -5
  740. package/server/modules/lists/ls-vatvao.js +1 -6
  741. package/server/modules/lists/ls-waitevent.js +1 -1
  742. package/server/modules/lists/ls-warranty.js +1 -4
  743. package/server/modules/lists/ls_hanmucton.js +1 -3
  744. package/server/modules/lists/ls_hspb.js +1 -4
  745. package/server/modules/lists/ls_spdd_ck.js +1 -3
  746. package/server/modules/lists/ls_spdd_dk.js +1 -3
  747. package/server/modules/lists/ls_ytdd_ck.js +1 -4
  748. package/server/modules/lists/ls_ytdd_dk.js +1 -4
  749. package/server/modules/lists/sys-attend.js +1 -4
  750. package/server/modules/lists/sys-follow.js +1 -4
  751. package/server/modules/lists/sys-right.js +1 -2
  752. package/server/modules/public/app.js +1 -4
  753. package/server/modules/public/approve.js +1 -37
  754. package/server/modules/public/callin.js +1 -7
  755. package/server/modules/public/comment.js +1 -5
  756. package/server/modules/public/dmnvt.js +1 -4
  757. package/server/modules/public/dmvt.js +1 -9
  758. package/server/modules/public/file.js +1 -11
  759. package/server/modules/public/form.js +1 -7
  760. package/server/modules/public/forminfo.js +1 -1
  761. package/server/modules/public/group.js +1 -4
  762. package/server/modules/public/hlink.js +1 -3
  763. package/server/modules/public/introducecode.js +1 -1
  764. package/server/modules/public/listinfo.js +1 -1
  765. package/server/modules/public/media-webhook.js +1 -1
  766. package/server/modules/public/partner.js +1 -1
  767. package/server/modules/public/paymentCallback.js +1 -32
  768. package/server/modules/public/province.js +1 -1
  769. package/server/modules/public/ptthanhtoan.js +1 -4
  770. package/server/modules/public/subscribe.js +1 -30
  771. package/server/modules/public/support.js +1 -3
  772. package/server/modules/public/tableinfo.js +1 -1
  773. package/server/modules/public/trialinfo.js +1 -4
  774. package/server/modules/public/versioninfo.js +1 -1
  775. package/server/modules/reports/calc-tinhgiatb.js +1 -6
  776. package/server/modules/reports/calc-tinhgiathanh.js +1 -6
  777. package/server/modules/reports/calc-tinhkhauhaots.js +1 -3
  778. package/server/modules/reports/calc-tinhluong.js +1 -37
  779. package/server/modules/reports/rp-analyzedata.js +1 -6
  780. package/server/modules/reports/rp-assbonus.js +1 -4
  781. package/server/modules/reports/rp-assinterest.js +1 -8
  782. package/server/modules/reports/rp-assproductowners.js +1 -3
  783. package/server/modules/reports/rp-asssupply.js +1 -1
  784. package/server/modules/reports/rp-asstransferlog.js +1 -10
  785. package/server/modules/reports/rp-banggiatb.js +1 -3
  786. package/server/modules/reports/rp-bangtinhkhauhao.js +1 -6
  787. package/server/modules/reports/rp-baocaokhachhang.js +1 -6
  788. package/server/modules/reports/rp-bcdkt.js +1 -11
  789. package/server/modules/reports/rp-bcintroducebonus.js +1 -4
  790. package/server/modules/reports/rp-bckhtiemnang.js +1 -3
  791. package/server/modules/reports/rp-bcqt.js +1 -85
  792. package/server/modules/reports/rp-bkct.js +1 -13
  793. package/server/modules/reports/rp-bkshipbook.js +1 -8
  794. package/server/modules/reports/rp-bkvanchuyen.js +1 -8
  795. package/server/modules/reports/rp-bkvatra.js +1 -7
  796. package/server/modules/reports/rp-bkvatvao.js +1 -7
  797. package/server/modules/reports/rp-capnhatsocaitc.js +1 -4
  798. package/server/modules/reports/rp-cdpsdiem.js +1 -4
  799. package/server/modules/reports/rp-cdpsdt.js +1 -5
  800. package/server/modules/reports/rp-cdpskh.js +1 -7
  801. package/server/modules/reports/rp-cdpsnphep.js +1 -3
  802. package/server/modules/reports/rp-cdpstk.js +1 -4
  803. package/server/modules/reports/rp-chitietchitientheohoadon.js +1 -12
  804. package/server/modules/reports/rp-chitiettaisan.js +1 -13
  805. package/server/modules/reports/rp-chitietthutientheohoadon.js +1 -13
  806. package/server/modules/reports/rp-ckcn.js +1 -3
  807. package/server/modules/reports/rp-ckdiem.js +1 -2
  808. package/server/modules/reports/rp-cktk.js +1 -3
  809. package/server/modules/reports/rp-ckvt.js +1 -10
  810. package/server/modules/reports/rp-ckvttheokho.js +1 -4
  811. package/server/modules/reports/rp-ckvttheotg.js +1 -4
  812. package/server/modules/reports/rp-ckvttt.js +1 -3
  813. package/server/modules/reports/rp-congnophaithutheotuoino.js +1 -3
  814. package/server/modules/reports/rp-congnophaitratheotuoino.js +1 -3
  815. package/server/modules/reports/rp-congnosapthu.js +1 -4
  816. package/server/modules/reports/rp-congnosaptra.js +1 -4
  817. package/server/modules/reports/rp-congviectheobp.js +1 -9
  818. package/server/modules/reports/rp-congviectheodt.js +1 -8
  819. package/server/modules/reports/rp-congviectheokh.js +1 -8
  820. package/server/modules/reports/rp-congviectheonv.js +1 -9
  821. package/server/modules/reports/rp-congviectheotimeline.js +1 -6
  822. package/server/modules/reports/rp-ctbanle.js +1 -15
  823. package/server/modules/reports/rp-ctbanle2.js +1 -20
  824. package/server/modules/reports/rp-ctbanlectv.js +1 -20
  825. package/server/modules/reports/rp-ctbanlenpp.js +1 -24
  826. package/server/modules/reports/rp-ctdanhgianhanvien.js +1 -8
  827. package/server/modules/reports/rp-cthangbanbitralai.js +1 -4
  828. package/server/modules/reports/rp-ctmuahang.js +1 -7
  829. package/server/modules/reports/rp-cttralaihang.js +1 -4
  830. package/server/modules/reports/rp-databanle.js +1 -10
  831. package/server/modules/reports/rp-diemthuong.js +1 -2
  832. package/server/modules/reports/rp-dkcn.js +1 -3
  833. package/server/modules/reports/rp-dktk.js +1 -2
  834. package/server/modules/reports/rp-dsnhanviencm.js +1 -9
  835. package/server/modules/reports/rp-dsnhanvientb.js +1 -9
  836. package/server/modules/reports/rp-dtbanlekempk.js +1 -9
  837. package/server/modules/reports/rp-dtbanletheoct.js +1 -23
  838. package/server/modules/reports/rp-dtbanletheoctkempk.js +1 -25
  839. package/server/modules/reports/rp-dtbanletheokh.js +1 -20
  840. package/server/modules/reports/rp-dtbanletheokhnpp.js +1 -19
  841. package/server/modules/reports/rp-dtbanletheokho.js +1 -18
  842. package/server/modules/reports/rp-dtbanletheonam.js +1 -3
  843. package/server/modules/reports/rp-dtbanletheongay.js +1 -1
  844. package/server/modules/reports/rp-dtbanletheonpp.js +1 -23
  845. package/server/modules/reports/rp-dtbanletheonv.js +1 -19
  846. package/server/modules/reports/rp-dtbanletheoquy.js +1 -3
  847. package/server/modules/reports/rp-dtbanletheosp.js +1 -8
  848. package/server/modules/reports/rp-dtbanletheospnpp.js +1 -6
  849. package/server/modules/reports/rp-dtbanletheothang.js +1 -3
  850. package/server/modules/reports/rp-dtbanletheothungan.js +1 -12
  851. package/server/modules/reports/rp-dtbanletheovt.js +1 -2
  852. package/server/modules/reports/rp-dtbanletheovtnpp.js +1 -2
  853. package/server/modules/reports/rp-dutoanthuchitheodt.js +1 -4
  854. package/server/modules/reports/rp-getPXC2PNC.js +1 -8
  855. package/server/modules/reports/rp-getariseofaccountsbymonth.js +1 -4
  856. package/server/modules/reports/rp-getbtpb.js +1 -6
  857. package/server/modules/reports/rp-getcashbycashier.js +1 -7
  858. package/server/modules/reports/rp-getcschietkhau.js +1 -5
  859. package/server/modules/reports/rp-getdinhmuc4lenhcp.js +1 -7
  860. package/server/modules/reports/rp-getdinhmuc4pxk.js +1 -9
  861. package/server/modules/reports/rp-getdk4pht.js +1 -8
  862. package/server/modules/reports/rp-getdk4pkc.js +1 -9
  863. package/server/modules/reports/rp-getdttheoca.js +1 -5
  864. package/server/modules/reports/rp-getinvoice2pay.js +1 -4
  865. package/server/modules/reports/rp-getinvoice2receive.js +1 -4
  866. package/server/modules/reports/rp-getinvoice2return.js +1 -5
  867. package/server/modules/reports/rp-getinvoice2return_bl.js +1 -6
  868. package/server/modules/reports/rp-getkehoachmh4lenhcp.js +1 -4
  869. package/server/modules/reports/rp-getkhauhao.js +1 -7
  870. package/server/modules/reports/rp-getluong.js +1 -8
  871. package/server/modules/reports/rp-getluongchuyen.js +1 -5
  872. package/server/modules/reports/rp-getpn2fee.js +1 -5
  873. package/server/modules/reports/rp-getpn2return.js +1 -5
  874. package/server/modules/reports/rp-getthanhpham4pnk.js +1 -7
  875. package/server/modules/reports/rp-getvc2xhd.js +1 -11
  876. package/server/modules/reports/rp-gt_cpnvltt.js +1 -6
  877. package/server/modules/reports/rp-hangbanbitralai.js +1 -5
  878. package/server/modules/reports/rp-hangthanhvien.js +1 -3
  879. package/server/modules/reports/rp-hoadonbanhangtheohantt.js +1 -5
  880. package/server/modules/reports/rp-hoadonmuahangtheohantt.js +1 -5
  881. package/server/modules/reports/rp-hoahong.js +1 -15
  882. package/server/modules/reports/rp-kcsns.js +1 -19
  883. package/server/modules/reports/rp-kgchamcong.js +1 -7
  884. package/server/modules/reports/rp-khoaso.js +1 -12
  885. package/server/modules/reports/rp-kiemtrasocaitcvssocai.js +1 -6
  886. package/server/modules/reports/rp-kqdanhgianhanvien.js +1 -5
  887. package/server/modules/reports/rp-kqhdkd.js +1 -7
  888. package/server/modules/reports/rp-lcttgt.js +1 -17
  889. package/server/modules/reports/rp-lctttt.js +1 -11
  890. package/server/modules/reports/rp-linkslist.js +1 -4
  891. package/server/modules/reports/rp-phanbochitienchohoadon.js +1 -11
  892. package/server/modules/reports/rp-phanbothutienchohoadon.js +1 -10
  893. package/server/modules/reports/rp-ptbitralai.js +1 -7
  894. package/server/modules/reports/rp-ptcttct.js +1 -22
  895. package/server/modules/reports/rp-ptdonhang.js +1 -8
  896. package/server/modules/reports/rp-pttct.js +1 -49
  897. package/server/modules/reports/rp-pttctkho.js +1 -32
  898. package/server/modules/reports/rp-pttctkho2.js +1 -29
  899. package/server/modules/reports/rp-referredusers.js +1 -1
  900. package/server/modules/reports/rp-sctbhxh.js +1 -4
  901. package/server/modules/reports/rp-sctcnkh.js +1 -17
  902. package/server/modules/reports/rp-sctdiem.js +1 -3
  903. package/server/modules/reports/rp-sctdt.js +1 -7
  904. package/server/modules/reports/rp-sctdtcp.js +1 -11
  905. package/server/modules/reports/rp-sctluong.js +1 -4
  906. package/server/modules/reports/rp-sctthuetncn.js +1 -4
  907. package/server/modules/reports/rp-scttk.js +1 -7
  908. package/server/modules/reports/rp-sctvt.js +1 -5
  909. package/server/modules/reports/rp-sctvt_sl.js +1 -5
  910. package/server/modules/reports/rp-sctvtnpp.js +1 -6
  911. package/server/modules/reports/rp-sctvttt.js +1 -5
  912. package/server/modules/reports/rp-search.js +1 -4
  913. package/server/modules/reports/rp-socai.js +1 -6
  914. package/server/modules/reports/rp-socaitk.js +1 -7
  915. package/server/modules/reports/rp-sochut.js +1 -7
  916. package/server/modules/reports/rp-sokho.js +1 -7
  917. package/server/modules/reports/rp-sokhott.js +1 -5
  918. package/server/modules/reports/rp-sonkbh.js +1 -5
  919. package/server/modules/reports/rp-sonkc.js +1 -6
  920. package/server/modules/reports/rp-sonkct.js +1 -5
  921. package/server/modules/reports/rp-sonkmh.js +1 -5
  922. package/server/modules/reports/rp-sonktt.js +1 -5
  923. package/server/modules/reports/rp-soquy.js +1 -11
  924. package/server/modules/reports/rp-sosanhkhvatt.js +1 -13
  925. package/server/modules/reports/rp-sosanhkhvatt2.js +1 -6
  926. package/server/modules/reports/rp-sotaisan.js +1 -13
  927. package/server/modules/reports/rp-sotiengui.js +1 -7
  928. package/server/modules/reports/rp-taodinhmuctudkhoc.js +1 -5
  929. package/server/modules/reports/rp-thbanhangkempk.js +1 -28
  930. package/server/modules/reports/rp-thdanhgianhanvien.js +1 -9
  931. package/server/modules/reports/rp-thgt.js +1 -6
  932. package/server/modules/reports/rp-thnxt.js +1 -12
  933. package/server/modules/reports/rp-thnxt_sl.js +1 -9
  934. package/server/modules/reports/rp-thnxtnpp.js +1 -10
  935. package/server/modules/reports/rp-thnxttt.js +1 -9
  936. package/server/modules/reports/rp-tkbanhangtheogioithieu.js +1 -9
  937. package/server/modules/reports/rp-tkgioithieukh.js +1 -4
  938. package/server/modules/reports/rp-tkgtgt.js +1 -7
  939. package/server/modules/reports/rp-tmbctc.js +1 -20
  940. package/server/modules/reports/rp-tonghopbanhang.js +1 -6
  941. package/server/modules/reports/rp-tonghopmuahang.js +1 -5
  942. package/server/modules/reports/rp-tonghoptralaihang.js +1 -5
  943. package/server/modules/reports/rp-tongquanbanle.js +1 -20
  944. package/server/modules/reports/rp-tongquanbds.js +1 -3
  945. package/server/modules/reports/rp-tongquancongty.js +1 -6
  946. package/server/modules/reports/rp-tongquanctvnpp.js +1 -12
  947. package/server/modules/reports/rp-tongquannvbh.js +1 -14
  948. package/server/modules/reports/rp-tongquannvnpp.js +1 -5
  949. package/server/modules/reports/rp-uoctinhnvl.js +1 -11
  950. package/server/modules/reports/rp-wallet.js +1 -3
  951. package/server/modules/reports/rpt-tkdiemtichluy.js +1 -9
  952. package/server/modules/systems/sys-app.js +1 -30
  953. package/server/modules/systems/sys-colleague.js +1 -11
  954. package/server/modules/systems/sys-domain.js +1 -4
  955. package/server/modules/systems/sys-ecomproductlines.js +1 -1
  956. package/server/modules/systems/sys-exportexceltemplate.js +1 -4
  957. package/server/modules/systems/sys-fieldright.js +1 -3
  958. package/server/modules/systems/sys-importexceltemplate.js +1 -4
  959. package/server/modules/systems/sys-labelinfo.js +1 -4
  960. package/server/modules/systems/sys-listinfo.js +1 -10
  961. package/server/modules/systems/sys-menuinfo.js +1 -4
  962. package/server/modules/systems/sys-message.js +1 -14
  963. package/server/modules/systems/sys-moduleinfo.js +1 -4
  964. package/server/modules/systems/sys-notification.js +1 -8
  965. package/server/modules/systems/sys-quanhuyen.js +1 -4
  966. package/server/modules/systems/sys-reportinfo.js +1 -4
  967. package/server/modules/systems/sys-rptobject.js +1 -3
  968. package/server/modules/systems/sys-schedule.js +1 -11
  969. package/server/modules/systems/sys-sysconfig.js +1 -3
  970. package/server/modules/systems/sys-sysgroup.js +1 -3
  971. package/server/modules/systems/sys-tableinfo.js +1 -3
  972. package/server/modules/systems/sys-templatestore.js +1 -5
  973. package/server/modules/systems/sys-tinhthanh.js +1 -4
  974. package/server/modules/systems/sys-token.js +1 -3
  975. package/server/modules/systems/sys-trangthai.js +1 -4
  976. package/server/modules/systems/sys-trialinfo.js +1 -3
  977. package/server/modules/systems/sys-user.js +1 -45
  978. package/server/modules/systems/sys-users.js +1 -10
  979. package/server/modules/systems/sys-versioninfo.js +1 -3
  980. package/server/modules/systems/sys-vietqrbanks.js +1 -4
  981. package/server/modules/systems/sys-xaphuong.js +1 -4
  982. package/server/modules/vouchers/vo-banggiaban.js +1 -5
  983. package/server/modules/vouchers/vo-bc1.js +1 -33
  984. package/server/modules/vouchers/vo-bc5.js +1 -15
  985. package/server/modules/vouchers/vo-bg1.js +1 -10
  986. package/server/modules/vouchers/vo-bg2.js +1 -12
  987. package/server/modules/vouchers/vo-bn1.js +1 -35
  988. package/server/modules/vouchers/vo-bn5.js +1 -15
  989. package/server/modules/vouchers/vo-dh2.js +1 -35
  990. package/server/modules/vouchers/vo-dinhmucsx.js +1 -6
  991. package/server/modules/vouchers/vo-dkb.js +1 -21
  992. package/server/modules/vouchers/vo-dn0.js +1 -9
  993. package/server/modules/vouchers/vo-dnm.js +1 -21
  994. package/server/modules/vouchers/vo-hd1.js +1 -36
  995. package/server/modules/vouchers/vo-hd2.js +1 -107
  996. package/server/modules/vouchers/vo-hd3.js +1 -44
  997. package/server/modules/vouchers/vo-hd4.js +1 -13
  998. package/server/modules/vouchers/vo-hd7.js +1 -29
  999. package/server/modules/vouchers/vo-hd8.js +1 -29
  1000. package/server/modules/vouchers/vo-hde.js +1 -40
  1001. package/server/modules/vouchers/vo-htl.js +1 -11
  1002. package/server/modules/vouchers/vo-kbbtpb.js +1 -6
  1003. package/server/modules/vouchers/vo-kehoachmh.js +1 -13
  1004. package/server/modules/vouchers/vo-lenhcapphat.js +1 -10
  1005. package/server/modules/vouchers/vo-lenhsx.js +1 -12
  1006. package/server/modules/vouchers/vo-pbl.js +1 -93
  1007. package/server/modules/vouchers/vo-pc0.js +1 -14
  1008. package/server/modules/vouchers/vo-pc1.js +1 -31
  1009. package/server/modules/vouchers/vo-pc2.js +1 -24
  1010. package/server/modules/vouchers/vo-pc3.js +1 -14
  1011. package/server/modules/vouchers/vo-pc5.js +1 -15
  1012. package/server/modules/vouchers/vo-pc6.js +1 -19
  1013. package/server/modules/vouchers/vo-pcl.js +1 -7
  1014. package/server/modules/vouchers/vo-pdn.js +1 -11
  1015. package/server/modules/vouchers/vo-pdx.js +1 -9
  1016. package/server/modules/vouchers/vo-pgh.js +1 -19
  1017. package/server/modules/vouchers/vo-pht.js +1 -7
  1018. package/server/modules/vouchers/vo-pkc.js +1 -7
  1019. package/server/modules/vouchers/vo-pkh.js +1 -10
  1020. package/server/modules/vouchers/vo-pkk.js +1 -12
  1021. package/server/modules/vouchers/vo-pkt.js +1 -13
  1022. package/server/modules/vouchers/vo-pn1.js +1 -33
  1023. package/server/modules/vouchers/vo-pn2.js +1 -16
  1024. package/server/modules/vouchers/vo-pn3.js +1 -18
  1025. package/server/modules/vouchers/vo-pn5.js +1 -19
  1026. package/server/modules/vouchers/vo-pn6.js +1 -18
  1027. package/server/modules/vouchers/vo-pn9.js +1 -22
  1028. package/server/modules/vouchers/vo-pnc.js +1 -20
  1029. package/server/modules/vouchers/vo-pnh.js +1 -20
  1030. package/server/modules/vouchers/vo-pnk.js +1 -14
  1031. package/server/modules/vouchers/vo-pnknpp.js +1 -12
  1032. package/server/modules/vouchers/vo-po1.js +1 -15
  1033. package/server/modules/vouchers/vo-ppb.js +1 -8
  1034. package/server/modules/vouchers/vo-pt1.js +1 -21
  1035. package/server/modules/vouchers/vo-pt5.js +1 -15
  1036. package/server/modules/vouchers/vo-ptl.js +1 -8
  1037. package/server/modules/vouchers/vo-purchase_contract.js +1 -9
  1038. package/server/modules/vouchers/vo-pxc.js +1 -22
  1039. package/server/modules/vouchers/vo-pxh.js +1 -28
  1040. package/server/modules/vouchers/vo-pxk.js +1 -15
  1041. package/server/modules/vouchers/vo-pxknpp.js +1 -14
  1042. package/server/modules/vouchers/vo-qts.js +1 -12
  1043. package/server/modules/vouchers/vo-sale_contract.js +1 -11
  1044. package/server/modules/vouchers/vo-shipbook.js +1 -17
  1045. package/server/modules/vouchers/vo-so1.js +1 -126
  1046. package/server/modules/vouchers/vo-so2.js +1 -37
  1047. package/server/modules/vouchers/vo-so3.js +1 -41
  1048. package/server/modules/vouchers/vo-so5.js +1 -57
  1049. package/server/modules/vouchers/vo-so7.js +1 -97
  1050. package/server/modules/vouchers/vo-so9.js +1 -119
  1051. package/server/modules/vouchers/vo-vanchuyen.js +1 -14
  1052. package/server/modules/vouchers/vo-xhd.js +1 -33
  1053. package/server/route.js +1 -51
  1054. package/server/services/invoiceFetcher.js +1 -15
  1055. package/server/sslConfig.js +1 -2
  1056. package/server/transactionMiddleware.js +1 -5
  1057. package/server/workers/backupApp.js +1 -9
  1058. package/server/workers/calcGrid.js +1 -9
  1059. package/server/workers/customerOnImport.js +1 -8
  1060. package/server/workers/dmvtOnImport.js +1 -9
  1061. package/server/workers/excelParser.js +1 -9
  1062. package/server/workers/inputWorker.js +1 -6
  1063. package/server/workers/pushNotify.js +1 -10
  1064. package/server/workers/reportWorker.js +1 -7
  1065. package/server/workers/restoreApp.js +1 -23
  1066. package/server/workers/runScript.js +1 -4
  1067. package/server/workers/sendEmail.js +1 -13
  1068. package/server/workers/webhook.js +1 -5
@@ -1,19 +1 @@
1
- const assbankSchema=new Schema({id_app:{type:String,required:!0},address:{type:String,required:!0,maxlength:2024,trim:!0},denom:{type:String,required:!0},amount:{type:Number,default:0}});(global.configs||{}).createIndexes&&(assbankSchema.index({id_app:1}),assbankSchema.index({address:1}),assbankSchema.index({denom:1}),assbankSchema.index({id_app:1,address:1,denom:1},{unique:!0}));const model=mongoose.models.assbank||mongoose.model("assbank",assbankSchema);
2
- model.getSystemAddress=()=>`${(global.configs||{}).ADDRESS_PREFIX||""}system`;model.getBalance=async($id_app$$,$address$$,$denom$$)=>(await model.find({id_app:$id_app$$,address:$address$$,denom:$denom$$}).lean()).map($b$$=>$b$$.amount).reduce(($a$$,$b$$)=>$a$$+$b$$,0);
3
- model.getBalances=async($id_app$$,$address$$="",$denom$$="")=>{$id_app$$={id_app:$id_app$$,amount:{$gt:0}};$address$$&&($id_app$$.address=$address$$);$denom$$&&($id_app$$.denom=$denom$$);return(await model.find($id_app$$).lean()).map($b$$=>{const {address:$address$$,denom:$denom$$,amount:$amount$$}=$b$$;return{address:$address$$,denom:$denom$$,amount:$amount$$}})};
4
- model.getSupply=async($id_app$$,$denom$$)=>(await model.find({id_app:$id_app$$,denom:$denom$$}).lean()).map($b$$=>$b$$.amount).reduce(($a$$,$b$$)=>$a$$+$b$$,0);model.getSupplies=async $id_app$$=>await (await model.find({id_app:$id_app$$}).lean()).asyncGroupBy(["denom"],["amount"]);
5
- model.getInvestBalances=async($id_app$jscomp$4_query$$,$address$$="",$token$$="")=>{let $bl$$=(await model.getBalances($id_app$jscomp$4_query$$,$address$$,$token$$)).filter($b$$=>$b$$.address!=model.getSystemAddress());$bl$$.forEach($b$$=>{$b$$.location="wallet"});$id_app$jscomp$4_query$$={id_app:$id_app$jscomp$4_query$$,trang_thai:"0",con_lai:{$gt:0}};$address$$&&($id_app$jscomp$4_query$$.creator=$address$$);$token$$&&($id_app$jscomp$4_query$$.token=$token$$);$address$$=(await global.getModel("asssell").find($id_app$jscomp$4_query$$).lean()).map($s$$=>
6
- ({amount:$s$$.con_lai,denom:$s$$.token,address:$s$$.creator,location:"market"}));$bl$$=[...$bl$$,...$address$$];return await $bl$$.asyncGroupBy(["address","denom","location"],["amount"])};
7
- model.sendCoins=async($id_app$$,$from_address$$,$to_address$$,$amount$$,$denom$$,$data$$={})=>{if($amount$$=Number($amount$$)){if(!($id_app$$&&$from_address$$&&$to_address$$&&$denom$$))throw console.error("Kh\u00f4ng th\u1ec3 g\u1eedi token do l\u1ec7nh g\u1eedi thi\u1ebfu m\u1ed9t trong nh\u1eefng tham s\u1ed1 sau: id_app,from_address,to_address,amount,denom",{id_app:$id_app$$,from_address:$from_address$$,to_address:$to_address$$,amount:$amount$$,denom:$denom$$,data:$data$$}),"Kh\u00f4ng th\u1ec3 g\u1eedi token";
8
- $data$$.from_address=$from_address$$;$data$$.to_address=$to_address$$;$data$$.amount=$amount$$;$data$$.denom=$denom$$;var {creator:$creator$$}=$data$$;$creator$$||=$from_address$$;var {event:$event$$}=$data$$;$event$$||="SENDCOINS";var {memo:$memo$$}=$data$$;$memo$$||="Send coins";var $receiver_bank_sender_bank$$=await model.findOne({id_app:$id_app$$,address:$from_address$$,denom:$denom$$});if(!$receiver_bank_sender_bank$$||$receiver_bank_sender_bank$$.amount<$amount$$)throw`V\u00ed ${$from_address$$} kh\u00f4ng c\u00f3 \u0111\u1ee7 ${$amount$$} ${$denom$$}`;
9
- $receiver_bank_sender_bank$$.amount-=$amount$$;await $receiver_bank_sender_bank$$.save();($receiver_bank_sender_bank$$=await model.findOne({id_app:$id_app$$,address:$to_address$$,denom:$denom$$}))||($receiver_bank_sender_bank$$=new model({id_app:$id_app$$,address:$to_address$$,denom:$denom$$}));$receiver_bank_sender_bank$$.amount+=$amount$$;await $receiver_bank_sender_bank$$.save();await global.getModel("asstransaction").createTransaction({id_app:$id_app$$,creator:$creator$$,event:$event$$,memo:$memo$$,
10
- data:$data$$});(await global.getModel("asskey").find({id_app:$id_app$$,address:$from_address$$}).lean()).forEach($u$$=>{let $title$$=$memo$$;$title$$||=`TK ${$u$$.name}(address:${$u$$.address}) -${$amount$$}${$denom$$}`;global.getModel("user").emitEvent($u$$.username,"blockchain.wallet.changed",{id_app:$id_app$$,title:$title$$,receiver:$to_address$$,sender:$from_address$$,data:{amount:$amount$$,denom:$denom$$}})});(await global.getModel("asskey").find({id_app:$id_app$$,address:$from_address$$}).lean()).forEach($u$$=>
11
- {let $title$$=$memo$$;$title$$||=`TK ${$u$$.name}(address:${$u$$.address}) +${$amount$$}${$denom$$}`;global.getModel("user").emitEvent($u$$.username,"blockchain.wallet.changed",{id_app:$id_app$$,title:$title$$,receiver:$to_address$$,sender:$from_address$$,data:{amount:$amount$$,denom:$denom$$}})})}};
12
- model.sendCoinsFromAccountToSystem=async($id_app$$,$from_address$$,$amount$$,$denom$$,$data$$={})=>{$data$$.creator=$data$$.creator||$from_address$$;let $to_address$$=model.getSystemAddress();return model.sendCoins($id_app$$,$from_address$$,$to_address$$,$amount$$,$denom$$,$data$$)};
13
- model.sendCoinsFromSystemToAccount=async($id_app$$,$to_address$$,$amount$$,$denom$$,$data$$={})=>{let $from_address$$=model.getSystemAddress();$data$$.creator=$data$$.creator||$to_address$$;return model.sendCoins($id_app$$,$from_address$$,$to_address$$,$amount$$,$denom$$,$data$$)};
14
- model.mintCoins=async($id_app$$,$creator$$,$amount$$,$denom$$,$data$jscomp$3_u$$={},$options$$={push_notify:!0})=>{if($amount$$){var $event$jscomp$1_receiver_bank$jscomp$1_title$$=await model.findOne({id_app:$id_app$$,address:$creator$$,denom:$denom$$});$event$jscomp$1_receiver_bank$jscomp$1_title$$||=new model({id_app:$id_app$$,address:$creator$$,denom:$denom$$,amount:0});$event$jscomp$1_receiver_bank$jscomp$1_title$$.amount+=$amount$$;await $event$jscomp$1_receiver_bank$jscomp$1_title$$.save();
15
- $data$jscomp$3_u$$.to_address=$creator$$;$data$jscomp$3_u$$.amount=$amount$$;$data$jscomp$3_u$$.denom=$denom$$;({event:$event$jscomp$1_receiver_bank$jscomp$1_title$$}=$data$jscomp$3_u$$);$event$jscomp$1_receiver_bank$jscomp$1_title$$||="MINT";var {memo:$memo$$}=$data$jscomp$3_u$$;$memo$$||="Mint coins";await global.getModel("asstransaction").createTransaction({id_app:$id_app$$,creator:$creator$$,event:$event$jscomp$1_receiver_bank$jscomp$1_title$$,memo:$memo$$,data:$data$jscomp$3_u$$});if($data$jscomp$3_u$$=
16
- await global.getModel("asskey").findOne({id_app:$id_app$$,address:$creator$$}).lean())$event$jscomp$1_receiver_bank$jscomp$1_title$$=`TK ${$data$jscomp$3_u$$.name}(address:${$data$jscomp$3_u$$.address}) +${$amount$$}${$denom$$}`,global.getModel("user").emitEvent($data$jscomp$3_u$$.username,"blockchain.wallet.changed",{id_app:$id_app$$,title:$event$jscomp$1_receiver_bank$jscomp$1_title$$,receiver:$creator$$,data:{amount:$amount$$,denom:$denom$$}},$options$$.push_notify)}};const {isSupperAdmin}=require("../libs/utils");
17
- model.issueCoins=async($user$$,$data$$)=>{let $creator$$=$data$$.creator;if(!await global.getModel("asskey").findOne({id_app:$user$$.current_id_app,username:$user$$.email,address:$creator$$}).lean())throw"\u0110\u1ecba ch\u1ec9 v\u00ed n\u00e0y kh\u00f4ng thu\u1ed9c v\u1ec1 b\u1ea1n";if(global.configs.MAIN_DENOM==$data$$.denom){if(!isSupperAdmin($user$$.email.toLowerCase()))throw"Ch\u1ec9 ng\u01b0\u1eddi qu\u1ea3n tr\u1ecb h\u1ec7 th\u1ed1ng m\u1edbi c\u00f3 quy\u1ec1n ph\u00e1t h\u00e0nh token n\u00e0y";
18
- }else if(await model.getBalance($user$$.current_id_app,$creator$$,global.configs.MAIN_DENOM)<1)throw"B\u1ea1n kh\u00f4ng \u0111\u1ee7 s\u1ed1 d\u01b0 token h\u1ec7 th\u1ed1ng \u0111\u1ec3 ph\u00e1t h\u00e0nh token n\u00e0y";try{global.configs.MAIN_DENOM!==$data$$.denom&&await model.sendCoinsFromAccountToSystem($user$$.current_id_app,$creator$$,1,global.configs.MAIN_DENOM,{...$data$$,memo:`S\u1eed d\u1ee5ng 1${global.configs.MAIN_DENOM} \u0111\u1ec3 ph\u00e1t h\u00e0nh ${$data$$.amount}${$data$$.denom}`})}catch($e$$){throw console.error("can't spend main coins to mining new coin",
19
- $e$$),$e$$;}try{await model.mintCoins($user$$.current_id_app,$creator$$,$data$$.amount,$data$$.denom,{...$data$$,memo:"Ph\u00e1t h\u00e0nh token",event:"ISSUE"})}catch($e$$){throw console.error("can't mint coins",$e$$),$e$$;}return $data$$};module.exports=model;
1
+ const _0x592100=_0x13d5;function _0x13d5(_0x530867,_0x3af789){const _0x1e4825=_0x1e48();return _0x13d5=function(_0x13d51a,_0x5a963d){_0x13d51a=_0x13d51a-0xd8;let _0x6d4d66=_0x1e4825[_0x13d51a];if(_0x13d5['glHgjz']===undefined){var _0x2efa23=function(_0x83a06a){const _0x312852='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3fe768='',_0x12483c='';for(let _0x4cc1c4=0x0,_0x7892ff,_0x3062c8,_0x422e01=0x0;_0x3062c8=_0x83a06a['charAt'](_0x422e01++);~_0x3062c8&&(_0x7892ff=_0x4cc1c4%0x4?_0x7892ff*0x40+_0x3062c8:_0x3062c8,_0x4cc1c4++%0x4)?_0x3fe768+=String['fromCharCode'](0xff&_0x7892ff>>(-0x2*_0x4cc1c4&0x6)):0x0){_0x3062c8=_0x312852['indexOf'](_0x3062c8);}for(let _0x579ea6=0x0,_0x341ff6=_0x3fe768['length'];_0x579ea6<_0x341ff6;_0x579ea6++){_0x12483c+='%'+('00'+_0x3fe768['charCodeAt'](_0x579ea6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x12483c);};_0x13d5['GfUPqP']=_0x2efa23,_0x530867=arguments,_0x13d5['glHgjz']=!![];}const _0x19ab72=_0x1e4825[0x0],_0x5ca851=_0x13d51a+_0x19ab72,_0x3e0b4a=_0x530867[_0x5ca851];return!_0x3e0b4a?(_0x6d4d66=_0x13d5['GfUPqP'](_0x6d4d66),_0x530867[_0x5ca851]=_0x6d4d66):_0x6d4d66=_0x3e0b4a,_0x6d4d66;},_0x13d5(_0x530867,_0x3af789);}(function(_0x52c946,_0x15d17d){const _0xdfa2b1=_0x13d5,_0x2ffcae=_0x52c946();while(!![]){try{const _0x4bbe58=parseInt(_0xdfa2b1(0x149))/0x1+parseInt(_0xdfa2b1(0x12d))/0x2+parseInt(_0xdfa2b1(0x13a))/0x3+-parseInt(_0xdfa2b1(0xf4))/0x4+parseInt(_0xdfa2b1(0xe2))/0x5*(parseInt(_0xdfa2b1(0x13d))/0x6)+-parseInt(_0xdfa2b1(0x111))/0x7+-parseInt(_0xdfa2b1(0xf5))/0x8*(parseInt(_0xdfa2b1(0x139))/0x9);if(_0x4bbe58===_0x15d17d)break;else _0x2ffcae['push'](_0x2ffcae['shift']());}catch(_0x21231d){_0x2ffcae['push'](_0x2ffcae['shift']());}}}(_0x1e48,0x5381e));const assbankSchema=new Schema({'id_app':{'type':String,'required':!![]},'address':{'type':String,'required':!![],'maxlength':0x7e8,'trim':!![]},'denom':{'type':String,'required':!![]},'amount':{'type':Number,'default':0x0}});(global[_0x592100(0x128)]||{})[_0x592100(0x118)]&&(assbankSchema[_0x592100(0x117)]({'id_app':0x1}),assbankSchema[_0x592100(0x117)]({'address':0x1}),assbankSchema[_0x592100(0x117)]({'denom':0x1}),assbankSchema[_0x592100(0x117)]({'id_app':0x1,'address':0x1,'denom':0x1},{'unique':!![]}));const model=mongoose[_0x592100(0x102)][_0x592100(0xda)]||mongoose['model'](_0x592100(0xda),assbankSchema);model[_0x592100(0xdf)]=()=>{const _0x35a454=_0x592100;return((global[_0x35a454(0x128)]||{})['ADDRESS_PREFIX']||'')+'system';},model[_0x592100(0xf7)]=async(_0x3c2bf8,_0x351633,_0x89d564)=>{const _0x561700=_0x592100;let _0x5268c9=await model[_0x561700(0xee)]({'id_app':_0x3c2bf8,'address':_0x351633,'denom':_0x89d564})[_0x561700(0x12f)]();return _0x5268c9['map'](_0x4bed1c=>_0x4bed1c[_0x561700(0xff)])[_0x561700(0xe7)]((_0x541b5c,_0x4aee4f)=>_0x541b5c+_0x4aee4f,0x0);},model['getBalances']=async(_0x486f47,_0x4510bc='',_0x592a40='')=>{const _0x24e522=_0x592100;let _0x4b4b88={'id_app':_0x486f47,'amount':{'$gt':0x0}};if(_0x4510bc)_0x4b4b88[_0x24e522(0x143)]=_0x4510bc;if(_0x592a40)_0x4b4b88[_0x24e522(0x133)]=_0x592a40;let _0x580493=await model[_0x24e522(0xee)](_0x4b4b88)[_0x24e522(0x12f)]();return _0x580493[_0x24e522(0xd8)](_0x34622c=>{const {address:_0x2854de,denom:_0x38c4b1,amount:_0x452a42}=_0x34622c;return{'address':_0x2854de,'denom':_0x38c4b1,'amount':_0x452a42};});},model[_0x592100(0x134)]=async(_0x5016bd,_0x119668)=>{const _0x1830f7=_0x592100;let _0x2bc395=await model[_0x1830f7(0xee)]({'id_app':_0x5016bd,'denom':_0x119668})[_0x1830f7(0x12f)]();return _0x2bc395[_0x1830f7(0xd8)](_0x1486db=>_0x1486db[_0x1830f7(0xff)])[_0x1830f7(0xe7)]((_0xa96d6e,_0x372242)=>_0xa96d6e+_0x372242,0x0);},model[_0x592100(0x119)]=async _0x503a62=>{const _0x5e457f=_0x592100,_0x1b6047={'WPizj':_0x5e457f(0x133),'jgXsJ':_0x5e457f(0xff)};let _0x58b6cf=await model['find']({'id_app':_0x503a62})[_0x5e457f(0x12f)]();return await _0x58b6cf[_0x5e457f(0xdc)]([_0x1b6047[_0x5e457f(0x105)]],[_0x1b6047[_0x5e457f(0x148)]]);},model['getInvestBalances']=async(_0x1620d2,_0x36916e='',_0x5522e5='')=>{const _0x1290c4=_0x592100,_0x41d208={'SNXgn':'wallet','QcCdz':'can\x27t\x20mint\x20coins','ninrU':function(_0x4e06bc,_0x41eea6){return _0x4e06bc===_0x41eea6;},'HnYCo':_0x1290c4(0xe9),'pLNOe':_0x1290c4(0x112),'YvtwD':_0x1290c4(0xfc),'gyyzp':_0x1290c4(0xf0),'Rtwmx':_0x1290c4(0x143),'tcuHa':_0x1290c4(0x133)};let _0x232c38=(await model[_0x1290c4(0xe5)](_0x1620d2,_0x36916e,_0x5522e5))[_0x1290c4(0xe4)](_0x244d67=>_0x244d67['address']!=model[_0x1290c4(0xdf)]());_0x232c38[_0x1290c4(0x10a)](_0x119f3c=>{const _0x3b1d36=_0x1290c4;_0x119f3c[_0x3b1d36(0x114)]=_0x41d208[_0x3b1d36(0x106)];});let _0x17676d={'id_app':_0x1620d2,'trang_thai':'0','con_lai':{'$gt':0x0}};if(_0x36916e)_0x17676d[_0x1290c4(0xec)]=_0x36916e;if(_0x5522e5)_0x17676d[_0x1290c4(0xfd)]=_0x5522e5;let _0x1aa13a=(await global[_0x1290c4(0x103)](_0x41d208['gyyzp'])[_0x1290c4(0xee)](_0x17676d)[_0x1290c4(0x12f)]())['map'](_0x229b4a=>{const _0x287011=_0x1290c4,_0x109904={'TsLpZ':_0x41d208[_0x287011(0x10b)]};if(_0x41d208['ninrU'](_0x41d208[_0x287011(0xf6)],_0x41d208[_0x287011(0xde)])){_0x40ac8f[_0x287011(0x13f)](_0x109904[_0x287011(0x115)],_0x4519d4);throw _0x447df6;}else return{'amount':_0x229b4a[_0x287011(0xfa)],'denom':_0x229b4a['token'],'address':_0x229b4a[_0x287011(0xec)],'location':_0x41d208[_0x287011(0xf2)]};});return _0x232c38=[..._0x232c38,..._0x1aa13a],await _0x232c38[_0x1290c4(0xdc)]([_0x41d208[_0x1290c4(0x124)],_0x41d208[_0x1290c4(0xdd)],_0x1290c4(0x114)],[_0x1290c4(0xff)]);},model[_0x592100(0x11a)]=async(_0x430469,_0x61d4fd,_0x537225,_0x33ff36,_0x12baf5,_0x14dec1={})=>{const _0x1bd6c6=_0x592100,_0x23fbcf={'MVDTf':_0x1bd6c6(0xf1),'weCdF':_0x1bd6c6(0x11d),'VZHDn':function(_0xffd25,_0x187636){return _0xffd25===_0x187636;},'QMywC':'CfJQy','jIcjt':'Không\x20thể\x20gửi\x20token\x20do\x20lệnh\x20gửi\x20thiếu\x20một\x20trong\x20những\x20tham\x20số\x20sau:\x20id_app,from_address,to_address,amount,denom','eLtrp':'Không\x20thể\x20gửi\x20token','PRzLF':'SENDCOINS','tZTkd':'Send\x20coins','eAJXb':_0x1bd6c6(0xfe)};_0x33ff36=Number(_0x33ff36);if(!_0x33ff36)return;if(!_0x430469||!_0x61d4fd||!_0x537225||!_0x12baf5){console['error'](_0x23fbcf[_0x1bd6c6(0xf9)],{'id_app':_0x430469,'from_address':_0x61d4fd,'to_address':_0x537225,'amount':_0x33ff36,'denom':_0x12baf5,'data':_0x14dec1});throw _0x23fbcf['eLtrp'];}_0x14dec1['from_address']=_0x61d4fd,_0x14dec1[_0x1bd6c6(0x147)]=_0x537225,_0x14dec1[_0x1bd6c6(0xff)]=_0x33ff36,_0x14dec1['denom']=_0x12baf5;let {creator:_0x40db32}=_0x14dec1;if(!_0x40db32)_0x40db32=_0x61d4fd;let {event:_0x2ffa2f}=_0x14dec1;if(!_0x2ffa2f)_0x2ffa2f=_0x23fbcf[_0x1bd6c6(0x11c)];let {memo:_0x44e3ba}=_0x14dec1;if(!_0x44e3ba)_0x44e3ba=_0x23fbcf[_0x1bd6c6(0x12a)];let _0x3a02fe=await model['findOne']({'id_app':_0x430469,'address':_0x61d4fd,'denom':_0x12baf5});if(!_0x3a02fe||_0x3a02fe[_0x1bd6c6(0xff)]<_0x33ff36)throw'Ví\x20'+_0x61d4fd+'\x20không\x20có\x20đủ\x20'+_0x33ff36+'\x20'+_0x12baf5;_0x3a02fe['amount']=_0x3a02fe[_0x1bd6c6(0xff)]-_0x33ff36,await _0x3a02fe['save']();let _0x2ba085=await model[_0x1bd6c6(0xe8)]({'id_app':_0x430469,'address':_0x537225,'denom':_0x12baf5});!_0x2ba085&&(_0x2ba085=new model({'id_app':_0x430469,'address':_0x537225,'denom':_0x12baf5}));_0x2ba085[_0x1bd6c6(0xff)]=_0x2ba085['amount']+_0x33ff36,await _0x2ba085[_0x1bd6c6(0x145)](),await global[_0x1bd6c6(0x103)](_0x1bd6c6(0x13c))[_0x1bd6c6(0x12e)]({'id_app':_0x430469,'creator':_0x40db32,'event':_0x2ffa2f,'memo':_0x44e3ba,'data':_0x14dec1});const _0x473d05=await global[_0x1bd6c6(0x103)](_0x23fbcf[_0x1bd6c6(0x127)])[_0x1bd6c6(0xee)]({'id_app':_0x430469,'address':_0x61d4fd})[_0x1bd6c6(0x12f)]();_0x473d05[_0x1bd6c6(0x10a)](_0x277c6d=>{const _0x4fb910=_0x1bd6c6;let _0x1485b6=_0x44e3ba;if(!_0x1485b6)_0x1485b6=_0x4fb910(0x122)+_0x277c6d[_0x4fb910(0x12b)]+_0x4fb910(0xe6)+_0x277c6d[_0x4fb910(0x143)]+_0x4fb910(0x120)+_0x33ff36+_0x12baf5;global['getModel'](_0x23fbcf['MVDTf'])[_0x4fb910(0x100)](_0x277c6d[_0x4fb910(0x125)],_0x23fbcf['weCdF'],{'id_app':_0x430469,'title':_0x1485b6,'receiver':_0x537225,'sender':_0x61d4fd,'data':{'amount':_0x33ff36,'denom':_0x12baf5}});});const _0x109786=await global[_0x1bd6c6(0x103)](_0x23fbcf['eAJXb'])['find']({'id_app':_0x430469,'address':_0x61d4fd})[_0x1bd6c6(0x12f)]();_0x109786['forEach'](_0x41576b=>{const _0x364699=_0x1bd6c6;if(_0x23fbcf[_0x364699(0x13e)](_0x23fbcf[_0x364699(0xeb)],_0x364699(0xe3))){let _0x113df6=_0x831ed4[_0x364699(0xdf)]();return _0x105c42[_0x364699(0xec)]=_0x1232eb[_0x364699(0xec)]||_0x585745,_0x6637d9[_0x364699(0x11a)](_0x4b54f3,_0x113df6,_0x41fdd2,_0x360f8e,_0x1960b9,_0x51d6ef);}else{let _0x59173e=_0x44e3ba;if(!_0x59173e)_0x59173e='TK\x20'+_0x41576b[_0x364699(0x12b)]+_0x364699(0xe6)+_0x41576b['address']+_0x364699(0x10f)+_0x33ff36+_0x12baf5;global[_0x364699(0x103)](_0x23fbcf['MVDTf'])[_0x364699(0x100)](_0x41576b[_0x364699(0x125)],_0x23fbcf[_0x364699(0x140)],{'id_app':_0x430469,'title':_0x59173e,'receiver':_0x537225,'sender':_0x61d4fd,'data':{'amount':_0x33ff36,'denom':_0x12baf5}});}});},model[_0x592100(0x113)]=async(_0x2c9d1f,_0x5f4afa,_0x34ca57,_0x54c6f5,_0x2d5bf6={})=>{const _0x40e92c=_0x592100;_0x2d5bf6[_0x40e92c(0xec)]=_0x2d5bf6[_0x40e92c(0xec)]||_0x5f4afa;let _0xfda587=model[_0x40e92c(0xdf)]();return model[_0x40e92c(0x11a)](_0x2c9d1f,_0x5f4afa,_0xfda587,_0x34ca57,_0x54c6f5,_0x2d5bf6);},model['sendCoinsFromSystemToAccount']=async(_0x217c0e,_0x17aa33,_0x243362,_0x1b5f68,_0x3d3630={})=>{const _0x415104=_0x592100;let _0x129634=model[_0x415104(0xdf)]();return _0x3d3630[_0x415104(0xec)]=_0x3d3630[_0x415104(0xec)]||_0x17aa33,model[_0x415104(0x11a)](_0x217c0e,_0x129634,_0x17aa33,_0x243362,_0x1b5f68,_0x3d3630);},model[_0x592100(0x13b)]=async(_0x20ded5,_0x5f2c99,_0x129e46,_0x24cb93,_0x8dc6ee={},_0x4658fd={'push_notify':!![]})=>{const _0x15a0fc=_0x592100,_0x50b3d8={'FSojp':function(_0x5cfcb1,_0x47710b){return _0x5cfcb1+_0x47710b;},'zjdlw':_0x15a0fc(0xed),'EpZJl':_0x15a0fc(0x13c),'AExuf':_0x15a0fc(0xfe),'NKNub':_0x15a0fc(0xf1),'opPNM':'blockchain.wallet.changed'};if(!_0x129e46)return;let _0x792233=await model[_0x15a0fc(0xe8)]({'id_app':_0x20ded5,'address':_0x5f2c99,'denom':_0x24cb93});!_0x792233&&(_0x792233=new model({'id_app':_0x20ded5,'address':_0x5f2c99,'denom':_0x24cb93,'amount':0x0}));_0x792233[_0x15a0fc(0xff)]=_0x50b3d8[_0x15a0fc(0x109)](_0x792233['amount'],_0x129e46),await _0x792233[_0x15a0fc(0x145)](),_0x8dc6ee[_0x15a0fc(0x147)]=_0x5f2c99,_0x8dc6ee[_0x15a0fc(0xff)]=_0x129e46,_0x8dc6ee[_0x15a0fc(0x133)]=_0x24cb93;let {event:_0x42d980}=_0x8dc6ee;if(!_0x42d980)_0x42d980=_0x50b3d8[_0x15a0fc(0xf3)];let {memo:_0x210086}=_0x8dc6ee;if(!_0x210086)_0x210086='Mint\x20coins';await global['getModel'](_0x50b3d8[_0x15a0fc(0x135)])[_0x15a0fc(0x12e)]({'id_app':_0x20ded5,'creator':_0x5f2c99,'event':_0x42d980,'memo':_0x210086,'data':_0x8dc6ee});const _0x56bc44=await global['getModel'](_0x50b3d8[_0x15a0fc(0x146)])[_0x15a0fc(0xe8)]({'id_app':_0x20ded5,'address':_0x5f2c99})[_0x15a0fc(0x12f)]();if(_0x56bc44){let _0x3afecb=_0x15a0fc(0x122)+_0x56bc44[_0x15a0fc(0x12b)]+_0x15a0fc(0xe6)+_0x56bc44[_0x15a0fc(0x143)]+')\x20+'+_0x129e46+_0x24cb93;global[_0x15a0fc(0x103)](_0x50b3d8[_0x15a0fc(0x110)])['emitEvent'](_0x56bc44[_0x15a0fc(0x125)],_0x50b3d8[_0x15a0fc(0x132)],{'id_app':_0x20ded5,'title':_0x3afecb,'receiver':_0x5f2c99,'data':{'amount':_0x129e46,'denom':_0x24cb93}},_0x4658fd[_0x15a0fc(0x101)]);}};function _0x1e48(){const _0x50f44f=['yxnZDhjHBNnHy3rPB24','nJm2nNLksenODG','vLPirg4','zxjYB3i','D2vdzey','Eu92sgi','EKXZruG','ywrKCMvZCW','tuL4qxC','C2f2zq','quv4Dwy','Dg9FywrKCMvZCW','AMDyC0O','nJq5ndqXrhnjrvnM','svntvuu','vfb3qKm','wujTtvy','BwfW','ugJdOxqGAmoGBMGGDg9Rzw4','yxnZyMfUAW','imsr4BUdihbOW6f0igJdOg5Oia','yxn5BMnhCM91Cej5','Dgn1sge','CeXot2u','z2v0u3LZDgvTqwrKCMvZCW','zw1HAwW','Eermywy','mZiXnurWCgTnra','BMLowuO','zMLSDgvY','z2v0qMfSyw5Jzxm','kgfKzhjLC3m6','CMvKDwnL','zMLUze9Uzq','qM1Uzgu','y2fUj3qGBwLUDcbJB2LUCW','uu15D0m','y3jLyxrVCG','tuLova','zMLUza','Ae5YCxe','yxnZC2vSBa','DxnLCG','wxz0D0q','EMPKBhC','mZiYnJaWt1rwqvn2','odeXndqWohzxs05frq','sg5zq28','z2v0qMfSyw5Jzq','z3Potxu','AKLJANq','y29Ux2XHAq','qUg6Ow4GA2JdTg5Nimsr4BUNihpHU5eGzmAWihrVA2vUigJHU4CGDgJHU5fUzYdeKEg7GYbWAmoHDcbOW6bUAcb0B2TLBIbUW6b5','BwfYA2v0','Dg9Rzw4','yxnZA2v5','yw1VDw50','zw1PDev2zw50','ChvZAf9UB3rPzNK','Bw9KzwXZ','z2v0tw9KzwW','DeXhvgq','v1bPEMO','u05yz24','shfYvfu','sw1xu28','rLnVANa','zM9YrwfJAa','uwndzhO','s2JdTg5NihrO4BUdigFHU61PihrVA2vU','AxnZDwvdB2LUCW','zxHWB3j0CW','ksaR','tKToDwi','mJmXotq5mLD3twDMDW','s2nPv0K','C2vUzenVAw5ZrNjVBufJy291BNruB1n5C3rLBq','Bg9JyxrPB24','vhnmCfO','tufjtL9eru5ptq','Aw5KzxG','y3jLyxrLsw5KzxHLCW','z2v0u3vWCgXPzxm','C2vUzenVAw5Z','s2JdTg5NihrO4BUdigFHU61PihrVA2vUigrVigZHU4DUAcbN4BUTAsb0AgNHUR91ig3HU5L0ihrYB25Nig5O4BUVBMCGDgHHBsbZ4BUrihnHDtOGAwrFyxbWlgzYB21FywrKCMvZCYX0B19HzgrYzxnZlgfTB3vUDcXKzw5VBq','ufj6tey','yMXVy2TJAgfPBI53ywXSzxqUy2HHBMDLza','y2fUj3qGC3bLBMqGBwfPBIbJB2LUCYb0BYbTAw5PBMCGBMv3ignVAw4','u+g7RsbK4BULBMCGmq','ksaT','uLzhuhm','veSG','Aun0v2y','uNr3BxG','DxnLCM5HBwu','DvfZvvy','zufkwgi','y29UzMLNCW','rvndAMu','DfPuA2q','BMfTzq','lI4VBgLICY91DgLSCW','mtiWmtK0s0XHzwHt','y3jLyxrLvhjHBNnHy3rPB24','BgvHBG','Dg9mB3DLCKnHC2u','uM5hB3K','B3bqtK0','zgvUB20','z2v0u3vWCgX5','rxbAsMW','DxHvAfi','y3vYCMvUDf9Pzf9HCha','q0z5Dxi','owjqqLDXCW','mteYotC3nLPZA29ewG','BwLUDenVAw5Z'];_0x1e48=function(){return _0x50f44f;};return _0x1e48();}const {isSupperAdmin}=require(_0x592100(0x12c));model[_0x592100(0x10d)]=async(_0x4ec45d,_0x37951b)=>{const _0x6bc546=_0x592100,_0x46e10b={'erwDK':_0x6bc546(0x11b),'ZIvmI':_0x6bc546(0x10c),'MIxAw':_0x6bc546(0x11e),'uxUhR':'Chỉ\x20người\x20quản\x20trị\x20hệ\x20thống\x20mới\x20có\x20quyền\x20phát\x20hành\x20token\x20này','nwSfU':_0x6bc546(0xfe),'ESCje':function(_0x905320,_0x43c0e9){return _0x905320!==_0x43c0e9;},'TPwBC':_0x6bc546(0x141),'tLGTd':function(_0x1947ed,_0x4451cf){return _0x1947ed(_0x4451cf);},'uQsUV':function(_0x5a2655,_0x534d3f){return _0x5a2655===_0x534d3f;},'RnGoy':'aQlng','HqrTU':function(_0x3f6a58,_0x2c24d3){return _0x3f6a58!==_0x2c24d3;},'RVGPs':_0x6bc546(0x14c),'xDLaf':_0x6bc546(0x14a),'zLsEH':function(_0x2c3fca,_0x48a62c){return _0x2c3fca===_0x48a62c;},'iCtWf':_0x6bc546(0x108),'hNrqq':_0x6bc546(0x138)};let _0x22443a=_0x37951b[_0x6bc546(0xec)];const _0x2cec5=await global[_0x6bc546(0x103)](_0x46e10b['nwSfU'])[_0x6bc546(0xe8)]({'id_app':_0x4ec45d[_0x6bc546(0x137)],'username':_0x4ec45d[_0x6bc546(0xe0)],'address':_0x22443a})[_0x6bc546(0x12f)]();if(!_0x2cec5)throw'Địa\x20chỉ\x20ví\x20này\x20không\x20thuộc\x20về\x20bạn';if(global[_0x6bc546(0x128)][_0x6bc546(0x116)]==_0x37951b[_0x6bc546(0x133)]){if(_0x46e10b[_0x6bc546(0x129)](_0x46e10b[_0x6bc546(0x14b)],'yOvHb'))_0x7b3640=new _0x56310b({'id_app':_0xdfc337,'address':_0x2789c4,'denom':_0x250f30});else{if(!_0x46e10b[_0x6bc546(0x104)](isSupperAdmin,_0x4ec45d[_0x6bc546(0xe0)][_0x6bc546(0x130)]()))throw _0x46e10b[_0x6bc546(0x136)];}}else{const _0x4a80f2=await model[_0x6bc546(0xf7)](_0x4ec45d[_0x6bc546(0x137)],_0x22443a,global[_0x6bc546(0x128)][_0x6bc546(0x116)]);if(_0x4a80f2<0x1){if(_0x46e10b[_0x6bc546(0x126)](_0x6bc546(0xf8),_0x46e10b[_0x6bc546(0x131)])){_0x2966f2['error'](_0x46e10b['erwDK'],{'id_app':_0x55c772,'from_address':_0x452efa,'to_address':_0x2647d6,'amount':_0x1fea20,'denom':_0x540470,'data':_0x2a50b7});throw _0x46e10b['ZIvmI'];}else throw _0x6bc546(0xfb);}}try{if(_0x46e10b[_0x6bc546(0x107)](_0x46e10b['RVGPs'],_0x46e10b[_0x6bc546(0x121)])){_0x25c433[_0x6bc546(0x13f)](_0x46e10b['MIxAw'],_0x419a72);throw _0xcae8ab;}else _0x46e10b['ESCje'](global[_0x6bc546(0x128)][_0x6bc546(0x116)],_0x37951b['denom'])&&await model[_0x6bc546(0x113)](_0x4ec45d[_0x6bc546(0x137)],_0x22443a,0x1,global[_0x6bc546(0x128)][_0x6bc546(0x116)],{..._0x37951b,'memo':_0x6bc546(0x11f)+global[_0x6bc546(0x128)]['MAIN_DENOM']+_0x6bc546(0xdb)+_0x37951b[_0x6bc546(0xff)]+_0x37951b[_0x6bc546(0x133)]});}catch(_0x412227){console[_0x6bc546(0x13f)](_0x46e10b[_0x6bc546(0x144)],_0x412227);throw _0x412227;}try{await model['mintCoins'](_0x4ec45d[_0x6bc546(0x137)],_0x22443a,_0x37951b[_0x6bc546(0xff)],_0x37951b[_0x6bc546(0x133)],{..._0x37951b,'memo':_0x6bc546(0xd9),'event':_0x46e10b[_0x6bc546(0xe1)]});}catch(_0x44f529){if(_0x46e10b[_0x6bc546(0x142)](_0x46e10b[_0x6bc546(0x123)],_0x46e10b[_0x6bc546(0xef)]))throw _0x46e10b['uxUhR'];else{console[_0x6bc546(0x13f)](_0x6bc546(0xea),_0x44f529);throw _0x44f529;}}return _0x37951b;},module[_0x592100(0x10e)]=model;
@@ -1,4 +1 @@
1
- const voucherSchema=new Schema({wallet_address:String,token:String,so_luong:Number,menh_gia:Number,gia_tri:Number,da_hoan_tra:Boolean,line:Number}),assbookingSchema=new Schema({id_app:String,ma_ct:{type:String,default:"ASSBOOKING"},so_ct:String,ngay_ct:{type:Date,default:Date.now},id_product:{type:String,required:!0,trim:!0},ten_san_pham:{type:String},user_hotel:String,ma_phong:{type:String,required:!0,uppercase:!0,trim:!0},ngay_nhan_phong:{type:Date,required:!0},so_dem:Number,don_gia_vc:Number,id_period:String,
2
- so_luong_vc:Number,menh_gia:Number,gia_tri_can_thanh_toan:Number,voucher_thanh_toan:[voucherSchema],gia_tri_da_thanh_toan:Number,chenh_lech:Number,wallet_hotel:String,trang_thai:String,ks_xac_nhan_nhan_phong:Boolean,kh_xac_nhan_nhan_phong:Boolean,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
3
- (global.configs||{}).createIndexes&&(assbookingSchema.index({id_app:1}),assbookingSchema.index({so_ct:1}),assbookingSchema.index({denom:1}),assbookingSchema.index({token:1}),assbookingSchema.index({trang_thai:1}),assbookingSchema.index({id_product:1}),assbookingSchema.index({ten_san_pham:1}),assbookingSchema.index({ngay_nhan_phong:1}),assbookingSchema.index({user_hotel:1}),assbookingSchema.index({ma_phong:1}),assbookingSchema.index({id_period:1}),assbookingSchema.index({status:1}),assbookingSchema.index({user_created:1}),
4
- assbookingSchema.index({creator:"text",token:"text",denom:"text",ten_san_pham:"text"},{name:"assbooking_index2"}));const model=mongoose.models.assbooking||mongoose.model("assbooking",assbookingSchema);module.exports=model;
1
+ const _0x21c32d=_0x3a74;function _0x5bc2(){const _0x377a5f=['odG1mJmWv1LRqwHU','twL4zwq','zxHWB3j0CW','mtbkufLtAhe','mJy0mfb6rKzHrq','mJuXmtG3nKDovNzbvq','otmZmJuYnLLMC2DSAa','BM93','Aw5KzxG','y3jLyxrLsw5KzxHLCW','Bw9KzwXZ','vhLWzxm','nJe1nLHlzuztwq','mZC2mtj5CgPMCwu','ndq0ndK1rMndEKXt','mJKWqLPIDNrc','qvntqK9ps0LorW','Dgv4Da','nZaZnteYme5Os3zkzW'];_0x5bc2=function(){return _0x377a5f;};return _0x5bc2();}(function(_0x1b4a5d,_0x54931d){const _0x3d16b5=_0x3a74,_0x2253d5=_0x1b4a5d();while(!![]){try{const _0x1a2980=parseInt(_0x3d16b5(0x11f))/0x1+parseInt(_0x3d16b5(0x122))/0x2*(-parseInt(_0x3d16b5(0x11a))/0x3)+-parseInt(_0x3d16b5(0x119))/0x4*(parseInt(_0x3d16b5(0x11b))/0x5)+parseInt(_0x3d16b5(0x124))/0x6+parseInt(_0x3d16b5(0x125))/0x7+parseInt(_0x3d16b5(0x123))/0x8*(parseInt(_0x3d16b5(0x118))/0x9)+-parseInt(_0x3d16b5(0x11e))/0xa;if(_0x1a2980===_0x54931d)break;else _0x2253d5['push'](_0x2253d5['shift']());}catch(_0x248fc3){_0x2253d5['push'](_0x2253d5['shift']());}}}(_0x5bc2,0xd528f));const voucherSchema=new Schema({'wallet_address':String,'token':String,'so_luong':Number,'menh_gia':Number,'gia_tri':Number,'da_hoan_tra':Boolean,'line':Number}),assbookingSchema=new Schema({'id_app':String,'ma_ct':{'type':String,'default':_0x21c32d(0x11c)},'so_ct':String,'ngay_ct':{'type':Date,'default':Date[_0x21c32d(0x126)]},'id_product':{'type':String,'required':!![],'trim':!![]},'ten_san_pham':{'type':String},'user_hotel':String,'ma_phong':{'type':String,'required':!![],'uppercase':!![],'trim':!![]},'ngay_nhan_phong':{'type':Date,'required':!![]},'so_dem':Number,'don_gia_vc':Number,'id_period':String,'so_luong_vc':Number,'menh_gia':Number,'gia_tri_can_thanh_toan':Number,'voucher_thanh_toan':[voucherSchema],'gia_tri_da_thanh_toan':Number,'chenh_lech':Number,'wallet_hotel':String,'trang_thai':String,'ks_xac_nhan_nhan_phong':Boolean,'kh_xac_nhan_nhan_phong':Boolean,'exfields':Schema[_0x21c32d(0x117)][_0x21c32d(0x120)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x21c32d(0x126)]},'date_updated':{'type':Date,'default':Date[_0x21c32d(0x126)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});(global['configs']||{})[_0x21c32d(0x128)]&&(assbookingSchema[_0x21c32d(0x127)]({'id_app':0x1}),assbookingSchema[_0x21c32d(0x127)]({'so_ct':0x1}),assbookingSchema['index']({'denom':0x1}),assbookingSchema[_0x21c32d(0x127)]({'token':0x1}),assbookingSchema[_0x21c32d(0x127)]({'trang_thai':0x1}),assbookingSchema[_0x21c32d(0x127)]({'id_product':0x1}),assbookingSchema['index']({'ten_san_pham':0x1}),assbookingSchema['index']({'ngay_nhan_phong':0x1}),assbookingSchema[_0x21c32d(0x127)]({'user_hotel':0x1}),assbookingSchema[_0x21c32d(0x127)]({'ma_phong':0x1}),assbookingSchema[_0x21c32d(0x127)]({'id_period':0x1}),assbookingSchema[_0x21c32d(0x127)]({'status':0x1}),assbookingSchema[_0x21c32d(0x127)]({'user_created':0x1}),assbookingSchema[_0x21c32d(0x127)]({'creator':_0x21c32d(0x11d),'token':_0x21c32d(0x11d),'denom':_0x21c32d(0x11d),'ten_san_pham':_0x21c32d(0x11d)},{'name':'assbooking_index2'}));const model=mongoose[_0x21c32d(0x129)]['assbooking']||mongoose['model']('assbooking',assbookingSchema);function _0x3a74(_0x1dbe9d,_0x2f70bf){const _0x5bc2f8=_0x5bc2();return _0x3a74=function(_0x3a74de,_0x286b55){_0x3a74de=_0x3a74de-0x117;let _0x15a3ca=_0x5bc2f8[_0x3a74de];if(_0x3a74['MDSxBr']===undefined){var _0x3da0f7=function(_0x1b369b){const _0x1dce4c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x38fc86='',_0x4640f6='';for(let _0x2fb26d=0x0,_0x6df0df,_0x4bd79c,_0x5d0883=0x0;_0x4bd79c=_0x1b369b['charAt'](_0x5d0883++);~_0x4bd79c&&(_0x6df0df=_0x2fb26d%0x4?_0x6df0df*0x40+_0x4bd79c:_0x4bd79c,_0x2fb26d++%0x4)?_0x38fc86+=String['fromCharCode'](0xff&_0x6df0df>>(-0x2*_0x2fb26d&0x6)):0x0){_0x4bd79c=_0x1dce4c['indexOf'](_0x4bd79c);}for(let _0x201588=0x0,_0x50aa23=_0x38fc86['length'];_0x201588<_0x50aa23;_0x201588++){_0x4640f6+='%'+('00'+_0x38fc86['charCodeAt'](_0x201588)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4640f6);};_0x3a74['uKqPxX']=_0x3da0f7,_0x1dbe9d=arguments,_0x3a74['MDSxBr']=!![];}const _0x1fee51=_0x5bc2f8[0x0],_0x1b7271=_0x3a74de+_0x1fee51,_0x21d657=_0x1dbe9d[_0x1b7271];return!_0x21d657?(_0x15a3ca=_0x3a74['uKqPxX'](_0x15a3ca),_0x1dbe9d[_0x1b7271]=_0x15a3ca):_0x15a3ca=_0x21d657,_0x15a3ca;},_0x3a74(_0x1dbe9d,_0x2f70bf);}module[_0x21c32d(0x121)]=model;
@@ -1,3 +1 @@
1
- const assbuySchema=new Schema({id_app:String,creator:{type:String,required:!0},id:{type:String,trim:!0},id_sell:{type:String,required:!0},token:{type:String,required:!0,lowercase:!0},nguyen_gia:{type:Number},denom:{type:String,required:!0,lowercase:!0,trim:!0},so_luong_ban:{type:Number},gia_ban:{type:Number},so_luong:{type:Number,required:!0},gia_mua:{type:Number,required:!0},tong_gia_tri:{type:Number},exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},
2
- date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});(global.configs||{}).createIndexes&&(assbuySchema.index({id_app:1}),assbuySchema.index({creator:1}),assbuySchema.index({id:1}),assbuySchema.index({id_sell:1}),assbuySchema.index({denom:1}),assbuySchema.index({token:1}),assbuySchema.index({status:1}),assbuySchema.index({user_created:1}),assbuySchema.index({creator:"text",id_sell:"text",token:"text",denom:"text"},{name:"assbuy_index2"}));
3
- const model=mongoose.models.assbuy||mongoose.model("assbuy",assbuySchema);module.exports=model;
1
+ const _0x127be8=_0x44a9;(function(_0x38ff9f,_0x35d9af){const _0x3557d7=_0x44a9,_0x2c68f9=_0x38ff9f();while(!![]){try{const _0x1906d1=parseInt(_0x3557d7(0x152))/0x1+-parseInt(_0x3557d7(0x150))/0x2+parseInt(_0x3557d7(0x155))/0x3*(-parseInt(_0x3557d7(0x154))/0x4)+-parseInt(_0x3557d7(0x14e))/0x5*(parseInt(_0x3557d7(0x14a))/0x6)+-parseInt(_0x3557d7(0x148))/0x7+parseInt(_0x3557d7(0x14f))/0x8+parseInt(_0x3557d7(0x151))/0x9;if(_0x1906d1===_0x35d9af)break;else _0x2c68f9['push'](_0x2c68f9['shift']());}catch(_0x5da5c2){_0x2c68f9['push'](_0x2c68f9['shift']());}}}(_0x17fa,0x58b73));function _0x17fa(){const _0x10745d=['yxnZyNv5x2LUzgv4mG','zxHWB3j0CW','Aw5KzxG','mtG0mJy4mhnXEwzOra','BM93','ntrrrNPOq3C','Bw9KzwW','twL4zwq','vhLWzxm','ntyXmZvbC2DjANa','mZK4nJK5mK9SC3rKta','mZm0nJG0rfnhsNDW','nta0mJuXmvPRBuTkuW','ndeZnLrXyMnTsa','yxnZyNv5','mJb3ywTPBu0','mtaWnJCXzvffqLHI','Dgv4Da','Bw9KzwXZ'];_0x17fa=function(){return _0x10745d;};return _0x17fa();}const assbuySchema=new Schema({'id_app':String,'creator':{'type':String,'required':!![]},'id':{'type':String,'trim':!![]},'id_sell':{'type':String,'required':!![]},'token':{'type':String,'required':!![],'lowercase':!![]},'nguyen_gia':{'type':Number},'denom':{'type':String,'required':!![],'lowercase':!![],'trim':!![]},'so_luong_ban':{'type':Number},'gia_ban':{'type':Number},'so_luong':{'type':Number,'required':!![]},'gia_mua':{'type':Number,'required':!![]},'tong_gia_tri':{'type':Number},'exfields':Schema[_0x127be8(0x14d)][_0x127be8(0x14c)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x127be8(0x149)]},'date_updated':{'type':Date,'default':Date[_0x127be8(0x149)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});(global['configs']||{})['createIndexes']&&(assbuySchema['index']({'id_app':0x1}),assbuySchema['index']({'creator':0x1}),assbuySchema[_0x127be8(0x147)]({'id':0x1}),assbuySchema[_0x127be8(0x147)]({'id_sell':0x1}),assbuySchema[_0x127be8(0x147)]({'denom':0x1}),assbuySchema[_0x127be8(0x147)]({'token':0x1}),assbuySchema['index']({'status':0x1}),assbuySchema['index']({'user_created':0x1}),assbuySchema['index']({'creator':_0x127be8(0x156),'id_sell':'text','token':_0x127be8(0x156),'denom':_0x127be8(0x156)},{'name':_0x127be8(0x158)}));function _0x44a9(_0x4da362,_0x37062d){const _0x17fa58=_0x17fa();return _0x44a9=function(_0x44a953,_0x478a41){_0x44a953=_0x44a953-0x146;let _0x20c1af=_0x17fa58[_0x44a953];if(_0x44a9['eqSokE']===undefined){var _0x10fbe6=function(_0x4ce567){const _0x3f7619='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa8c9a5='',_0xdaf302='';for(let _0x48743e=0x0,_0x46ec24,_0x5de83b,_0x1083c1=0x0;_0x5de83b=_0x4ce567['charAt'](_0x1083c1++);~_0x5de83b&&(_0x46ec24=_0x48743e%0x4?_0x46ec24*0x40+_0x5de83b:_0x5de83b,_0x48743e++%0x4)?_0xa8c9a5+=String['fromCharCode'](0xff&_0x46ec24>>(-0x2*_0x48743e&0x6)):0x0){_0x5de83b=_0x3f7619['indexOf'](_0x5de83b);}for(let _0x3bf4b8=0x0,_0x355266=_0xa8c9a5['length'];_0x3bf4b8<_0x355266;_0x3bf4b8++){_0xdaf302+='%'+('00'+_0xa8c9a5['charCodeAt'](_0x3bf4b8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xdaf302);};_0x44a9['OYfxge']=_0x10fbe6,_0x4da362=arguments,_0x44a9['eqSokE']=!![];}const _0x2f1290=_0x17fa58[0x0],_0x3ba6d3=_0x44a953+_0x2f1290,_0x263ec9=_0x4da362[_0x3ba6d3];return!_0x263ec9?(_0x20c1af=_0x44a9['OYfxge'](_0x20c1af),_0x4da362[_0x3ba6d3]=_0x20c1af):_0x20c1af=_0x263ec9,_0x20c1af;},_0x44a9(_0x4da362,_0x37062d);}const model=mongoose[_0x127be8(0x157)][_0x127be8(0x153)]||mongoose[_0x127be8(0x14b)](_0x127be8(0x153),assbuySchema);module[_0x127be8(0x146)]=model;
@@ -1,4 +1 @@
1
- const asscashwithdrawSchema=new Schema({id_app:String,creator:{type:String,required:!0,trim:!0},id:{type:String,trim:!0},token:{type:String,required:!0,lowercase:!0,trim:!0},amount:{type:Number,required:!0},require_date:Date,payer:{type:String,trim:!0},payment_date:Date,trang_thai:String,note:String,ten_ngan_hang:String,ten_tk:String,so_tk:String,signature:String,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},
2
- user_created:{type:String,default:""},user_updated:{type:String,default:""}});
3
- (global.configs||{}).createIndexes&&(asscashwithdrawSchema.index({id_app:1}),asscashwithdrawSchema.index({creator:1}),asscashwithdrawSchema.index({id:1}),asscashwithdrawSchema.index({payer:1}),asscashwithdrawSchema.index({token:1}),asscashwithdrawSchema.index({require_date:-1}),asscashwithdrawSchema.index({payment_date:-1}),asscashwithdrawSchema.index({trang_thai:1}),asscashwithdrawSchema.index({status:1}),asscashwithdrawSchema.index({user_created:1}),asscashwithdrawSchema.index({creator:"text",token:"text",
4
- payer:"text",note:"text"},{name:"asscashwithdraw_index2"}));const model=mongoose.models.asscashwithdraw||mongoose.model("asscashwithdraw",asscashwithdrawSchema);module.exports=model;
1
+ const _0x1e4d1f=_0x21ef;(function(_0x1ad02f,_0x56d2b6){const _0x40c2eb=_0x21ef,_0x105502=_0x1ad02f();while(!![]){try{const _0x53f087=-parseInt(_0x40c2eb(0x70))/0x1+-parseInt(_0x40c2eb(0x76))/0x2*(-parseInt(_0x40c2eb(0x74))/0x3)+parseInt(_0x40c2eb(0x7a))/0x4*(-parseInt(_0x40c2eb(0x72))/0x5)+parseInt(_0x40c2eb(0x80))/0x6+-parseInt(_0x40c2eb(0x6f))/0x7*(-parseInt(_0x40c2eb(0x69))/0x8)+-parseInt(_0x40c2eb(0x71))/0x9*(parseInt(_0x40c2eb(0x6b))/0xa)+-parseInt(_0x40c2eb(0x7d))/0xb*(parseInt(_0x40c2eb(0x78))/0xc);if(_0x53f087===_0x56d2b6)break;else _0x105502['push'](_0x105502['shift']());}catch(_0x5d1890){_0x105502['push'](_0x105502['shift']());}}}(_0x32d6,0x96420));function _0x32d6(){const _0x136a42=['Dgv4Da','mZa0ofPkAhzHEa','Aw5KzxG','BM93','oda1mdK5oxjvz1fcDq','mxWXmhW4Fdb8n3WYFdr8nNW1FdL8mW','zxHWB3j0CW','mZqWntG3nNzXAvPbyq','ndu4ota0zhfhuLn6','Bw9KzwW','oty1ntmWwNLZt0rM','vhLWzxm','twL4zwq','Bw9KzwXZ','otf3vhDxtxq','nZeZnJu3z1nSsgXr','mJDpDgviwuS','ndq1t29Jy3rw','yxnZy2fZAhDPDgHKCMf3','m1HqyvzlrW','C3bSAxq','mJiXmdi2ogXPq0DKEa','y29UzMLNCW','mtjNwxDNtMO'];_0x32d6=function(){return _0x136a42;};return _0x32d6();}function _0x21ef(_0x29c463,_0x3dcce6){const _0x32d6de=_0x32d6();return _0x21ef=function(_0x21ef58,_0x193dfb){_0x21ef58=_0x21ef58-0x69;let _0x331e17=_0x32d6de[_0x21ef58];if(_0x21ef['sMVPST']===undefined){var _0x441a9d=function(_0x5c5536){const _0x5481cc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b2765='',_0x1c9c8d='';for(let _0x7ebd9f=0x0,_0x3fa7a2,_0x44b946,_0x3a2250=0x0;_0x44b946=_0x5c5536['charAt'](_0x3a2250++);~_0x44b946&&(_0x3fa7a2=_0x7ebd9f%0x4?_0x3fa7a2*0x40+_0x44b946:_0x44b946,_0x7ebd9f++%0x4)?_0x2b2765+=String['fromCharCode'](0xff&_0x3fa7a2>>(-0x2*_0x7ebd9f&0x6)):0x0){_0x44b946=_0x5481cc['indexOf'](_0x44b946);}for(let _0x5dc7ad=0x0,_0x50e418=_0x2b2765['length'];_0x5dc7ad<_0x50e418;_0x5dc7ad++){_0x1c9c8d+='%'+('00'+_0x2b2765['charCodeAt'](_0x5dc7ad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1c9c8d);};_0x21ef['BpsZzJ']=_0x441a9d,_0x29c463=arguments,_0x21ef['sMVPST']=!![];}const _0x1be145=_0x32d6de[0x0],_0x3438e4=_0x21ef58+_0x1be145,_0x3dd390=_0x29c463[_0x3438e4];return!_0x3dd390?(_0x331e17=_0x21ef['BpsZzJ'](_0x331e17),_0x29c463[_0x3438e4]=_0x331e17):_0x331e17=_0x3dd390,_0x331e17;},_0x21ef(_0x29c463,_0x3dcce6);}const asscashwithdrawSchema=new Schema({'id_app':String,'creator':{'type':String,'required':!![],'trim':!![]},'id':{'type':String,'trim':!![]},'token':{'type':String,'required':!![],'lowercase':!![],'trim':!![]},'amount':{'type':Number,'required':!![]},'require_date':Date,'payer':{'type':String,'trim':!![]},'payment_date':Date,'trang_thai':String,'note':String,'ten_ngan_hang':String,'ten_tk':String,'so_tk':String,'signature':String,'exfields':Schema[_0x1e4d1f(0x6c)][_0x1e4d1f(0x6d)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x1e4d1f(0x7c)]},'date_updated':{'type':Date,'default':Date[_0x1e4d1f(0x7c)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});if((global[_0x1e4d1f(0x77)]||{})['createIndexes']){const ysYlsp=_0x1e4d1f(0x7e)[_0x1e4d1f(0x75)]('|');let kQoejo=0x0;while(!![]){switch(ysYlsp[kQoejo++]){case'0':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'payer':0x1});continue;case'1':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'id_app':0x1});continue;case'2':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'require_date':-0x1});continue;case'3':asscashwithdrawSchema['index']({'creator':'text','token':_0x1e4d1f(0x79),'payer':_0x1e4d1f(0x79),'note':_0x1e4d1f(0x79)},{'name':'asscashwithdraw_index2'});continue;case'4':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'payment_date':-0x1});continue;case'5':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'status':0x1});continue;case'6':asscashwithdrawSchema['index']({'trang_thai':0x1});continue;case'7':asscashwithdrawSchema['index']({'token':0x1});continue;case'8':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'id':0x1});continue;case'9':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'user_created':0x1});continue;case'10':asscashwithdrawSchema[_0x1e4d1f(0x7b)]({'creator':0x1});continue;}break;}}const model=mongoose[_0x1e4d1f(0x6e)][_0x1e4d1f(0x73)]||mongoose[_0x1e4d1f(0x6a)]('asscashwithdraw',asscashwithdrawSchema);module[_0x1e4d1f(0x7f)]=model;
@@ -1,2 +1 @@
1
- const assfindhashSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},creator:{type:String,required:!0},id:{type:Number,required:!0},hash:{type:String,required:!0},previousHash:String,timestamp:Number,data:String,difficulty:Number,nonce:Number,date_created:{type:Date,default:Date.now}});
2
- (global.configs||{}).createIndexes&&(assfindhashSchema.index({id_app:1}),assfindhashSchema.index({creator:1}),assfindhashSchema.index({date_created:1}),assfindhashSchema.index({id:1}),assfindhashSchema.index({hash:1}),assfindhashSchema.index({id_app:1,id:1},{unique:!0}),assfindhashSchema.index({previousHash:1}));const model=mongoose.models.assfindhash||mongoose.model("assfindhash",assfindhashSchema);module.exports=model;
1
+ const _0x271649=_0x341e;(function(_0x10608c,_0x100b5b){const _0x54e5b6=_0x341e,_0x7be455=_0x10608c();while(!![]){try{const _0x47c1b0=parseInt(_0x54e5b6(0xc2))/0x1*(parseInt(_0x54e5b6(0xb8))/0x2)+parseInt(_0x54e5b6(0xb6))/0x3+-parseInt(_0x54e5b6(0xb5))/0x4*(-parseInt(_0x54e5b6(0xb0))/0x5)+-parseInt(_0x54e5b6(0xbc))/0x6*(parseInt(_0x54e5b6(0xba))/0x7)+parseInt(_0x54e5b6(0xb2))/0x8*(-parseInt(_0x54e5b6(0xb1))/0x9)+parseInt(_0x54e5b6(0xb7))/0xa*(-parseInt(_0x54e5b6(0xc0))/0xb)+parseInt(_0x54e5b6(0xbf))/0xc;if(_0x47c1b0===_0x100b5b)break;else _0x7be455['push'](_0x7be455['shift']());}catch(_0x5e432b){_0x7be455['push'](_0x7be455['shift']());}}}(_0x42d9,0x1c4c0));const assfindhashSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'creator':{'type':String,'required':!![]},'id':{'type':Number,'required':!![]},'hash':{'type':String,'required':!![]},'previousHash':String,'timestamp':Number,'data':String,'difficulty':Number,'nonce':Number,'date_created':{'type':Date,'default':Date[_0x271649(0xbd)]}});function _0x341e(_0x1b99cc,_0x591386){const _0x42d976=_0x42d9();return _0x341e=function(_0x341e1c,_0x4c45c4){_0x341e1c=_0x341e1c-0xb0;let _0x292c44=_0x42d976[_0x341e1c];if(_0x341e['wfkBcJ']===undefined){var _0x21467b=function(_0x415fcc){const _0x3108d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x607b0c='',_0x3a5973='';for(let _0x19b258=0x0,_0x173f63,_0x2d748c,_0x419a24=0x0;_0x2d748c=_0x415fcc['charAt'](_0x419a24++);~_0x2d748c&&(_0x173f63=_0x19b258%0x4?_0x173f63*0x40+_0x2d748c:_0x2d748c,_0x19b258++%0x4)?_0x607b0c+=String['fromCharCode'](0xff&_0x173f63>>(-0x2*_0x19b258&0x6)):0x0){_0x2d748c=_0x3108d8['indexOf'](_0x2d748c);}for(let _0x4ba498=0x0,_0x1103d9=_0x607b0c['length'];_0x4ba498<_0x1103d9;_0x4ba498++){_0x3a5973+='%'+('00'+_0x607b0c['charCodeAt'](_0x4ba498)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3a5973);};_0x341e['rbDtDf']=_0x21467b,_0x1b99cc=arguments,_0x341e['wfkBcJ']=!![];}const _0x2a6e66=_0x42d976[0x0],_0xaba831=_0x341e1c+_0x2a6e66,_0x3eff4a=_0x1b99cc[_0xaba831];return!_0x3eff4a?(_0x292c44=_0x341e['rbDtDf'](_0x292c44),_0x1b99cc[_0xaba831]=_0x292c44):_0x292c44=_0x3eff4a,_0x292c44;},_0x341e(_0x1b99cc,_0x591386);}(global[_0x271649(0xb3)]||{})['createIndexes']&&(assfindhashSchema[_0x271649(0xb9)]({'id_app':0x1}),assfindhashSchema[_0x271649(0xb9)]({'creator':0x1}),assfindhashSchema[_0x271649(0xb9)]({'date_created':0x1}),assfindhashSchema['index']({'id':0x1}),assfindhashSchema[_0x271649(0xb9)]({'hash':0x1}),assfindhashSchema[_0x271649(0xb9)]({'id_app':0x1,'id':0x1},{'unique':!![]}),assfindhashSchema['index']({'previousHash':0x1}));const model=mongoose[_0x271649(0xbb)][_0x271649(0xb4)]||mongoose[_0x271649(0xbe)](_0x271649(0xb4),assfindhashSchema);module[_0x271649(0xc1)]=model;function _0x42d9(){const _0x553c1c=['mvzHBwnSCq','nvnuCKX5Aa','nJG2otK3s1vvz3b4','mtzXzurbD0q','y29UzMLNCW','yxnZzMLUzgHHC2G','mZiWndqWtvnRthvu','ntuYotzPBvfLuLy','mtCWC0nPzunq','mJKWnde0wM5sugjw','Aw5KzxG','n1H6AxnxEa','Bw9KzwXZ','mti2nJGYmMHssKz3rG','BM93','Bw9KzwW','ndmYmdi4oerYEMDxtW','odaYnZHtCgvPvfq','zxHWB3j0CW'];_0x42d9=function(){return _0x553c1c;};return _0x42d9();}
@@ -1,13 +1 @@
1
- const assinvestmentSchema=new Schema({id_app:String,so_hd:{required:!0,type:String,set:function($so_hd$$){this._previous_so_hd=this.so_hd;return $so_hd$$},trim:!0},ngay_hd:{type:Date,default:Date.now},creator:{type:String,required:!0,trim:!0},id:{type:String,trim:!0},id_product:{type:String,trim:!0},ten_san_pham:{type:String},id_period:{type:String,required:!0,trim:!0},ten_ky_han:{type:String},product_token:{type:String,lowercase:!0,trim:!0},token:{type:String,required:!0,lowercase:!0,trim:!0},co_phan:Boolean,
2
- lai_da_tra:Number,ngay_tinh_lai_ky_truoc:{type:Date},ngay_tinh_lai_ky_tiep_theo:{type:Date},gia:{type:Number},so_luong:{type:Number,required:!0},tong_gia_tri:{type:Number},lai_du_tinh:Number,tong_gia_tri_dao_han:Number,lai_suat_cam_ket:{type:Number},ky_tinh_lai:{type:Number},lan_tinh_lai:{type:Number,default:0},ngay_phat_hanh:{type:Date},ky_han:{type:Number},ngay_dao_han:{type:Date},cho_phep_rut_von:{type:Boolean},lai_suat_truoc_han:{type:Number},tg_xu_ly_rut_von:{type:Number},cho_phep_chuyen_nhuong:{type:Boolean},
3
- denom:{type:String,trim:!0},da_dao_han:{type:Boolean},trang_thai:{type:String,default:"1"},ty_le_hoa_hong:Number,denom_hoa_hong:String,address_hoa_hong:String,ky_tra_hoa_hong:Number,introduce_code:String,da_rut_von:Number,thong_tin_hop_dong:Schema.Types.Mixed,signature:String,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
4
- (global.configs||{}).createIndexes&&(assinvestmentSchema.index({id_app:1}),assinvestmentSchema.index({creator:1}),assinvestmentSchema.index({id:1}),assinvestmentSchema.index({id_product:1}),assinvestmentSchema.index({ten_san_pham:1}),assinvestmentSchema.index({product_token:1}),assinvestmentSchema.index({co_phan:1}),assinvestmentSchema.index({ngay_tinh_lai_ky_truoc:1}),assinvestmentSchema.index({ngay_tinh_lai_ky_tiep_theo:1}),assinvestmentSchema.index({id_period:1}),assinvestmentSchema.index({ten_ky_han:1}),
5
- assinvestmentSchema.index({cho_phep_rut_von:1}),assinvestmentSchema.index({cho_phep_chuyen_nhuong:1}),assinvestmentSchema.index({da_dao_han:1}),assinvestmentSchema.index({denom:1}),assinvestmentSchema.index({token:1}),assinvestmentSchema.index({id_app:1,token:1},{unique:!0}),assinvestmentSchema.index({status:1}),assinvestmentSchema.index({user_created:1}),assinvestmentSchema.index({creator:"text",product_token:"text",token:"text",ten_san_pham:"text",ten_ky_han:"text",denom:"text"},{name:"assinvestment_index2"}));
6
- assinvestmentSchema.pre("save",function($next$$){if(!this.so_hd)return $next$$();const $self$$=this;this.isNew||this.so_hd!=this._previous_so_hd?mongoose.models.customer.countDocuments({id_app:this.id_app,so_hd:this.so_hd},($e$$,$count$$)=>{$count$$>0?$next$$(Error(`S\u1ed1 h\u1ee3p \u0111\u1ed3ng '${$self$$.so_hd}' \u0111\u00e3 t\u1ed3n t\u1ea1i`)):$next$$()}):$next$$()});
7
- const thongke=async $p$$=>{let $withdraws$$=await global.getModel("asswithdraw").find({id_app:$p$$.id_app,token:$p$$.token,trang_thai:"5"},{so_luong:1,trang_thai:1}).lean();$p$$.da_rut_von=$withdraws$$.map($ivt$$=>$ivt$$.so_luong).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$p$$.id_period&&$p$$.so_luong&&$p$$.id_app&&(await [$p$$].asyncJoinModel2($p$$.id_app,"assperiod",{where:{id_period:"id"},fields:["ky_han","gia","lai_suat_cam_ket","denom"]}),$p$$.tong_gia_tri=($p$$.gia||0)*($p$$.so_luong||0),$p$$.lai_du_tinh=
8
- Math.roundBy($p$$.lai_suat_cam_ket/365/100*$p$$.tong_gia_tri*$p$$.ky_han,0),$p$$.tong_gia_tri_dao_han=$p$$.tong_gia_tri+$p$$.lai_du_tinh)};assinvestmentSchema.post("find",async function($result$$){for(let $i$$=0;$i$$<$result$$.length;$i$$++){const $p$$=$result$$[$i$$];$p$$.token&&$p$$.id_app&&await thongke($p$$)}});assinvestmentSchema.post("findOne",async function($p$$){$p$$&&$p$$.token&&$p$$.id_app&&await thongke($p$$)});const model=mongoose.models.assinvestment||mongoose.model("assinvestment",assinvestmentSchema);
9
- model.getPercentOfSteps=$steps$$=>{let $owners$$=[];$steps$$.filter($s$$=>$s$$.trang_thai=="4"||$s$$.trang_thai=="5").sort(($a$$,$b$$)=>$a$$.stt-$b$$.stt).forEach($s$$=>{let $owner$$={code:$s$$.code,name:$s$$.name,sl_slot:$s$$.sl_slot,gt_slot:$s$$.gt_slot,dillution:$s$$.dillution,raise:$s$$.raise,percent:$s$$.dillution||100,investment:$s$$.raise||$s$$.valuation};$owners$$.forEach($o$$=>{$o$$.percent*=1-$s$$.dillution/100});$owners$$.push($owner$$);$owners$$.forEach($o$$=>{$o$$.valuation=Math.roundBy($s$$.valuation*
10
- $o$$.percent/100,0);$o$$.sl_cp=Math.roundBy($s$$.total_share*$o$$.percent/100,0);$o$$.sl_cp_slot=$o$$.sl_slot?$o$$.sl_cp/$o$$.sl_slot:0;$o$$.gt_cp_slot=$o$$.sl_slot?$o$$.valuation/$o$$.sl_slot:0;$o$$.pi=$o$$.investment?$o$$.valuation/$o$$.investment:0});$s$$.owners={...$owners$$}});return $owners$$};
11
- model.getInvestmentMarketValue=async($id_app_steps$$,$frm_step_token$$)=>{console.log("get investment market value",$frm_step_token$$,$id_app_steps$$);const $invest$$=await model.findOne({id_app:$id_app_steps$$,token:$frm_step_token$$}).lean();if($invest$$){var $period$$=await global.getModel("assperiod").findOne({id_app:$id_app_steps$$,id:$invest$$.id_period}).lean();if($period$$)if($period$$.goi_dau_tu&&$period$$.frm_step_code)if($invest$$.goi_dau_tu=!0,$frm_step_token$$=await global.getModel("financialroadmap").findOne({id_app:$id_app_steps$$,
12
- code:$invest$$.id_product.toString()}).lean()){$id_app_steps$$=model.getPercentOfSteps($frm_step_token$$.steps||[]);if($frm_step_token$$=$id_app_steps$$.find($s$$=>$s$$.code===$period$$.frm_step_code))return $frm_step_token$$.t_sl_cp_ht=$frm_step_token$$.sl_cp_slot*$invest$$.so_luong,$frm_step_token$$.t_gt_cp_ht=$frm_step_token$$.gt_cp_slot*$invest$$.so_luong,$frm_step_token$$;console.log("not find step",$period$$.frm_step_code,$id_app_steps$$)}else console.log("not find frm",$invest$$.id_product.toString(),
13
- $id_app_steps$$);else console.log("period",$invest$$.id_period,"does not a frm",$period$$.frm_step_code);else console.log("not find period",$invest$$.id_period,$id_app_steps$$)}else console.log("not find investment",$frm_step_token$$,$id_app_steps$$)};module.exports=model;
1
+ const _0x4da959=_0x145e;(function(_0x113a82,_0x29b9e1){const _0x489a26=_0x145e,_0x4cd87c=_0x113a82();while(!![]){try{const _0x5ca91b=-parseInt(_0x489a26(0x164))/0x1*(parseInt(_0x489a26(0x1c2))/0x2)+parseInt(_0x489a26(0x194))/0x3+-parseInt(_0x489a26(0x16b))/0x4*(-parseInt(_0x489a26(0x19e))/0x5)+-parseInt(_0x489a26(0x1d1))/0x6+parseInt(_0x489a26(0x1c0))/0x7*(-parseInt(_0x489a26(0x183))/0x8)+parseInt(_0x489a26(0x1bc))/0x9*(parseInt(_0x489a26(0x1de))/0xa)+-parseInt(_0x489a26(0x1ad))/0xb*(-parseInt(_0x489a26(0x1c4))/0xc);if(_0x5ca91b===_0x29b9e1)break;else _0x4cd87c['push'](_0x4cd87c['shift']());}catch(_0x403be2){_0x4cd87c['push'](_0x4cd87c['shift']());}}}(_0x1b71,0x934c0));const assinvestmentSchema=new Schema({'id_app':String,'so_hd':{'required':!![],'type':String,'set':function(_0x45e7bb){const _0x413f74=_0x145e;return this['_previous_so_hd']=this[_0x413f74(0x1a8)],_0x45e7bb;},'trim':!![]},'ngay_hd':{'type':Date,'default':Date[_0x4da959(0x1db)]},'creator':{'type':String,'required':!![],'trim':!![]},'id':{'type':String,'trim':!![]},'id_product':{'type':String,'trim':!![]},'ten_san_pham':{'type':String},'id_period':{'type':String,'required':!![],'trim':!![]},'ten_ky_han':{'type':String},'product_token':{'type':String,'lowercase':!![],'trim':!![]},'token':{'type':String,'required':!![],'lowercase':!![],'trim':!![]},'co_phan':Boolean,'lai_da_tra':Number,'ngay_tinh_lai_ky_truoc':{'type':Date},'ngay_tinh_lai_ky_tiep_theo':{'type':Date},'gia':{'type':Number},'so_luong':{'type':Number,'required':!![]},'tong_gia_tri':{'type':Number},'lai_du_tinh':Number,'tong_gia_tri_dao_han':Number,'lai_suat_cam_ket':{'type':Number},'ky_tinh_lai':{'type':Number},'lan_tinh_lai':{'type':Number,'default':0x0},'ngay_phat_hanh':{'type':Date},'ky_han':{'type':Number},'ngay_dao_han':{'type':Date},'cho_phep_rut_von':{'type':Boolean},'lai_suat_truoc_han':{'type':Number},'tg_xu_ly_rut_von':{'type':Number},'cho_phep_chuyen_nhuong':{'type':Boolean},'denom':{'type':String,'trim':!![]},'da_dao_han':{'type':Boolean},'trang_thai':{'type':String,'default':'1'},'ty_le_hoa_hong':Number,'denom_hoa_hong':String,'address_hoa_hong':String,'ky_tra_hoa_hong':Number,'introduce_code':String,'da_rut_von':Number,'thong_tin_hop_dong':Schema[_0x4da959(0x16a)][_0x4da959(0x19d)],'signature':String,'exfields':Schema[_0x4da959(0x16a)][_0x4da959(0x19d)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x4da959(0x1db)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});(global[_0x4da959(0x1a0)]||{})['createIndexes']&&(assinvestmentSchema[_0x4da959(0x187)]({'id_app':0x1}),assinvestmentSchema['index']({'creator':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'id':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'id_product':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'ten_san_pham':0x1}),assinvestmentSchema['index']({'product_token':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'co_phan':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'ngay_tinh_lai_ky_truoc':0x1}),assinvestmentSchema['index']({'ngay_tinh_lai_ky_tiep_theo':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'id_period':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'ten_ky_han':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'cho_phep_rut_von':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'cho_phep_chuyen_nhuong':0x1}),assinvestmentSchema['index']({'da_dao_han':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'denom':0x1}),assinvestmentSchema['index']({'token':0x1}),assinvestmentSchema['index']({'id_app':0x1,'token':0x1},{'unique':!![]}),assinvestmentSchema[_0x4da959(0x187)]({'status':0x1}),assinvestmentSchema['index']({'user_created':0x1}),assinvestmentSchema[_0x4da959(0x187)]({'creator':_0x4da959(0x1cf),'product_token':_0x4da959(0x1cf),'token':_0x4da959(0x1cf),'ten_san_pham':_0x4da959(0x1cf),'ten_ky_han':_0x4da959(0x1cf),'denom':_0x4da959(0x1cf)},{'name':_0x4da959(0x193)}));assinvestmentSchema['pre'](_0x4da959(0x1b2),function(_0x4bc902){const _0x192bb6=_0x4da959,_0x132526={'XQtMb':'period','NuyNJ':_0x192bb6(0x17c),'MEwhc':function(_0x3965ed,_0x45f36b){return _0x3965ed>_0x45f36b;},'gpGjd':function(_0x3a6bda,_0x4dc975){return _0x3a6bda(_0x4dc975);},'VUuVK':function(_0x4c1bf1,_0x389fdc){return _0x4c1bf1===_0x389fdc;},'eJOYx':_0x192bb6(0x1af),'gLCyz':function(_0xbfe78c){return _0xbfe78c();},'VdIwz':function(_0x57e899,_0x1c091e){return _0x57e899!=_0x1c091e;},'gNivU':function(_0x37c2eb){return _0x37c2eb();}};if(!this[_0x192bb6(0x1a8)])return _0x132526[_0x192bb6(0x174)](_0x4bc902);const _0xd210ee=this;if(this[_0x192bb6(0x18f)]||_0x132526[_0x192bb6(0x1c5)](this[_0x192bb6(0x1a8)],this[_0x192bb6(0x1c3)])){let _0x17cdbd={'id_app':this[_0x192bb6(0x1b8)],'so_hd':this[_0x192bb6(0x1a8)]};mongoose['models']['customer'][_0x192bb6(0x1b1)](_0x17cdbd,(_0x20dd62,_0x71b66f)=>{const _0x376c4f=_0x192bb6;if(_0x132526[_0x376c4f(0x1d8)](_0x71b66f,0x0))_0x132526['gpGjd'](_0x4bc902,new Error(_0x376c4f(0x1cc)+_0xd210ee[_0x376c4f(0x1a8)]+_0x376c4f(0x1d9)));else{if(_0x132526[_0x376c4f(0x1a4)](_0x376c4f(0x1af),_0x132526['eJOYx']))_0x4bc902();else{_0x1bee32[_0x376c4f(0x18b)](_0x132526[_0x376c4f(0x162)],_0x313e0c[_0x376c4f(0x1a9)],_0x132526[_0x376c4f(0x17f)],_0x1116b9[_0x376c4f(0x1b9)]);return;}}});}else _0x132526[_0x192bb6(0x195)](_0x4bc902);});function _0x1b71(){const _0x36a73b=['wfbhsfa','wff0twi','wuX2ru8','mu9RDgzsyG','yxnZCgvYAw9K','CMvKDwnL','zgfFCNv0x3zVBG','vfvvEfi','BgnYqMy','vhLWzxm','mJmXmtu2yunVu0Hl','s1Pfwve','DwDdww0','C2XFy3bFC2XVDa','vMTdr0W','wwXovhm','CMrbyNe','z2LH','z2v0sw52zxn0BwvUDe1HCMTLDfzHBhvL','z0XdExO','DhjHBMDFDgHHAq','v0TzzLO','CM91BMrcEq','tMzMvM8','CKfZsum','BgvHBG','Dg9tDhjPBMC','zg9LCYbUB3qGysbMCM0','ufblrKK','C2XFC2XVDa','tNv5tKO','C3bSAxq','z3rFy3bFC2XVDa','se15BMm','otzltvH2EvK','AuL2B3i','z2v0igLUDMvZDg1LBNqGBwfYA2v0ihzHBhvL','Dg90ywXFC2HHCMu','Aw5KzxG','Cw1Vs3C','BM90igzPBMqGC3rLCa','z2v0tw9KzwW','Bg9N','u1fOz04','D1Lku0u','Dg9Uz19NAwfFDhjP','AxnozxC','ANPzEfy','zxHWB3j0CW','Bw9KzwXZ','yxnZAw52zxn0BwvUDf9PBMrLEdi','mtu2mda3ofbyBwT6Ba','z05PDLu','Dg9Rzw4','re5UAKu','A3LFAgfU','zMLUyw5JAwfSCM9Hzg1HCa','B3DUzxjZ','AwrFChjVzhvJDa','DxD0z3O','twL4zwq','mZvuzNzRwM4','CgvYy2vUDa','y29UzMLNCW','BM90igzPBMqGihbLCMLVza','C3r0','C2DoyMK','vLv1vKS','rgvsr1a','C2XFy3a','C2z2yuy','C29FAgq','AwrFCgvYAw9K','wffdDgy','Df9ZBf9JCf9ODa','BgfPx3n1yxrFy2fTx2TLDa','mta0nufTEvb4Ca','Dhb4D2i','q29AANa','EwDmELq','y291BNreB2n1BwvUDhm','C2f2zq','B1bRBwW','ChvZAa','C3rLChm','u09TrMm','Df9NDf9JCf9ODa','AwrFyxbW','zNjTx3n0zxbFy29Kzq','qKzkuwO','yxnZAw52zxn0BwvUDa','owLPAe5ntq','B1jHCuG','ue5lveO','r2vNALy','nJyZndm5DMfPAu9i','zMLUze9Uzq','mtCXndu2mKvsvM11ua','x3bYzxzPB3vZx3nVx2HK','mJq1ntu2wxfWtwr3','vMrjD3O','Bw9KzwW','mxWWFdj8m3W0','C29FBhvVBMC','nhWZFdj8mhWX','BM90igzPBMqGigzYBq','yxnZD2L0AgrYyxC','u+g7KsbO4BUJCcdeKEg7K25NicC','CMfPC2u','z3rFC2XVDa','Dgv4Da','DMfSDwf0Aw9U','nda3oda5mMXVDhj1AW','zuDoyvm','CgvYAw9K','BgfPx2r1x3rPBMG','zgLSBhv0Aw9U','BfPvBw8','zMLUza','tuv3Agm','jYdeKCoJihtHU5nUihtHUQfP','z29Px2rHDv90Dq','BM93','z2v0ugvYy2vUDe9Mu3rLChm','BMfTzq','nda5mdGXmePzEg1buW','y29Kzq','Aw52zxn0BwvUDa'];_0x1b71=function(){return _0x36a73b;};return _0x1b71();}function _0x145e(_0x458f0f,_0x2a511c){const _0x1b719b=_0x1b71();return _0x145e=function(_0x145e74,_0x5ebd54){_0x145e74=_0x145e74-0x160;let _0x49ec2a=_0x1b719b[_0x145e74];if(_0x145e['iLAmrM']===undefined){var _0x311d47=function(_0x4f49f6){const _0x3794cc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c01ce='',_0x3dbba2='';for(let _0x557eb1=0x0,_0xca62c6,_0x527462,_0xadd640=0x0;_0x527462=_0x4f49f6['charAt'](_0xadd640++);~_0x527462&&(_0xca62c6=_0x557eb1%0x4?_0xca62c6*0x40+_0x527462:_0x527462,_0x557eb1++%0x4)?_0x2c01ce+=String['fromCharCode'](0xff&_0xca62c6>>(-0x2*_0x557eb1&0x6)):0x0){_0x527462=_0x3794cc['indexOf'](_0x527462);}for(let _0xd6abbc=0x0,_0x9d3a2d=_0x2c01ce['length'];_0xd6abbc<_0x9d3a2d;_0xd6abbc++){_0x3dbba2+='%'+('00'+_0x2c01ce['charCodeAt'](_0xd6abbc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3dbba2);};_0x145e['BVKYGq']=_0x311d47,_0x458f0f=arguments,_0x145e['iLAmrM']=!![];}const _0x2ef99c=_0x1b719b[0x0],_0x46dfcc=_0x145e74+_0x2ef99c,_0x2211fc=_0x458f0f[_0x46dfcc];return!_0x2211fc?(_0x49ec2a=_0x145e['BVKYGq'](_0x49ec2a),_0x458f0f[_0x46dfcc]=_0x49ec2a):_0x49ec2a=_0x2211fc,_0x49ec2a;},_0x145e(_0x458f0f,_0x2a511c);}const thongke=async _0x4fb7b5=>{const _0x290e40=_0x4da959,_0x214cb3={'qmoKw':function(_0x47f715,_0x2c0f38){return _0x47f715(_0x2c0f38);},'IPVrA':_0x290e40(0x1cb),'iIvor':function(_0x4bba46,_0x5a4f99){return _0x4bba46!==_0x5a4f99;},'DeRGP':_0x290e40(0x1d2),'KoTwL':_0x290e40(0x179),'uwtgz':_0x290e40(0x1ac),'GCdca':'denom','oRaqH':function(_0x55d351,_0x39ee97){return _0x55d351*_0x39ee97;},'WKYfZ':function(_0x901ce5,_0x5c3fd9){return _0x901ce5*_0x5c3fd9;},'VawVo':function(_0x206abe,_0x40139c){return _0x206abe/_0x40139c;},'SQhgN':function(_0x40e9b8,_0x493b56){return _0x40e9b8/_0x493b56;}};let _0x4deff5=await global[_0x290e40(0x18a)](_0x214cb3['IPVrA'])[_0x290e40(0x1d7)]({'id_app':_0x4fb7b5[_0x290e40(0x1b8)],'token':_0x4fb7b5[_0x290e40(0x196)],'trang_thai':'5'},{'so_luong':0x1,'trang_thai':0x1})[_0x290e40(0x17a)]();_0x4fb7b5[_0x290e40(0x167)]=_0x4deff5['map'](_0x3623a4=>_0x3623a4['so_luong'])[_0x290e40(0x166)]((_0x1b570f,_0xca7052)=>_0x1b570f+_0xca7052,0x0),_0x4fb7b5['id_period']&&_0x4fb7b5[_0x290e40(0x1c8)]&&_0x4fb7b5[_0x290e40(0x1b8)]&&(_0x214cb3[_0x290e40(0x184)](_0x214cb3[_0x290e40(0x1a5)],_0x214cb3['KoTwL'])?(await[_0x4fb7b5]['asyncJoinModel2'](_0x4fb7b5[_0x290e40(0x1b8)],_0x290e40(0x165),{'where':{'id_period':'id'},'fields':[_0x290e40(0x198),_0x290e40(0x172),_0x214cb3[_0x290e40(0x19c)],_0x214cb3['GCdca']]}),_0x4fb7b5[_0x290e40(0x18e)]=_0x214cb3['oRaqH'](_0x4fb7b5[_0x290e40(0x172)]||0x0,_0x4fb7b5[_0x290e40(0x1c8)]||0x0),_0x4fb7b5[_0x290e40(0x1d4)]=Math[_0x290e40(0x177)](_0x214cb3[_0x290e40(0x1bd)](_0x214cb3[_0x290e40(0x176)](_0x4fb7b5[_0x290e40(0x18e)],_0x214cb3['VawVo'](_0x214cb3[_0x290e40(0x18c)](_0x4fb7b5[_0x290e40(0x1ac)],0x16d),0x64)),_0x4fb7b5['ky_han']),0x0),_0x4fb7b5['tong_gia_tri_dao_han']=_0x4fb7b5[_0x290e40(0x18e)]+_0x4fb7b5[_0x290e40(0x1d4)]):_0x214cb3[_0x290e40(0x188)](_0x555fed,new _0x4f4166(_0x290e40(0x1cc)+_0x4fd795[_0x290e40(0x1a8)]+_0x290e40(0x1d9))));};assinvestmentSchema['post'](_0x4da959(0x1d7),async function(_0x5184c4){const _0x31fc8c=_0x4da959,_0x1c3206={'BFJQj':function(_0x5b4d7d,_0x34c586){return _0x5b4d7d<_0x34c586;}};for(let _0x2e6da0=0x0;_0x1c3206[_0x31fc8c(0x1ba)](_0x2e6da0,_0x5184c4['length']);_0x2e6da0++){const _0x2b2331=_0x5184c4[_0x2e6da0];_0x2b2331['token']&&_0x2b2331['id_app']&&await thongke(_0x2b2331);}}),assinvestmentSchema['post'](_0x4da959(0x1c1),async function(_0x297f95){const _0x3ec796=_0x4da959,_0x32eb58={'JytNg':function(_0x31cc18,_0x4950dd){return _0x31cc18!==_0x4950dd;},'aZcKP':_0x3ec796(0x1d6),'Qrhuo':function(_0x527838,_0x569fd5){return _0x527838(_0x569fd5);}};_0x297f95&&_0x297f95[_0x3ec796(0x196)]&&_0x297f95['id_app']&&(_0x32eb58['JytNg'](_0x32eb58['aZcKP'],_0x3ec796(0x1d6))?_0x30307e():await _0x32eb58['Qrhuo'](thongke,_0x297f95));});const model=mongoose[_0x4da959(0x192)][_0x4da959(0x1bb)]||mongoose[_0x4da959(0x1c6)]('assinvestment',assinvestmentSchema);model['getPercentOfSteps']=_0x1746e5=>{const _0x9d1e24=_0x4da959,_0x74b64b={'nsaUs':_0x9d1e24(0x163),'dSkYU':function(_0x17746e,_0xa3fbbb){return _0x17746e*_0xa3fbbb;},'lcrBf':function(_0x48faa9,_0x4461bb){return _0x48faa9-_0x4461bb;},'KTMzE':_0x9d1e24(0x1c9),'oPkml':function(_0x189736,_0x172a04){return _0x189736/_0x172a04;},'XHkyk':_0x9d1e24(0x1ca),'HMync':function(_0x4d20a0,_0xe647c3){return _0x4d20a0===_0xe647c3;}};let _0x539b04=[];return _0x1746e5['filter'](_0x237229=>_0x237229[_0x9d1e24(0x175)]=='4'||_0x237229['trang_thai']=='5')['sort']((_0x86d0f1,_0xb1a017)=>_0x86d0f1[_0x9d1e24(0x1a2)]-_0xb1a017[_0x9d1e24(0x1a2)])['forEach'](_0x9e76e0=>{const _0x5d1b40=_0x9d1e24,_0xc568f3={'sfvaF':function(_0x22e8c6,_0x7446fa){return _0x22e8c6/_0x7446fa;},'GBsdL':_0x74b64b['nsaUs'],'sgNbi':_0x5d1b40(0x1ae),'LlvmE':function(_0x5bf6b6,_0x1894ac){return _0x74b64b['dSkYU'](_0x5bf6b6,_0x1894ac);},'XQCtf':function(_0x6668c9,_0x4c5b17){const _0x2aa0b2=_0x5d1b40;return _0x74b64b[_0x2aa0b2(0x169)](_0x6668c9,_0x4c5b17);},'qTVCq':_0x74b64b['KTMzE'],'XPGHP':function(_0x2bba89,_0x29eed5){return _0x2bba89/_0x29eed5;},'uMcxn':function(_0x7d50e3,_0x538b91){const _0x3585a0=_0x5d1b40;return _0x74b64b[_0x3585a0(0x1b3)](_0x7d50e3,_0x538b91);},'ygLzT':function(_0x4383ca,_0x484dfd){return _0x74b64b['dSkYU'](_0x4383ca,_0x484dfd);},'rdAbq':_0x74b64b['XHkyk']};if(_0x74b64b[_0x5d1b40(0x182)](_0x5d1b40(0x1bf),_0x5d1b40(0x1bf))){let _0x5e13c5={'code':_0x9e76e0[_0x5d1b40(0x1df)],'name':_0x9e76e0[_0x5d1b40(0x1dd)],'sl_slot':_0x9e76e0[_0x5d1b40(0x17e)],'gt_slot':_0x9e76e0[_0x5d1b40(0x1ce)],'dillution':_0x9e76e0[_0x5d1b40(0x1d5)],'raise':_0x9e76e0[_0x5d1b40(0x1cd)],'percent':_0x9e76e0[_0x5d1b40(0x1d5)]||0x64,'investment':_0x9e76e0['raise']||_0x9e76e0[_0x5d1b40(0x1d0)]};_0x539b04['forEach'](_0x18e1ee=>{const _0x25c06c=_0x5d1b40,_0x577339={'SOmFc':function(_0x2d4c7c,_0x106d16){return _0x2d4c7c/_0x106d16;},'PPKFI':function(_0x4f2daa,_0x75603){return _0xc568f3['sfvaF'](_0x4f2daa,_0x75603);}};if(_0xc568f3['GBsdL']!==_0xc568f3[_0x25c06c(0x1a3)])_0x18e1ee[_0x25c06c(0x19f)]=_0xc568f3['LlvmE'](_0x18e1ee[_0x25c06c(0x19f)],_0xc568f3[_0x25c06c(0x1aa)](0x1,_0xc568f3[_0x25c06c(0x1a7)](_0x9e76e0['dillution'],0x64)));else{const _0x10b4c9=_0x25c06c(0x1c7)[_0x25c06c(0x180)]('|');let _0x2f1c5f=0x0;while(!![]){switch(_0x10b4c9[_0x2f1c5f++]){case'0':_0x4bd1f0['sl_cp']=_0x277704[_0x25c06c(0x177)](_0x577339[_0x25c06c(0x1b6)](_0xbf1ec8['total_share']*_0x1f094a[_0x25c06c(0x19f)],0x64),0x0);continue;case'1':_0x11c569[_0x25c06c(0x1d0)]=_0xc3fec1[_0x25c06c(0x177)](_0x577339['SOmFc'](_0x2e6f05[_0x25c06c(0x1d0)]*_0x3c664f[_0x25c06c(0x19f)],0x64),0x0);continue;case'2':_0x2e89ea[_0x25c06c(0x16e)]=_0x283d8f[_0x25c06c(0x17e)]?_0x577339['SOmFc'](_0x3d2d8b[_0x25c06c(0x1a6)],_0x109000[_0x25c06c(0x17e)]):0x0;continue;case'3':_0x24f6c3['gt_cp_slot']=_0xff9a3[_0x25c06c(0x17e)]?_0x1da597[_0x25c06c(0x1d0)]/_0x29584e['sl_slot']:0x0;continue;case'4':_0x2d4efe['pi']=_0x566371[_0x25c06c(0x160)]?_0x577339[_0x25c06c(0x17d)](_0x5cddeb['valuation'],_0x4c8673['investment']):0x0;continue;}break;}}}),_0x539b04[_0x5d1b40(0x1b4)](_0x5e13c5),_0x539b04['forEach'](_0x4c8d01=>{const _0xdffba9=_0x5d1b40,_0x3639c1=_0xc568f3['qTVCq'][_0xdffba9(0x180)]('|');let _0x2e0439=0x0;while(!![]){switch(_0x3639c1[_0x2e0439++]){case'0':_0x4c8d01['gt_cp_slot']=_0x4c8d01[_0xdffba9(0x17e)]?_0xc568f3[_0xdffba9(0x1a7)](_0x4c8d01['valuation'],_0x4c8d01[_0xdffba9(0x17e)]):0x0;continue;case'1':_0x4c8d01['pi']=_0x4c8d01[_0xdffba9(0x160)]?_0x4c8d01['valuation']/_0x4c8d01[_0xdffba9(0x160)]:0x0;continue;case'2':_0x4c8d01[_0xdffba9(0x16e)]=_0x4c8d01[_0xdffba9(0x17e)]?_0xc568f3[_0xdffba9(0x161)](_0x4c8d01[_0xdffba9(0x1a6)],_0x4c8d01['sl_slot']):0x0;continue;case'3':_0x4c8d01[_0xdffba9(0x1a6)]=Math[_0xdffba9(0x177)](_0xc568f3['sfvaF'](_0x9e76e0[_0xdffba9(0x186)]*_0x4c8d01['percent'],0x64),0x0);continue;case'4':_0x4c8d01['valuation']=Math[_0xdffba9(0x177)](_0xc568f3['uMcxn'](_0xc568f3[_0xdffba9(0x1b0)](_0x9e76e0[_0xdffba9(0x1d0)],_0x4c8d01['percent']),0x64),0x0);continue;}break;}}),_0x9e76e0[_0x5d1b40(0x19a)]={..._0x539b04};}else{_0x594268['log'](_0xc568f3[_0x5d1b40(0x171)],_0x150b4b[_0x5d1b40(0x19b)]['toString'](),_0x39f707);return;}}),_0x539b04;},model[_0x4da959(0x173)]=async(_0x194f57,_0x1367ec)=>{const _0x36d987=_0x4da959,_0x325e36={'KZEYQ':_0x36d987(0x189),'YlNTs':_0x36d987(0x185),'jzYxV':'not\x20find\x20\x20investment','TUUxR':'assperiod','DNnjE':_0x36d987(0x1a1),'NffVo':_0x36d987(0x1d3),'ppyUJ':_0x36d987(0x1ca),'ugCYm':function(_0x1ceef8,_0x112f23){return _0x1ceef8!==_0x112f23;},'ceXRh':_0x36d987(0x16f),'wYJSE':'aIhIa','PNKTJ':function(_0x4208a2,_0x44c0a7){return _0x4208a2*_0x44c0a7;}};console[_0x36d987(0x18b)](_0x325e36[_0x36d987(0x170)],_0x1367ec,_0x194f57);const _0x5a3c6a=await model[_0x36d987(0x1c1)]({'id_app':_0x194f57,'token':_0x1367ec})[_0x36d987(0x17a)]();if(!_0x5a3c6a){console[_0x36d987(0x18b)](_0x325e36[_0x36d987(0x190)],_0x1367ec,_0x194f57);return;}const _0x24aa2c=await global['getModel'](_0x325e36[_0x36d987(0x168)])[_0x36d987(0x1c1)]({'id_app':_0x194f57,'id':_0x5a3c6a[_0x36d987(0x1a9)]})[_0x36d987(0x17a)]();if(!_0x24aa2c){console[_0x36d987(0x18b)](_0x325e36[_0x36d987(0x197)],_0x5a3c6a['id_period'],_0x194f57);return;}if(!_0x24aa2c[_0x36d987(0x1da)]||!_0x24aa2c[_0x36d987(0x1b9)]){console['log'](_0x325e36[_0x36d987(0x178)],_0x5a3c6a['id_period'],'does\x20not\x20a\x20frm',_0x24aa2c[_0x36d987(0x1b9)]);return;}_0x5a3c6a[_0x36d987(0x1da)]=!![];const _0x38341d=await global[_0x36d987(0x18a)](_0x36d987(0x199))['findOne']({'id_app':_0x194f57,'code':_0x5a3c6a[_0x36d987(0x19b)][_0x36d987(0x17b)]()})[_0x36d987(0x17a)]();if(!_0x38341d){console[_0x36d987(0x18b)](_0x325e36['ppyUJ'],_0x5a3c6a[_0x36d987(0x19b)][_0x36d987(0x17b)](),_0x194f57);return;}const _0x1820f2=model[_0x36d987(0x1dc)](_0x38341d[_0x36d987(0x1b5)]||[]),_0x28551b=_0x1820f2['find'](_0x227b03=>_0x227b03[_0x36d987(0x1df)]===_0x24aa2c[_0x36d987(0x1b9)]);if(!_0x28551b){if(_0x325e36[_0x36d987(0x16d)](_0x325e36['ceXRh'],_0x325e36[_0x36d987(0x18d)])){console[_0x36d987(0x18b)](_0x325e36['KZEYQ'],_0x24aa2c[_0x36d987(0x1b9)],_0x1820f2);return;}else{_0x4c2eab[_0x36d987(0x18b)](_0x325e36[_0x36d987(0x16c)],_0x83e6[_0x36d987(0x1b9)],_0x4a0265);return;}}return _0x28551b[_0x36d987(0x1ab)]=_0x325e36[_0x36d987(0x1be)](_0x28551b[_0x36d987(0x16e)],_0x5a3c6a['so_luong']),_0x28551b[_0x36d987(0x1b7)]=_0x325e36['PNKTJ'](_0x28551b[_0x36d987(0x181)],_0x5a3c6a['so_luong']),_0x28551b;},module[_0x4da959(0x191)]=model;
@@ -1,2 +1 @@
1
- const assissueSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},creator:{type:String,required:!0,maxlength:1024},denom:{type:String,required:!0},amount:{type:Number,required:!0},signature:{type:String,required:!0},user_created:String,date_created:{type:Date,default:Date.now}});(global.configs||{}).createIndexes&&(assissueSchema.index({id_app:1}),assissueSchema.index({denom:1}),assissueSchema.index({creator:1}),assissueSchema.index({user_created:1}),assissueSchema.index({date_created:-1}));
2
- const model=mongoose.models.assissue||mongoose.model("assissue",assissueSchema);module.exports=model;
1
+ const _0x4f27d1=_0x15eb;function _0x5a8f(){const _0x403b1a=['Bw9KzwXZ','yxnZAxnZDwu','mJi1oda3mgXmsKfAsa','nte3mNrzzLbACW','Bw9KzwW','mJeXnZy0shH6yxjq','odbuuevvsNC','nZq2owjgzenoEa','ntyZmZrdBfzQuhK','n1j6ru13sq','mtfLrLLUyuq','Aw5KzxG','mte0ndbmsuTjz1m','ntK4oezZA1H3qG','mJm0odq4n1nRyNjWDW','m0vOywr3rq','y3jLyxrLsw5KzxHLCW','BM93'];_0x5a8f=function(){return _0x403b1a;};return _0x5a8f();}function _0x15eb(_0x2c5b78,_0x20741d){const _0x5a8fe5=_0x5a8f();return _0x15eb=function(_0x15eb2a,_0x4592c5){_0x15eb2a=_0x15eb2a-0x10a;let _0x13c82a=_0x5a8fe5[_0x15eb2a];if(_0x15eb['XUNFfU']===undefined){var _0x5dd147=function(_0x263f1a){const _0x1f45fe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x59fe3d='',_0x20acc9='';for(let _0x443185=0x0,_0x1a4a0c,_0x4b3ef4,_0x4198d1=0x0;_0x4b3ef4=_0x263f1a['charAt'](_0x4198d1++);~_0x4b3ef4&&(_0x1a4a0c=_0x443185%0x4?_0x1a4a0c*0x40+_0x4b3ef4:_0x4b3ef4,_0x443185++%0x4)?_0x59fe3d+=String['fromCharCode'](0xff&_0x1a4a0c>>(-0x2*_0x443185&0x6)):0x0){_0x4b3ef4=_0x1f45fe['indexOf'](_0x4b3ef4);}for(let _0x49f9d2=0x0,_0x4dbc0e=_0x59fe3d['length'];_0x49f9d2<_0x4dbc0e;_0x49f9d2++){_0x20acc9+='%'+('00'+_0x59fe3d['charCodeAt'](_0x49f9d2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20acc9);};_0x15eb['nUxdVS']=_0x5dd147,_0x2c5b78=arguments,_0x15eb['XUNFfU']=!![];}const _0x5376ce=_0x5a8fe5[0x0],_0x2725f9=_0x15eb2a+_0x5376ce,_0x5e3b67=_0x2c5b78[_0x2725f9];return!_0x5e3b67?(_0x13c82a=_0x15eb['nUxdVS'](_0x13c82a),_0x2c5b78[_0x2725f9]=_0x13c82a):_0x13c82a=_0x5e3b67,_0x13c82a;},_0x15eb(_0x2c5b78,_0x20741d);}(function(_0x6d481a,_0x40c8d8){const _0x219573=_0x15eb,_0x286c57=_0x6d481a();while(!![]){try{const _0xa710c0=parseInt(_0x219573(0x10d))/0x1*(-parseInt(_0x219573(0x118))/0x2)+parseInt(_0x219573(0x112))/0x3*(-parseInt(_0x219573(0x11a))/0x4)+-parseInt(_0x219573(0x11b))/0x5*(-parseInt(_0x219573(0x10b))/0x6)+-parseInt(_0x219573(0x10c))/0x7*(parseInt(_0x219573(0x10f))/0x8)+parseInt(_0x219573(0x111))/0x9+parseInt(_0x219573(0x117))/0xa+-parseInt(_0x219573(0x10a))/0xb*(parseInt(_0x219573(0x110))/0xc);if(_0xa710c0===_0x40c8d8)break;else _0x286c57['push'](_0x286c57['shift']());}catch(_0x4c2c35){_0x286c57['push'](_0x286c57['shift']());}}}(_0x5a8f,0x34928));const assissueSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'creator':{'type':String,'required':!![],'maxlength':0x400},'denom':{'type':String,'required':!![]},'amount':{'type':Number,'required':!![]},'signature':{'type':String,'required':!![]},'user_created':String,'date_created':{'type':Date,'default':Date[_0x4f27d1(0x114)]}});(global['configs']||{})[_0x4f27d1(0x113)]&&(assissueSchema['index']({'id_app':0x1}),assissueSchema[_0x4f27d1(0x10e)]({'denom':0x1}),assissueSchema['index']({'creator':0x1}),assissueSchema['index']({'user_created':0x1}),assissueSchema[_0x4f27d1(0x10e)]({'date_created':-0x1}));const model=mongoose[_0x4f27d1(0x115)][_0x4f27d1(0x116)]||mongoose[_0x4f27d1(0x119)](_0x4f27d1(0x116),assissueSchema);module['exports']=model;
@@ -1,15 +1 @@
1
- const async=require("async"),{ec}=require("elliptic-nodejs"),EC=new ec("secp256k1"),asskeySchema=new Schema({id_app:String,name:String,username:{type:String,required:!0,maxlength:1024,trim:!0},address:{type:String,required:!0,maxlength:2024,trim:!0},mnemonic:String,private_key:String,privateKey:String,note:String,wallet_type:{type:Number,default:9},asset:{type:String,uppercase:!0,trim:!0},balances:Schema.Types.Mixed,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,
2
- default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
3
- (global.configs||{}).createIndexes&&(asskeySchema.index({id_app:1}),asskeySchema.index({username:1,address:1}),asskeySchema.index({note:1}),asskeySchema.index({name:1}),asskeySchema.index({id_app:1,address:1},{unique:!0}),asskeySchema.index({status:1}),asskeySchema.index({user_created:1}),asskeySchema.index({username:"text",address:"text",note:"text",name:"text"},{name:"asskey_index"}));const model=mongoose.models.asskey||mongoose.model("asskey",asskeySchema);
4
- model.getCoinBalance=async($condition$$={},$options$$={})=>{if(!$condition$$.id_app)throw"H\u00e0m n\u00e0y y\u00eau c\u1ea7u \u0111i\u1ec1u ki\u1ec7n ch\u1ee9a id_app";const {bankBalancesGet:$bankBalancesGet$$}=require("../libs/blockchainconnect");let $items$$=await model.find($condition$$).lean();await new Promise(($rs$$,$rj$$)=>{async.mapSeries($items$$,($item$$,$cb$$)=>{setImmediate(async()=>{try{let $bls$$=await $bankBalancesGet$$($condition$$.id_app,$item$$.address);$options$$.denom&&($bls$$=
5
- $bls$$.filter($b$$=>$b$$.denom==$options$$.denom));let $needtobuys$$=await global.getModel("assneedtobuy").find({creator:$item$$.address,id_app:$item$$.id_app,trang_thai:"0"}).lean();$needtobuys$$=$needtobuys$$.filter($s$$=>$s$$.so_luong_con_lai>0&&$s$$.trang_thai=="0").map($s$$=>({denom:$s$$.denom,amount:$s$$.so_luong_con_lai*$s$$.gia_mua}));$bls$$=[...$bls$$,...$needtobuys$$];$bls$$.forEach($r$$=>{$r$$.amount=Number($r$$.amount);$r$$.price=$r$$.price||1;$r$$.value=$r$$.price*$r$$.amount;delete $r$$.key});
6
- $item$$.balances=$bls$$;$cb$$()}catch($e$$){$cb$$($e$$)}})},$e$$=>{if($e$$)return $rj$$($e$$);$rs$$()})});return $items$$.map($item$$=>($item$$.balances||[]).map($bl$$=>$bl$$.value||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0)).reduce(($a$$,$b$$)=>$a$$+$b$$,0)};
7
- model.getInvestBalance=async($condition$$={})=>{if(!$condition$$.id_app)throw"H\u00e0m n\u00e0y y\u00eau c\u1ea7u \u0111i\u1ec1u ki\u1ec7n ch\u1ee9a id_app";const {bankBalancesGet:$bankBalancesGet$$}=require("../libs/blockchainconnect");let $items$$=await model.find($condition$$).lean();await new Promise(($rs$$,$rj$$)=>{async.mapSeries($items$$,($item$$,$cb$$)=>{setImmediate(async()=>{try{let $bls$$=(await $bankBalancesGet$$($condition$$.id_app,$item$$.address)).filter($b$$=>$b$$.denom!==configs.MAIN_DENOM),
8
- $sellings$$=await global.getModel("asssell").find({creator:$item$$.address,id_app:$item$$.id_app,trang_thai:"0"}).lean();$sellings$$=$sellings$$.filter($s$$=>$s$$.con_lai>0&&$s$$.trang_thai=="0").map($s$$=>({denom:$s$$.token,amount:$s$$.con_lai}));$bls$$=[...$bls$$,...$sellings$$];await $bls$$.asyncJoinModel2($condition$$.id_app,global.getModel("assinvestment"),{where:{denom:"token"},fields:[{price:"gia",id_investment:"id"}]});$bls$$=$bls$$.filter($b$$=>$b$$.id_investment);$bls$$.forEach($r$$=>{$r$$.amount=
9
- Number($r$$.amount);$r$$.price=$r$$.price||1;$r$$.value=$r$$.price*$r$$.amount;delete $r$$.key});$item$$.balances=$bls$$;$cb$$()}catch($e$$){$cb$$($e$$)}})},$e$$=>{if($e$$)return $rj$$($e$$);$rs$$()})});return $items$$.map($item$$=>($item$$.balances||[]).map($bl$$=>$bl$$.value||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0)).reduce(($a$$,$b$$)=>$a$$+$b$$,0)};const toHexString=$byteArray$$=>Array.from($byteArray$$,$byte$$=>("0"+($byte$$&255).toString(16)).slice(-2)).join("");
10
- model.createWallet=async($id_app$$,$username$$,$name$$="",$wallet_type$$=9,$save$$=!0)=>new Promise(($resolve$$,$reject$$)=>{try{let $privateKey$$=EC.genKeyPair().getPrivate().toString(8),$address$$=model.getPublicKeyFromPrivateKey($privateKey$$);if($save$$){let $wallet$$=new model({username:$username$$,user_created:$username$$,privateKey:$privateKey$$,address:$address$$,id_app:$id_app$$,wallet_type:$wallet_type$$,name:$name$$||$username$$});$wallet$$.save($e$$=>{if($e$$)return $reject$$(Error($e$$.message));
11
- $resolve$$($wallet$$)})}else $resolve$$({privateKey:$privateKey$$,address:$address$$})}catch($e$$){console.error($e$$),$reject$$(Error($e$$.message))}});model.getPrivateKey=async($id_app$$,$address$$)=>new Promise(($resolve$$,$reject$$)=>{model.findOne({id_app:$id_app$$,address:$address$$}).lean().then(async $rs$$=>{if($rs$$)return $resolve$$($rs$$.privateKey);$reject$$(Error("Not found wallet"))}).catch($e$$=>{$reject$$(Error($e$$.message))})});
12
- model.getPublicKeyFromPrivateKey=$key$jscomp$10_privateKey$$=>{$key$jscomp$10_privateKey$$=EC.keyFromPrivate($key$jscomp$10_privateKey$$,"hex");return`${global.configs.ADDRESS_PREFIX||""}${$key$jscomp$10_privateKey$$.getPublic().encode("hex")}`};
13
- model.getUsername=async($id_app$$,$address$$)=>new Promise(($resolve$$,$reject$$)=>{model.findOne({id_app:$id_app$$,address:$address$$}).lean().then(async $rs$$=>$rs$$?$resolve$$($rs$$.username):$reject$$(Error("\u0110\u1ecba ch\u1ec9 v\u00ed n\u00e0y kh\u00f4ng t\u1ed3n t\u1ea1i"))).catch($e$$=>{$reject$$(Error($e$$.message))})});
14
- model.sign=async($id_app$$,$address$$,$dataToSign$$)=>{try{let $privateKey$$=await model.getPrivateKey($id_app$$,$address$$),$key$$=EC.keyFromPrivate($privateKey$$,"hex"),$msgHash$$=[JSON.stringify($dataToSign$$)];return toHexString($key$$.sign($msgHash$$).toDER())}catch($e$$){throw Error(`Can't sign data. Error: ${$e$$.message}`);}};
15
- model.verifySignature=async($address$jscomp$4_key$$,$data_msgHash$$,$signature$$)=>{configs.ADDRESS_PREFIX&&($address$jscomp$4_key$$=$address$jscomp$4_key$$.split(configs.ADDRESS_PREFIX).join(""));$address$jscomp$4_key$$=EC.keyFromPublic($address$jscomp$4_key$$,"hex");$data_msgHash$$=[JSON.stringify($data_msgHash$$)];return $address$jscomp$4_key$$.verify($data_msgHash$$,$signature$$)};module.exports=model;
1
+ const _0x1a92d4=_0x3bc8;(function(_0x3b8d1a,_0x34709f){const _0x44f559=_0x3bc8,_0x59b399=_0x3b8d1a();while(!![]){try{const _0x49bed8=-parseInt(_0x44f559(0x188))/0x1+-parseInt(_0x44f559(0x1aa))/0x2*(-parseInt(_0x44f559(0x183))/0x3)+parseInt(_0x44f559(0x197))/0x4+parseInt(_0x44f559(0x1e2))/0x5*(parseInt(_0x44f559(0x1c2))/0x6)+-parseInt(_0x44f559(0x1d9))/0x7+parseInt(_0x44f559(0x18e))/0x8*(-parseInt(_0x44f559(0x1db))/0x9)+parseInt(_0x44f559(0x1f9))/0xa*(-parseInt(_0x44f559(0x1d4))/0xb);if(_0x49bed8===_0x34709f)break;else _0x59b399['push'](_0x59b399['shift']());}catch(_0x9b8fc8){_0x59b399['push'](_0x59b399['shift']());}}}(_0x202e,0x8f196));function _0x202e(){const _0x363f2b=['z2v0uhjPDMf0zuTLEq','BgvHBG','zMLUza','AxbzDg8','BLvuCLC','AvbJAKW','ENfruuW','Bw9KzwW','z2v0uhjPDMf0zq','z2LH','DMvYAwz5u2LNBMf0DxjL','sKPQAMS','uxbPzfi','CeXOrvK','CNfRvLK','z2v0sw52zxn0qMfSyw5Jzq','yxnZC2vSBa','Chv5BLu','rerkt1i','uwvAEgG','A0PfD3m','uK5zq1K','twL4zwq','svrxvg8','C29FBhvVBMDFy29Ux2XHAq','tezruha','EwjuzNK','Agv4','tufjtL9eru5ptq','C2LNBG','uM9bAxy','DMfSDwu','vwHmtxC','EhLus1e','BLjPEfC','sgfcBue','DhHkvhm','DKntCLm','zw5JB2rL','BwfW','vxjLDhi','sef1DuC','C2XPy2u','q0XREfy','CMvKDwnL','AM9PBG','EvvZEvC','BxfSz2m','qureuKvtu19quKvgsvG','Dg9Rzw4','z2v0uhvIBgLJ','AhH6Bvi','u25eD2y','vhLWzxm','DgHLBG','m0jNq2vHBG','r2vWs3a','q3vNDfO','A2v5','wen1uM4','ntG1mte0qNbWwfDV','Dg9tDhjPBMC','uMXYwLG','z2v0q29PBKjHBgfUy2u','veDVzeG','rNPwvKq','mtm2zwP2sfDj','yvfpDwG','BwfWu2vYAwvZ','y0vxBfa','ugHms00','vxzoB0u','DxnLCM5HBwu','rurqEK0','tgL4A1m','mZCXmtq4nhzMCu9Yvq','Dg9ervi','EerXC1G','sMrOv08','z2v0uhvIBgLJs2v5rNjVBvbYAxzHDgvlzxK','C21YvNq','swzRB1i','Agn2yMW','zwXSAxb0AwmTBM9KzwPZ','sLvJDKO','se1lA2W','A3LIueq','ALfXsuC','y2f0y2G','uwDwzKG','v3ngquG','A3PVEK8','tKPhse0','Ehz0tfK','odCZmJqWEgDoExj3','C2HuAeK','uuf0rxi','y29Ux2XHAq','z2v0tw9KzwW','rhLmqva','C0zuAuC','sMf1q0e','z3jjB0u','DKXZuwu','sxnTrum','C3bSAxq','AejnuKS','rhbIrLK','rMnJufq','zM9YrwfJAa','vK5LEue','z1z1wgW','EgjHzNG','BgvrCw8','wLD0wvO','yKP0A3u','t1nNAuu','A2v5rNjVBvbYAxzHDgu','mZzACwLNzKC','s3rwyK4','y3jLyxrLsw5KzxHLCW','zNjVBq','C3rYAw5NAwz5','z2Lkvwq','B3Hzshi','BM93','vLLtDg0','zhbVCKW','zgvUB20','vxPPuvu','r2rTtfm','y29UzMLNCW','smoGBsbUW6b5ihNdQNuGy+g6P3uGXjfP4BUbDsbRAEg7H24Gy2JHU6LHigLKx2fWCa','wuXQB2q','zhnku1i','yw1VDw50','mZqXmdeXv1PeuMXu','sNLswey','ChjPDMf0zuTLEq','tM90igzVDw5KihDHBgXLDa','z1zPsxu','mtiYodCYnhfAA3LYyG','BwvZC2fNzq','mZK4odyYvuzWsfjU','DLb1sK4','DLnmshC','BM5xquy','ChjPy2u','A2v5rNjVBvb1yMXPyW','ue9Nzfy','nZqYmJuWuK9kBw1z','r3fgwKe','mhW0Fdn8nxWXFdj8n3W2','yxnZA2v5x2LUzgv4','wxzTqvy','sfLKBxG','revZEuq','yxnZBMvLzhrVyNv5','yxn5BMnkB2LUtw9KzwWY','C2f2zq','zMLUze9Uzq','nNWZFdj8n3W1Fdr8mxWW','ChfVs2G','Aw5KzxG','AwrFyxbW','ywrKCMvZCW','BvDLsKe','XjdHU4THignO4BUjihBdRsbUW6b5igTOW7rUzYb04BUtBIb04BQHAq','DhjHBMDFDgHHAq','EvDbAeS','yMfSyw5Jzxm','lI4VBgLICY9IBg9JA2nOywLUy29UBMvJDa','BhrfEwy','ntbsrvfjzK4','u3zKrhm','Dgv4Da','v1jLBvO','DffcD1u','zMLSDgvY','z2v0vxnLCM5HBwu','ww1hCvO','zxjYB3i','rerfAfC','DMvYAwz5'];_0x202e=function(){return _0x363f2b;};return _0x202e();}const async=require('async'),{ec}=require(_0x1a92d4(0x19f)),EC=new ec('secp256k1'),asskeySchema=new Schema({'id_app':String,'name':String,'username':{'type':String,'required':!![],'maxlength':0x400,'trim':!![]},'address':{'type':String,'required':!![],'maxlength':0x7e8,'trim':!![]},'mnemonic':String,'private_key':String,'privateKey':String,'note':String,'wallet_type':{'type':Number,'default':0x9},'asset':{'type':String,'uppercase':!![],'trim':!![]},'balances':Schema[_0x1a92d4(0x181)][_0x1a92d4(0x162)],'exfields':Schema[_0x1a92d4(0x181)]['Mixed'],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x1a92d4(0x1c9)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});if((global[_0x1a92d4(0x1cf)]||{})[_0x1a92d4(0x1c4)]){const RQHGcU=_0x1a92d4(0x1ed)[_0x1a92d4(0x1b5)]('|');let CePNBX=0x0;while(!![]){switch(RQHGcU[CePNBX++]){case'0':asskeySchema[_0x1a92d4(0x1ef)]({'username':'text','address':'text','note':_0x1a92d4(0x1fb),'name':'text'},{'name':'asskey_index'});continue;case'1':asskeySchema['index']({'user_created':0x1});continue;case'2':asskeySchema[_0x1a92d4(0x1ef)]({'note':0x1});continue;case'3':asskeySchema['index']({'username':0x1,'address':0x1});continue;case'4':asskeySchema['index']({'status':0x1});continue;case'5':asskeySchema[_0x1a92d4(0x1ef)]({'id_app':0x1,'address':0x1},{'unique':!![]});continue;case'6':asskeySchema['index']({'id_app':0x1});continue;case'7':asskeySchema[_0x1a92d4(0x1ef)]({'name':0x1});continue;}break;}}const model=mongoose['models']['asskey']||mongoose[_0x1a92d4(0x153)]('asskey',asskeySchema);model[_0x1a92d4(0x18b)]=async(_0x92b676={},_0x504bca={})=>{const _0x3201fa=_0x1a92d4,_0x21ab82={'oxYHr':function(_0xc03c6f,_0x49b9c5){return _0xc03c6f(_0x49b9c5);},'JyRXF':function(_0x1a4250){return _0x1a4250();},'kybPD':_0x3201fa(0x1f3),'pLhEY':function(_0x10635e,_0x55dcf2){return _0x10635e!==_0x55dcf2;},'WRemZ':_0x3201fa(0x161),'DDJOR':_0x3201fa(0x1f5),'WSaqV':function(_0xb45f5e){return _0xb45f5e();},'aQOuh':_0x3201fa(0x1b2),'nRixW':function(_0x21c39c,_0x2363ad){return _0x21c39c(_0x2363ad);},'sFTiG':_0x3201fa(0x1f7)};if(!_0x92b676[_0x3201fa(0x1f0)])throw _0x3201fa(0x1d0);const {bankBalancesGet:_0x50d3e5}=_0x21ab82[_0x3201fa(0x16e)](require,_0x21ab82[_0x3201fa(0x1b0)]);let _0x42d35b=await model[_0x3201fa(0x14e)](_0x92b676)[_0x3201fa(0x14d)]();return await new Promise((_0x4325f7,_0x5411d1)=>{const _0x4a60ae=_0x3201fa,_0x19bafb={'KbkYY':function(_0x4293b0,_0x2fe9a1){return _0x4293b0===_0x2fe9a1;},'YvmAV':function(_0x26cfed,_0x3bd107){return _0x21ab82['oxYHr'](_0x26cfed,_0x3bd107);},'JUcvJ':function(_0x3c0f2d,_0xde903b){return _0x3c0f2d*_0xde903b;},'UNlKJ':_0x21ab82[_0x4a60ae(0x1a2)],'Eevyo':function(_0x2bea2e,_0x5c71f5){const _0x2723f6=_0x4a60ae;return _0x21ab82[_0x2723f6(0x159)](_0x2bea2e,_0x5c71f5);},'jQqIG':_0x21ab82[_0x4a60ae(0x1fc)],'DEsyD':'NGeOc','QpidR':function(_0x3cbab5,_0x14a94e,_0x16bca1){return _0x3cbab5(_0x14a94e,_0x16bca1);},'LsOYL':_0x21ab82[_0x4a60ae(0x15e)],'VNeyA':_0x4a60ae(0x1e9),'HMKkl':function(_0x1f581e){return _0x21ab82['WSaqV'](_0x1f581e);},'kzozO':function(_0x46267e,_0x5bfae3){return _0x46267e===_0x5bfae3;},'xDqsX':_0x21ab82[_0x4a60ae(0x18f)]};async['mapSeries'](_0x42d35b,(_0x3cb8f4,_0x54b9f8)=>{const _0x1c8a57=_0x4a60ae,_0x29a0d9={'cEWlP':function(_0x4c8669,_0x5dcda6){return _0x4c8669*_0x5dcda6;}};_0x19bafb[_0x1c8a57(0x1e6)](setImmediate,async()=>{const _0x3c2e62=_0x1c8a57,_0x47d8fd={'UhLMw':function(_0x3b8521,_0x43203f){return _0x19bafb['KbkYY'](_0x3b8521,_0x43203f);},'GqFZA':'AchRI','shThI':function(_0x45275d,_0x1a7386){const _0xe1e096=_0x3bc8;return _0x19bafb[_0xe1e096(0x1e6)](_0x45275d,_0x1a7386);},'YpCay':function(_0x39e5f8,_0x53e2a9){const _0xad6516=_0x3bc8;return _0x19bafb[_0xad6516(0x1a0)](_0x39e5f8,_0x53e2a9);},'mqlgc':function(_0x2eeb6a,_0x29846f){return _0x19bafb['YvmAV'](_0x2eeb6a,_0x29846f);},'QeZxh':_0x19bafb['UNlKJ']};try{if(_0x19bafb['Eevyo'](_0x19bafb[_0x3c2e62(0x1a3)],_0x19bafb[_0x3c2e62(0x1e8)])){let _0x494d0a=await _0x19bafb[_0x3c2e62(0x158)](_0x50d3e5,_0x92b676[_0x3c2e62(0x1f0)],_0x3cb8f4['address']);_0x504bca[_0x3c2e62(0x1cc)]&&(_0x19bafb['LsOYL']!=='viiuO'?_0x494d0a=_0x494d0a[_0x3c2e62(0x1fe)](_0x1470f7=>_0x1470f7[_0x3c2e62(0x1cc)]==_0x504bca[_0x3c2e62(0x1cc)]):(_0x50e65e[_0x3c2e62(0x201)](_0x912c8e),_0x2c6ee7(new _0xc5a0b6(_0x3a0555[_0x3c2e62(0x1da)]))));let _0x480bb5=await global[_0x3c2e62(0x1ae)](_0x19bafb[_0x3c2e62(0x1ba)])['find']({'creator':_0x3cb8f4[_0x3c2e62(0x1f1)],'id_app':_0x3cb8f4[_0x3c2e62(0x1f0)],'trang_thai':'0'})['lean']();_0x480bb5=_0x480bb5['filter'](_0x4bbd4c=>_0x4bbd4c[_0x3c2e62(0x164)]>0x0&&_0x4bbd4c[_0x3c2e62(0x1f4)]=='0')[_0x3c2e62(0x173)](_0x5ec842=>{const _0x20c9ce=_0x3c2e62;return{'denom':_0x5ec842[_0x20c9ce(0x1cc)],'amount':_0x29a0d9[_0x20c9ce(0x191)](_0x5ec842[_0x20c9ce(0x164)],_0x5ec842['gia_mua'])};}),_0x494d0a=[..._0x494d0a,..._0x480bb5],_0x494d0a['forEach'](_0x41acf0=>{const _0x1efdbb=_0x3c2e62;if(_0x47d8fd[_0x1efdbb(0x16c)](_0x1efdbb(0x1a6),_0x47d8fd[_0x1efdbb(0x1e3)]))return{'denom':_0x5a8d32[_0x1efdbb(0x17d)],'amount':_0x51dcb0['con_lai']};else _0x41acf0[_0x1efdbb(0x1d3)]=_0x47d8fd[_0x1efdbb(0x1ab)](Number,_0x41acf0['amount']),_0x41acf0['price']=_0x41acf0[_0x1efdbb(0x1df)]||0x1,_0x41acf0[_0x1efdbb(0x16b)]=_0x47d8fd['YpCay'](_0x41acf0[_0x1efdbb(0x1df)],_0x41acf0['amount']),delete _0x41acf0[_0x1efdbb(0x186)];}),_0x3cb8f4[_0x3c2e62(0x1f6)]=_0x494d0a,_0x19bafb[_0x3c2e62(0x1a1)](_0x54b9f8);}else{const _0x129411={'POgdV':function(_0x35a573,_0x560dd5){const _0x2ac01b=_0x3c2e62;return _0x47d8fd[_0x2ac01b(0x1ab)](_0x35a573,_0x560dd5);}};let _0x21e59a=new _0xd49bb5((_0x692414,_0x162e0a)=>{const _0x2b1fc1=_0x3c2e62,_0x38a30f={'IfkoR':function(_0x3adf5e,_0x15ef56){return _0x3adf5e(_0x15ef56);},'JdhWO':'Địa\x20chỉ\x20ví\x20này\x20không\x20tồn\x20tại'};_0x318ee8[_0x2b1fc1(0x1ec)]({'id_app':_0x46be42,'address':_0x14ae90})[_0x2b1fc1(0x14d)]()[_0x2b1fc1(0x182)](async _0x4e2306=>{const _0x47ef52=_0x2b1fc1;if(!_0x4e2306)return _0x38a30f[_0x47ef52(0x19d)](_0x162e0a,new _0x54c359(_0x38a30f[_0x47ef52(0x19a)]));return _0x692414(_0x4e2306[_0x47ef52(0x194)]);})['catch'](_0x266235=>{const _0x2a4319=_0x2b1fc1;_0x129411[_0x2a4319(0x1e1)](_0x162e0a,new _0x1e452f(_0x266235['message']));});});return _0x21e59a;}}catch(_0x5519c9){if(_0x19bafb[_0x3c2e62(0x1a7)](_0x19bafb['xDqsX'],_0x19bafb[_0x3c2e62(0x199)]))_0x54b9f8(_0x5519c9);else{if(!_0x4ab771)return _0x47d8fd['mqlgc'](_0x216187,new _0xb7dd30(_0x47d8fd[_0x3c2e62(0x15f)]));return _0x47d8fd[_0x3c2e62(0x17b)](_0x537b39,_0x5ad736[_0x3c2e62(0x194)]);}}});},_0x4ec13f=>{const _0x4a2c83=_0x4a60ae;if(_0x4ec13f)return _0x21ab82[_0x4a2c83(0x1c8)](_0x5411d1,_0x4ec13f);_0x21ab82[_0x4a2c83(0x1d5)](_0x4325f7);});}),_0x42d35b[_0x3201fa(0x173)](_0x451bb9=>(_0x451bb9[_0x3201fa(0x1f6)]||[])[_0x3201fa(0x173)](_0x39cda3=>_0x39cda3['value']||0x0)['reduce']((_0x1cb5b7,_0x538454)=>_0x1cb5b7+_0x538454,0x0))['reduce']((_0x18c26f,_0x1cd88c)=>_0x18c26f+_0x1cd88c,0x0);},model[_0x1a92d4(0x15b)]=async(_0x5e560a={})=>{const _0x4566b4=_0x1a92d4,_0x584927={'LfXyJ':function(_0x266204,_0x5bc27a){return _0x266204(_0x5bc27a);},'mWeJA':function(_0x5f112a,_0x2f47e0){return _0x5f112a*_0x2f47e0;},'zqQQL':_0x4566b4(0x1e5),'Enlde':'BUhlK','vPuJN':function(_0x50968d,_0x105c82){return _0x50968d!==_0x105c82;},'rqkVY':_0x4566b4(0x18d),'gebRu':'BlPue','fKUSx':function(_0x1d27f1,_0x1f44bc,_0x5f17ac){return _0x1d27f1(_0x1f44bc,_0x5f17ac);},'UziQU':_0x4566b4(0x15c),'JauCA':'assinvestment','pcCtv':_0x4566b4(0x155),'yUsyW':function(_0x2ab62f){return _0x2ab62f();},'FccPT':function(_0x281d5c,_0x4c1a29){return _0x281d5c(_0x4c1a29);},'iPcjL':_0x4566b4(0x1d0),'ZWtYZ':function(_0x14866,_0x293f18){return _0x14866(_0x293f18);},'CugtZ':_0x4566b4(0x1f7)};if(!_0x5e560a['id_app'])throw _0x584927[_0x4566b4(0x151)];const {bankBalancesGet:_0x2e9d1e}=_0x584927[_0x4566b4(0x1be)](require,_0x584927[_0x4566b4(0x185)]);let _0x567ce5=await model[_0x4566b4(0x14e)](_0x5e560a)[_0x4566b4(0x14d)]();return await new Promise((_0xadcda3,_0x5cd9d5)=>{const _0x49315e=_0x4566b4,_0x18cd00={'YLjod':function(_0x38544e,_0x31ddbc){return _0x584927['LfXyJ'](_0x38544e,_0x31ddbc);},'pqoKh':function(_0x8734db,_0x559c4f){const _0x56ea41=_0x3bc8;return _0x584927[_0x56ea41(0x1f2)](_0x8734db,_0x559c4f);},'dporL':_0x584927[_0x49315e(0x152)],'UvNoE':_0x584927['Enlde'],'OSgiE':function(_0x562afa,_0x513161){const _0x19078c=_0x49315e;return _0x584927[_0x19078c(0x1dc)](_0x562afa,_0x513161);},'nUTrW':_0x584927[_0x49315e(0x15a)],'aAkQY':_0x584927['gebRu'],'lGeQN':function(_0x96670,_0x2f41dc,_0x3dd575){return _0x584927['fKUSx'](_0x96670,_0x2f41dc,_0x3dd575);},'IIlHD':_0x584927[_0x49315e(0x1cd)],'tQBwU':_0x584927[_0x49315e(0x1b1)],'xyTKQ':_0x584927['pcCtv'],'TGodH':function(_0x10eabf){const _0x13d47d=_0x49315e;return _0x584927[_0x13d47d(0x17a)](_0x10eabf);},'GGCEl':function(_0x234a87,_0x3b25cc){const _0x36b945=_0x49315e;return _0x584927[_0x36b945(0x1b8)](_0x234a87,_0x3b25cc);},'SnDwf':function(_0x11a713){return _0x11a713();}};async[_0x49315e(0x190)](_0x567ce5,(_0x488160,_0x11e4ff)=>{const _0x26360=_0x49315e,_0x53cb3a={'VYStm':function(_0x31f6ad,_0xe2dc){const _0x31059d=_0x3bc8;return _0x18cd00[_0x31059d(0x1d1)](_0x31f6ad,_0xe2dc);},'HgAVn':function(_0x3895b2,_0xe0f26){const _0x15ca47=_0x3bc8;return _0x18cd00[_0x15ca47(0x1ee)](_0x3895b2,_0xe0f26);},'iQMly':_0x18cd00[_0x26360(0x1cb)],'BHbXM':function(_0x129704,_0x33abf2){return _0x129704===_0x33abf2;},'oZPgD':_0x18cd00[_0x26360(0x193)],'GepKp':function(_0x18dde3,_0x12cd13){return _0x18dde3*_0x12cd13;},'SvdDs':function(_0x355f3a,_0x2a12bc){const _0x4cc6a9=_0x26360;return _0x18cd00[_0x4cc6a9(0x1c0)](_0x355f3a,_0x2a12bc);},'gViIu':_0x18cd00[_0x26360(0x150)],'nnWAF':_0x18cd00['aAkQY'],'HaBmA':function(_0x29ee63,_0x21f5b3,_0x5292e4){return _0x18cd00['lGeQN'](_0x29ee63,_0x21f5b3,_0x5292e4);},'IsmEC':_0x18cd00['IIlHD'],'WAhZZ':_0x18cd00[_0x26360(0x1fd)],'HAuuG':_0x18cd00[_0x26360(0x16d)],'LixkS':function(_0x46d44b){const _0xac49c7=_0x26360;return _0x18cd00[_0xac49c7(0x18c)](_0x46d44b);},'xbafx':'iPXnw'};setImmediate(async()=>{const _0x3a6a53=_0x26360,_0x3025d5={'GdmLS':_0x3a6a53(0x1e4),'EjFqT':'text','vCSrS':_0x53cb3a['iQMly'],'KHyGQ':function(_0x132e06,_0x3c2b47){return _0x53cb3a['BHbXM'](_0x132e06,_0x3c2b47);},'MBJqd':_0x53cb3a['oZPgD'],'ITWTo':function(_0x1557e9,_0x475a37){return _0x53cb3a['VYStm'](_0x1557e9,_0x475a37);},'xvtLY':function(_0xcfdda7,_0x28d758){const _0x2f7c3f=_0x3a6a53;return _0x53cb3a[_0x2f7c3f(0x184)](_0xcfdda7,_0x28d758);}};try{if(_0x53cb3a[_0x3a6a53(0x1fa)](_0x53cb3a[_0x3a6a53(0x1d8)],_0x53cb3a[_0x3a6a53(0x1de)])){let _0x1e3ee5=(await _0x53cb3a[_0x3a6a53(0x16f)](_0x2e9d1e,_0x5e560a[_0x3a6a53(0x1f0)],_0x488160[_0x3a6a53(0x1f1)]))[_0x3a6a53(0x1fe)](_0x5d9536=>_0x5d9536['denom']!==configs[_0x3a6a53(0x168)]),_0x695399=await global[_0x3a6a53(0x1ae)](_0x53cb3a[_0x3a6a53(0x1b4)])[_0x3a6a53(0x14e)]({'creator':_0x488160['address'],'id_app':_0x488160[_0x3a6a53(0x1f0)],'trang_thai':'0'})[_0x3a6a53(0x14d)]();_0x695399=_0x695399[_0x3a6a53(0x1fe)](_0x269ce0=>_0x269ce0[_0x3a6a53(0x1ad)]>0x0&&_0x269ce0[_0x3a6a53(0x1f4)]=='0')[_0x3a6a53(0x173)](_0x3337ae=>{const _0x26595e=_0x3a6a53;return{'denom':_0x3337ae[_0x26595e(0x17d)],'amount':_0x3337ae[_0x26595e(0x1ad)]};}),_0x1e3ee5=[..._0x1e3ee5,..._0x695399],await _0x1e3ee5[_0x3a6a53(0x1ea)](_0x5e560a[_0x3a6a53(0x1f0)],global[_0x3a6a53(0x1ae)](_0x53cb3a['WAhZZ']),{'where':{'denom':'token'},'fields':[{'price':_0x53cb3a[_0x3a6a53(0x175)],'id_investment':'id'}]}),_0x1e3ee5=_0x1e3ee5[_0x3a6a53(0x1fe)](_0x62354b=>_0x62354b['id_investment']),_0x1e3ee5[_0x3a6a53(0x1b9)](_0x21654a=>{const _0x3a41b2=_0x3a6a53,_0x16d6fd={'Vhxak':_0x3025d5[_0x3a41b2(0x1ce)],'HYdmx':_0x3025d5['EjFqT'],'AEmTY':_0x3025d5[_0x3a41b2(0x171)]};if(_0x3025d5['KHyGQ'](_0x3025d5['MBJqd'],_0x3025d5['MBJqd']))_0x21654a[_0x3a41b2(0x1d3)]=_0x3025d5[_0x3a41b2(0x163)](Number,_0x21654a['amount']),_0x21654a[_0x3a41b2(0x1df)]=_0x21654a['price']||0x1,_0x21654a['value']=_0x3025d5[_0x3a41b2(0x1a9)](_0x21654a[_0x3a41b2(0x1df)],_0x21654a[_0x3a41b2(0x1d3)]),delete _0x21654a[_0x3a41b2(0x186)];else{const _0x380975=_0x16d6fd['Vhxak'][_0x3a41b2(0x1b5)]('|');let _0x87775b=0x0;while(!![]){switch(_0x380975[_0x87775b++]){case'0':_0x731438[_0x3a41b2(0x1ef)]({'id_app':0x1});continue;case'1':_0x2f9e42[_0x3a41b2(0x1ef)]({'id_app':0x1,'address':0x1},{'unique':!![]});continue;case'2':_0x3d1884[_0x3a41b2(0x1ef)]({'status':0x1});continue;case'3':_0x36ebb2[_0x3a41b2(0x1ef)]({'note':0x1});continue;case'4':_0x1a97c0['index']({'username':0x1,'address':0x1});continue;case'5':_0x584ae0[_0x3a41b2(0x1ef)]({'name':0x1});continue;case'6':_0x49bb47['index']({'username':_0x16d6fd[_0x3a41b2(0x1e7)],'address':_0x16d6fd[_0x3a41b2(0x1e7)],'note':_0x3a41b2(0x1fb),'name':_0x16d6fd[_0x3a41b2(0x1e7)]},{'name':_0x16d6fd['AEmTY']});continue;case'7':_0x38dad5[_0x3a41b2(0x1ef)]({'user_created':0x1});continue;}break;}}}),_0x488160[_0x3a6a53(0x1f6)]=_0x1e3ee5,_0x53cb3a[_0x3a6a53(0x196)](_0x11e4ff);}else _0x134df5['amount']=_0x53cb3a[_0x3a6a53(0x1ca)](_0x504c33,_0x2e8bf1[_0x3a6a53(0x1d3)]),_0x24905e[_0x3a6a53(0x1df)]=_0xf7de0['price']||0x1,_0x173313[_0x3a6a53(0x16b)]=_0x53cb3a['HgAVn'](_0x5cbace['price'],_0x484a1e['amount']),delete _0x4bda2c[_0x3a6a53(0x186)];}catch(_0x27043e){if(_0x53cb3a['xbafx']===_0x53cb3a[_0x3a6a53(0x1bc)])_0x53cb3a[_0x3a6a53(0x1ca)](_0x11e4ff,_0x27043e);else{if(_0x137f62)return _0x53cb3a[_0x3a6a53(0x1ca)](_0x7426d8,new _0x38104c(_0x5da1d0['message']));_0x449b70(_0x5a95fc);}}});},_0x1e89b7=>{const _0x99ef4c=_0x49315e;if(_0x1e89b7)return _0x18cd00['GGCEl'](_0x5cd9d5,_0x1e89b7);_0x18cd00[_0x99ef4c(0x180)](_0xadcda3);});}),_0x567ce5[_0x4566b4(0x173)](_0x53ed6f=>(_0x53ed6f[_0x4566b4(0x1f6)]||[])[_0x4566b4(0x173)](_0x40ffbb=>_0x40ffbb[_0x4566b4(0x16b)]||0x0)[_0x4566b4(0x178)]((_0x34cf0f,_0x35629c)=>_0x34cf0f+_0x35629c,0x0))[_0x4566b4(0x178)]((_0x4a4ff1,_0x311197)=>_0x4a4ff1+_0x311197,0x0);};function _0x3bc8(_0x493f77,_0x2c9726){const _0x202e45=_0x202e();return _0x3bc8=function(_0x3bc862,_0x366109){_0x3bc862=_0x3bc862-0x14b;let _0x24baa8=_0x202e45[_0x3bc862];if(_0x3bc8['crGmxH']===undefined){var _0x37a94e=function(_0x260e31){const _0x5e3cb7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49c044='',_0x240000='';for(let _0x2a1c39=0x0,_0x11fa5a,_0x1f8953,_0x171626=0x0;_0x1f8953=_0x260e31['charAt'](_0x171626++);~_0x1f8953&&(_0x11fa5a=_0x2a1c39%0x4?_0x11fa5a*0x40+_0x1f8953:_0x1f8953,_0x2a1c39++%0x4)?_0x49c044+=String['fromCharCode'](0xff&_0x11fa5a>>(-0x2*_0x2a1c39&0x6)):0x0){_0x1f8953=_0x5e3cb7['indexOf'](_0x1f8953);}for(let _0x731438=0x0,_0x1a97c0=_0x49c044['length'];_0x731438<_0x1a97c0;_0x731438++){_0x240000+='%'+('00'+_0x49c044['charCodeAt'](_0x731438)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x240000);};_0x3bc8['OeEwor']=_0x37a94e,_0x493f77=arguments,_0x3bc8['crGmxH']=!![];}const _0x4041d5=_0x202e45[0x0],_0x13d343=_0x3bc862+_0x4041d5,_0x54c08b=_0x493f77[_0x13d343];return!_0x54c08b?(_0x24baa8=_0x3bc8['OeEwor'](_0x24baa8),_0x493f77[_0x13d343]=_0x24baa8):_0x24baa8=_0x54c08b,_0x24baa8;},_0x3bc8(_0x493f77,_0x2c9726);}const toHexString=_0x1fcc36=>{const _0x3a9706=_0x1a92d4,_0x599f5c={'dsJSR':function(_0x9ae523,_0x33d108){return _0x9ae523+_0x33d108;},'leQqo':function(_0x5603b1,_0x3362bf){return _0x5603b1&_0x3362bf;}};return Array[_0x3a9706(0x1c5)](_0x1fcc36,_0x28ce7b=>{const _0x3b98a0=_0x3a9706;return _0x599f5c[_0x3b98a0(0x1d2)]('0',_0x599f5c[_0x3b98a0(0x1bd)](_0x28ce7b,0xff)[_0x3b98a0(0x189)](0x10))[_0x3b98a0(0x176)](-0x2);})[_0x3a9706(0x179)]('');};model['createWallet']=async(_0x442828,_0x55cd38,_0x1eddbf='',_0x15c61c=0x9,_0x25b4ac=!![])=>{const _0x108c27={'ltEyf':function(_0x10b6c0,_0x12ed1a){return _0x10b6c0(_0x12ed1a);},'hxzmR':function(_0x2ce825,_0x49f7e7){return _0x2ce825(_0x49f7e7);},'NJGHM':function(_0x1b9ca7,_0x733052){return _0x1b9ca7===_0x733052;}};let _0x5da55d=new Promise((_0x4bbb3b,_0x156490)=>{const _0x597924=_0x3bc8,_0x44231b={'ybTfy':function(_0x503f28,_0x45f218){const _0x2c72b0=_0x3bc8;return _0x108c27[_0x2c72b0(0x17f)](_0x503f28,_0x45f218);}};try{let _0x2828cf=EC['genKeyPair'](),_0x2b9d61=_0x2828cf[_0x597924(0x154)]()[_0x597924(0x189)](0x8),_0x327860=model['getPublicKeyFromPrivateKey'](_0x2b9d61);if(!_0x25b4ac)_0x4bbb3b({'privateKey':_0x2b9d61,'address':_0x327860});else{let _0x3a91e5=new model({'username':_0x55cd38,'user_created':_0x55cd38,'privateKey':_0x2b9d61,'address':_0x327860,'id_app':_0x442828,'wallet_type':_0x15c61c,'name':_0x1eddbf||_0x55cd38});_0x3a91e5[_0x597924(0x1eb)](_0x3a02c7=>{const _0x255573=_0x597924;if(_0x3a02c7)return _0x44231b[_0x255573(0x166)](_0x156490,new Error(_0x3a02c7[_0x255573(0x1da)]));_0x44231b['ybTfy'](_0x4bbb3b,_0x3a91e5);});}}catch(_0x262301){_0x108c27[_0x597924(0x1a8)](_0x597924(0x192),_0x597924(0x192))?(console[_0x597924(0x201)](_0x262301),_0x108c27[_0x597924(0x1f8)](_0x156490,new Error(_0x262301[_0x597924(0x1da)]))):_0x108c27['ltEyf'](_0x48eedd,_0x418506);}});return _0x5da55d;},model[_0x1a92d4(0x14c)]=async(_0x19fbeb,_0x4053ca)=>{const _0x398e95=_0x1a92d4,_0x1ab7e1={'puynU':function(_0x2422d4,_0x543f83){return _0x2422d4(_0x543f83);},'PTJcH':_0x398e95(0x1d7),'DpbFY':function(_0x427026,_0x1bf135){return _0x427026(_0x1bf135);},'oBWPm':function(_0x1dced6,_0x1ba40d){return _0x1dced6(_0x1ba40d);},'rgZYz':_0x398e95(0x167),'QgVfH':function(_0x5608ea,_0x5555ee){return _0x5608ea===_0x5555ee;},'RlrZX':_0x398e95(0x200),'gVuXl':'sdEQz','yhSOb':_0x398e95(0x19c)};let _0x5a2190=new Promise((_0x568074,_0x4b24a9)=>{const _0xf8e972=_0x398e95,_0x4d793c={'Uretr':_0x1ab7e1['rgZYz'],'hBMRK':function(_0x551b71,_0x136fa5){const _0x35c538=_0x3bc8;return _0x1ab7e1[_0x35c538(0x1a5)](_0x551b71,_0x136fa5);},'kJEws':_0x1ab7e1[_0xf8e972(0x18a)],'vSLHw':function(_0x1746c7,_0x3c0c17){return _0x1746c7(_0x3c0c17);}};if(_0x1ab7e1[_0xf8e972(0x1bb)]!==_0x1ab7e1['yhSOb'])model['findOne']({'id_app':_0x19fbeb,'address':_0x4053ca})[_0xf8e972(0x14d)]()[_0xf8e972(0x182)](async _0x1cdcd8=>{const _0x33a55d=_0xf8e972;if(_0x1cdcd8)return _0x1ab7e1[_0x33a55d(0x15d)](_0x568074,_0x1cdcd8[_0x33a55d(0x1d6)]);_0x1ab7e1[_0x33a55d(0x15d)](_0x4b24a9,new Error(_0x1ab7e1['PTJcH']));})['catch'](_0x443cea=>{const _0x583575=_0xf8e972,_0x65f389={'XCuRn':_0x4d793c[_0x583575(0x174)]};if(_0x4d793c[_0x583575(0x1b6)](_0x4d793c[_0x583575(0x160)],_0x4d793c[_0x583575(0x160)]))_0x4d793c[_0x583575(0x1dd)](_0x4b24a9,new Error(_0x443cea[_0x583575(0x1da)]));else{let _0x4d00ef=_0x52b11a[_0x583575(0x1c1)](_0xe633bb,_0x65f389[_0x583575(0x187)]);return''+(_0x5bf2de[_0x583575(0x1cf)][_0x583575(0x17c)]||'')+_0x4d00ef[_0x583575(0x17e)]()[_0x583575(0x172)](_0x65f389[_0x583575(0x187)]);}});else{const _0x5e92db={'UZyJE':function(_0x5c910c,_0x2776ab){const _0x5924db=_0xf8e972;return _0x1ab7e1[_0x5924db(0x1b7)](_0x5c910c,_0x2776ab);},'vLsQe':function(_0x3692f1,_0x13c371){return _0x3692f1(_0x13c371);},'LFQPp':'Not\x20found\x20wallet','hcvbl':function(_0x1c86ba,_0x3d83cf){return _0x1ab7e1['oBWPm'](_0x1c86ba,_0x3d83cf);}};let _0x3c215e=new _0x5b2211((_0x23623a,_0x2835e4)=>{const _0x23bca7=_0xf8e972;_0x8973dd[_0x23bca7(0x1ec)]({'id_app':_0x6cd49d,'address':_0x31c7fa})[_0x23bca7(0x14d)]()[_0x23bca7(0x182)](async _0x5f214a=>{const _0x5c7989=_0x23bca7;if(_0x5f214a)return _0x5e92db['UZyJE'](_0x23623a,_0x5f214a['privateKey']);_0x5e92db[_0x5c7989(0x1b3)](_0x2835e4,new _0x23432d(_0x5e92db[_0x5c7989(0x165)]));})['catch'](_0x1ebf18=>{const _0x4262d8=_0x23bca7;_0x5e92db[_0x4262d8(0x19e)](_0x2835e4,new _0x23c093(_0x1ebf18[_0x4262d8(0x1da)]));});});return _0x3c215e;}});return _0x5a2190;},model[_0x1a92d4(0x19b)]=_0x4aae60=>{const _0x537917=_0x1a92d4,_0x407b32={'bJtku':_0x537917(0x167)};let _0x30d606=EC[_0x537917(0x1c1)](_0x4aae60,_0x407b32[_0x537917(0x1bf)]);return''+(global[_0x537917(0x1cf)]['ADDRESS_PREFIX']||'')+_0x30d606[_0x537917(0x17e)]()[_0x537917(0x172)]('hex');},model[_0x1a92d4(0x1ff)]=async(_0x2bc9cc,_0x46a839)=>{const _0x10d7b4=_0x1a92d4,_0x493ebe={'giJUd':function(_0x53ee48,_0x49d651){return _0x53ee48(_0x49d651);},'txJTs':_0x10d7b4(0x1f3),'CLkxV':_0x10d7b4(0x202)};let _0x574980=new Promise((_0x1d4b11,_0x265e19)=>{const _0x6bfebb=_0x10d7b4,_0x5b499e={'JFuiA':function(_0x18defc,_0x3092e9){return _0x18defc+_0x3092e9;},'EDPzM':function(_0x5b2ec9,_0x54ca8d){return _0x5b2ec9&_0x54ca8d;},'VTXXx':function(_0x10a9c4,_0x2f6fcf){return _0x10a9c4!==_0x2f6fcf;},'HFxFd':'bJqqL','RoAiv':_0x493ebe[_0x6bfebb(0x177)],'ipYto':function(_0x12ebdf,_0x1024da){return _0x12ebdf(_0x1024da);}};model[_0x6bfebb(0x1ec)]({'id_app':_0x2bc9cc,'address':_0x46a839})['lean']()[_0x6bfebb(0x182)](async _0x519cd8=>{const _0x39ceb7=_0x6bfebb;if(!_0x519cd8)return _0x493ebe[_0x39ceb7(0x1c7)](_0x265e19,new Error(_0x493ebe[_0x39ceb7(0x170)]));return _0x493ebe['giJUd'](_0x1d4b11,_0x519cd8['username']);})[_0x6bfebb(0x1a4)](_0x382e14=>{const _0x2de88e=_0x6bfebb;if(_0x5b499e['VTXXx'](_0x5b499e['HFxFd'],_0x5b499e[_0x2de88e(0x16a)]))_0x5b499e[_0x2de88e(0x14f)](_0x265e19,new Error(_0x382e14[_0x2de88e(0x1da)]));else return _0x5b499e['JFuiA']('0',_0x5b499e[_0x2de88e(0x195)](_0x582cb4,0xff)['toString'](0x10))[_0x2de88e(0x176)](-0x2);});});return _0x574980;},model[_0x1a92d4(0x169)]=async(_0x451c06,_0x1005c6,_0x3bc85e)=>{const _0x36f261=_0x1a92d4,_0x4641d0={'JJjjk':_0x36f261(0x167),'QAtEr':function(_0x42259a,_0xd1ce2a){return _0x42259a(_0xd1ce2a);},'DyLAP':_0x36f261(0x1c3)};try{let _0x4b2573=await model['getPrivateKey'](_0x451c06,_0x1005c6),_0x3fd996=EC[_0x36f261(0x1c1)](_0x4b2573,_0x4641d0[_0x36f261(0x157)]),_0x2397cf=[JSON[_0x36f261(0x1c6)](_0x3bc85e)];return _0x4641d0[_0x36f261(0x1ac)](toHexString,_0x3fd996['sign'](_0x2397cf)[_0x36f261(0x198)]());}catch(_0x5569c5){if(_0x4641d0['DyLAP']!==_0x4641d0[_0x36f261(0x1af)])_0x6b24ee=_0x32aead[_0x36f261(0x1fe)](_0x1410c0=>_0x1410c0[_0x36f261(0x1cc)]==_0x2bee0e['denom']);else throw new Error('Can\x27t\x20sign\x20data.\x20Error:\x20'+_0x5569c5[_0x36f261(0x1da)]);}},model[_0x1a92d4(0x156)]=async(_0x4b2939,_0x389806,_0xb097de)=>{const _0x44d210=_0x1a92d4,_0x529085={'UTXoy':_0x44d210(0x167)};if(configs[_0x44d210(0x17c)])_0x4b2939=_0x4b2939[_0x44d210(0x1b5)](configs[_0x44d210(0x17c)])[_0x44d210(0x179)]('');let _0x2b8d86=EC[_0x44d210(0x1e0)](_0x4b2939,_0x529085['UTXoy']),_0x1865c5=[JSON[_0x44d210(0x1c6)](_0x389806)];return _0x2b8d86[_0x44d210(0x14b)](_0x1865c5,_0xb097de);},module['exports']=model;
@@ -1,6 +1 @@
1
- const assneedtobuySchema=new Schema({id_app:String,creator:{type:String,required:!0,trim:!0},id:{type:String,trim:!0},id_product:{type:String,trim:!0},product_token:{type:String,lowercase:!0,trim:!0},ten_san_pham:{type:String},id_period:{type:String,required:!0,trim:!0},ten_ky_han:{type:String},ky_han:Number,gia_goc:Number,lai_suat_cam_ket:Number,ten_lh_dt:String,so_luong:Number,so_luong_da_mua:{type:Number,default:0},so_luong_con_lai:{type:Number,default:0},thoi_gian_con_lai:Number,gia_mua:Number,
2
- denom:{type:String,lowercase:!0,trim:!0},ngay_het_han:Date,trang_thai:String,signature:String,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
3
- (global.configs||{}).createIndexes&&(assneedtobuySchema.index({id_app:1}),assneedtobuySchema.index({creator:1}),assneedtobuySchema.index({id:1}),assneedtobuySchema.index({id_product:1}),assneedtobuySchema.index({product_token:1}),assneedtobuySchema.index({ten_san_pham:1}),assneedtobuySchema.index({id_period:1}),assneedtobuySchema.index({ten_ky_han:1}),assneedtobuySchema.index({ky_han:1}),assneedtobuySchema.index({gia_goc:1}),assneedtobuySchema.index({lai_suat_cam_ket:1}),assneedtobuySchema.index({ten_lh_dt:1}),
4
- assneedtobuySchema.index({so_luong:1}),assneedtobuySchema.index({ngay_het_han:1}),assneedtobuySchema.index({denom:1}),assneedtobuySchema.index({trang_thai:1}),assneedtobuySchema.index({status:1}),assneedtobuySchema.index({user_created:1}),assneedtobuySchema.index({creator:"text",ten_san_pham:"text",ten_ky_han:"text",denom:"text"},{name:"assneedtobuy_index2"}));const model=mongoose.models.assneedtobuy||mongoose.model("assneedtobuy",assneedtobuySchema);
5
- model.updateNeedToBy=async $item$$=>{$item$$.so_luong&&$item$$.gia_mua&&($item$$.tong_gia_tri=$item$$.so_luong*$item$$.gia_mua);$item$$.id_period!=void 0&&$item$$.id_period!=null&&await [$item$$].asyncJoinModel2($item$$.id_app,global.getModel("assperiod"),{where:$item$$=>({id:$item$$.id_period}),fields:["ten_ky_han","ten_lh_dt","id_product","ten_san_pham","denom",{gia_goc:"gia"},"lai_suat_cam_ket","lai_suat_truoc_han","ky_han","co_phan","ky_tinh_lai"]});$item$$.id_product!=void 0&&$item$$.id_product!=
6
- null&&await [$item$$].asyncJoinModel2($item$$.id_app,global.getModel("assproduct"),{where:{id_product:"id"},fields:["ten_san_pham","hinh_anh","logo","ma_loai",{product_token:"token"}]})};module.exports=model;
1
+ const _0x187c97=_0x42a9;function _0x42a9(_0x5820c4,_0x1ca29d){const _0x7eb17e=_0x7eb1();return _0x42a9=function(_0x42a9e3,_0x421141){_0x42a9e3=_0x42a9e3-0x1e7;let _0x33e937=_0x7eb17e[_0x42a9e3];if(_0x42a9['sWDvbW']===undefined){var _0x23a21e=function(_0x5cf24e){const _0x20f6b6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3a9b68='',_0x385492='';for(let _0x3677cb=0x0,_0xf09491,_0x548f25,_0x31532a=0x0;_0x548f25=_0x5cf24e['charAt'](_0x31532a++);~_0x548f25&&(_0xf09491=_0x3677cb%0x4?_0xf09491*0x40+_0x548f25:_0x548f25,_0x3677cb++%0x4)?_0x3a9b68+=String['fromCharCode'](0xff&_0xf09491>>(-0x2*_0x3677cb&0x6)):0x0){_0x548f25=_0x20f6b6['indexOf'](_0x548f25);}for(let _0x126dab=0x0,_0x50ddba=_0x3a9b68['length'];_0x126dab<_0x50ddba;_0x126dab++){_0x385492+='%'+('00'+_0x3a9b68['charCodeAt'](_0x126dab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x385492);};_0x42a9['NnLfCr']=_0x23a21e,_0x5820c4=arguments,_0x42a9['sWDvbW']=!![];}const _0x19f78c=_0x7eb17e[0x0],_0x2c28a4=_0x42a9e3+_0x19f78c,_0xfc2de=_0x5820c4[_0x2c28a4];return!_0xfc2de?(_0x33e937=_0x42a9['NnLfCr'](_0x33e937),_0x5820c4[_0x2c28a4]=_0x33e937):_0x33e937=_0xfc2de,_0x33e937;},_0x42a9(_0x5820c4,_0x1ca29d);}(function(_0x5627b6,_0x29a024){const _0xde2e2e=_0x42a9,_0x2fa2b3=_0x5627b6();while(!![]){try{const _0x252211=parseInt(_0xde2e2e(0x216))/0x1+-parseInt(_0xde2e2e(0x207))/0x2+parseInt(_0xde2e2e(0x1f5))/0x3+-parseInt(_0xde2e2e(0x1f8))/0x4*(parseInt(_0xde2e2e(0x1f9))/0x5)+parseInt(_0xde2e2e(0x1f7))/0x6+parseInt(_0xde2e2e(0x208))/0x7+-parseInt(_0xde2e2e(0x209))/0x8;if(_0x252211===_0x29a024)break;else _0x2fa2b3['push'](_0x2fa2b3['shift']());}catch(_0x3c2806){_0x2fa2b3['push'](_0x2fa2b3['shift']());}}}(_0x7eb1,0xc9aab));const assneedtobuySchema=new Schema({'id_app':String,'creator':{'type':String,'required':!![],'trim':!![]},'id':{'type':String,'trim':!![]},'id_product':{'type':String,'trim':!![]},'product_token':{'type':String,'lowercase':!![],'trim':!![]},'ten_san_pham':{'type':String},'id_period':{'type':String,'required':!![],'trim':!![]},'ten_ky_han':{'type':String},'ky_han':Number,'gia_goc':Number,'lai_suat_cam_ket':Number,'ten_lh_dt':String,'so_luong':Number,'so_luong_da_mua':{'type':Number,'default':0x0},'so_luong_con_lai':{'type':Number,'default':0x0},'thoi_gian_con_lai':Number,'gia_mua':Number,'denom':{'type':String,'lowercase':!![],'trim':!![]},'ngay_het_han':Date,'trang_thai':String,'signature':String,'exfields':Schema[_0x187c97(0x1ef)][_0x187c97(0x1f6)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x187c97(0x217)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});if((global[_0x187c97(0x205)]||{})[_0x187c97(0x1e8)]){const NxuQjN=_0x187c97(0x1f2)[_0x187c97(0x201)]('|');let mRqVUV=0x0;while(!![]){switch(NxuQjN[mRqVUV++]){case'0':assneedtobuySchema['index']({'gia_goc':0x1});continue;case'1':assneedtobuySchema['index']({'so_luong':0x1});continue;case'2':assneedtobuySchema[_0x187c97(0x1f4)]({'ky_han':0x1});continue;case'3':assneedtobuySchema[_0x187c97(0x1f4)]({'id_app':0x1});continue;case'4':assneedtobuySchema[_0x187c97(0x1f4)]({'id':0x1});continue;case'5':assneedtobuySchema['index']({'product_token':0x1});continue;case'6':assneedtobuySchema[_0x187c97(0x1f4)]({'creator':0x1});continue;case'7':assneedtobuySchema['index']({'user_created':0x1});continue;case'8':assneedtobuySchema[_0x187c97(0x1f4)]({'lai_suat_cam_ket':0x1});continue;case'9':assneedtobuySchema[_0x187c97(0x1f4)]({'creator':_0x187c97(0x1ea),'ten_san_pham':_0x187c97(0x1ea),'ten_ky_han':_0x187c97(0x1ea),'denom':_0x187c97(0x1ea)},{'name':_0x187c97(0x20a)});continue;case'10':assneedtobuySchema['index']({'ten_ky_han':0x1});continue;case'11':assneedtobuySchema[_0x187c97(0x1f4)]({'id_product':0x1});continue;case'12':assneedtobuySchema[_0x187c97(0x1f4)]({'status':0x1});continue;case'13':assneedtobuySchema[_0x187c97(0x1f4)]({'ngay_het_han':0x1});continue;case'14':assneedtobuySchema[_0x187c97(0x1f4)]({'denom':0x1});continue;case'15':assneedtobuySchema[_0x187c97(0x1f4)]({'ten_san_pham':0x1});continue;case'16':assneedtobuySchema[_0x187c97(0x1f4)]({'id_period':0x1});continue;case'17':assneedtobuySchema[_0x187c97(0x1f4)]({'trang_thai':0x1});continue;case'18':assneedtobuySchema[_0x187c97(0x1f4)]({'ten_lh_dt':0x1});continue;}break;}}const model=mongoose[_0x187c97(0x20b)]['assneedtobuy']||mongoose['model']('assneedtobuy',assneedtobuySchema);function _0x7eb1(){const _0x7c4ee4=['yNr5DhC','AwrFChjVzhvJDa','C3bSAxq','ENHqru8','Dg9Rzw4','z2v0tw9KzwW','y29UzMLNCW','AwrFCgvYAw9K','mta1otC5nLjzwvH4yW','nJqXotG0n2XVtMTfqW','otK0mZK1mMHNr1PYCq','yxnZBMvLzhrVyNv5x2LUzgv4mG','Bw9KzwXZ','DgvUx2XOx2r0','DgvUx2T5x2HHBG','BgfPx3n1yxrFDhj1B2nFAgfU','B0rYEeG','yxn5BMnkB2LUtw9KzwWY','yxnZChjVzhvJDa','A3LFAgfU','C29FBhvVBMC','z2LHx211yq','C3byDKq','otiXntq1reDwq0vU','BM93','weHWBgy','zgvUB20','D3bYrem','qNriCuW','y3jLyxrLsw5KzxHLCW','EKnithu','Dgv4Da','rhbuzLe','DgvUx3nHBL9WAgfT','C1jyuNK','Dg9Uz19NAwfFDhjP','vhLWzxm','AgLUAf9HBMG','Ahf2BwC','m3W2Fdr8mtf8nxWXnxWXnNWXmhWYFdb8ohWXohWXFdeZFde0Fde3FdeYFdD8oq','AwrFyxbW','Aw5KzxG','nde5odGZm1b6s2DjrG','twL4zwq','mZm4otK1mKrnz3jyBq','mJiYmg5uqufjvG','mta4ntbAzKvwDLi','Bg9NBW','Dxrqt3u','BwfFBg9HAq','tMfxrxK','DxbKyxrLtMvLzfrVqNK'];_0x7eb1=function(){return _0x7c4ee4;};return _0x7eb1();}model[_0x187c97(0x1fe)]=async _0x3dd81e=>{const _0x3a69a4=_0x187c97,_0x4ff409={'utPOu':function(_0x470dd8,_0x3ff525){return _0x470dd8*_0x3ff525;},'XHplf':function(_0x51741a,_0x5463c3){return _0x51741a!=_0x5463c3;},'ZbauR':'assperiod','BtHqL':_0x3a69a4(0x20d),'wprDC':_0x3a69a4(0x20c),'AKdnq':_0x3a69a4(0x1ec),'spXvD':'gia','NaWEy':'lai_suat_cam_ket','btytw':'co_phan','zCHLu':function(_0x1e089b,_0x2e1afe){return _0x1e089b!=_0x2e1afe;},'DpTfQ':_0x3a69a4(0x211),'sRXRy':_0x3a69a4(0x1f0),'zxPEO':_0x3a69a4(0x1fa),'oDrxH':_0x3a69a4(0x1fc),'hqvmg':_0x3a69a4(0x203)};if(_0x3dd81e[_0x3a69a4(0x213)]&&_0x3dd81e[_0x3a69a4(0x214)])_0x3dd81e[_0x3a69a4(0x1ee)]=_0x4ff409[_0x3a69a4(0x1fb)](_0x3dd81e[_0x3a69a4(0x213)],_0x3dd81e[_0x3a69a4(0x214)]);_0x4ff409[_0x3a69a4(0x218)](_0x3dd81e[_0x3a69a4(0x206)],undefined)&&_0x4ff409[_0x3a69a4(0x218)](_0x3dd81e['id_period'],null)&&await[_0x3dd81e][_0x3a69a4(0x210)](_0x3dd81e[_0x3a69a4(0x1f3)],global[_0x3a69a4(0x204)](_0x4ff409['ZbauR']),{'where':_0x44f338=>{const _0x4ea9ae=_0x3a69a4;return{'id':_0x44f338[_0x4ea9ae(0x206)]};},'fields':[_0x4ff409[_0x3a69a4(0x1e7)],_0x4ff409[_0x3a69a4(0x21a)],_0x3a69a4(0x200),_0x4ff409['AKdnq'],_0x3a69a4(0x219),{'gia_goc':_0x4ff409[_0x3a69a4(0x215)]},_0x4ff409[_0x3a69a4(0x1fd)],_0x3a69a4(0x20e),_0x3a69a4(0x212),_0x4ff409[_0x3a69a4(0x1ff)],'ky_tinh_lai']}),_0x4ff409[_0x3a69a4(0x1e9)](_0x3dd81e[_0x3a69a4(0x200)],undefined)&&_0x4ff409[_0x3a69a4(0x1e9)](_0x3dd81e[_0x3a69a4(0x200)],null)&&await[_0x3dd81e][_0x3a69a4(0x210)](_0x3dd81e[_0x3a69a4(0x1f3)],global['getModel'](_0x4ff409[_0x3a69a4(0x1eb)]),{'where':{'id_product':'id'},'fields':[_0x3a69a4(0x1ec),_0x4ff409[_0x3a69a4(0x1ed)],_0x4ff409[_0x3a69a4(0x202)],_0x4ff409[_0x3a69a4(0x20f)],{'product_token':_0x4ff409[_0x3a69a4(0x1f1)]}]});},module['exports']=model;
@@ -1,7 +1 @@
1
- const assperiodSchema=new Schema({id_app:String,creator:{type:String,trim:!0},id:{type:String,trim:!0},ten_ky_han:{type:String},id_product:{type:String,trim:!0},ten_san_pham:{type:String},product_token:{type:String,lowercase:!0,trim:!0},gia:{type:Number,default:0},lai_suat_cam_ket:{type:Number,default:0},lai_suat_truoc_han:{type:Number,default:0},ky_han:{type:Number},ky_tinh_lai:{type:Number},chia_loi_nhuan:Boolean,loi_nhuan_duoc_chia:{type:Number,default:0},ngay_chia_loi_nhuan:Date,lai_suat_thoi_gian_con_lai:{type:Number,
2
- default:0},tong_so_token:{type:Number,default:0},da_dau_tu:{type:Number,default:0},da_dao_han:{type:Number,default:0},da_rut_von:{type:Number,default:0},cho_phep_rut_von:{type:Boolean},tg_xu_ly_rut_von:{type:Number,default:0},cho_phep_chuyen_nhuong:{type:Boolean},hoat_dong:{type:Boolean},denom:{type:String,trim:!0},co_phan:Boolean,goi_dau_tu:Boolean,ngay_phat_hanh:Date,id_rpt:String,lai_suat_tang_them_so_huu_token:{type:Number,default:0},token_so_huu:String,so_luong_so_huu:{type:Number,default:0},
3
- so_ngay_dau_tu_toi_thieu:{type:Number,default:0},tru_lai_da_tra:Boolean,ty_le_hoa_hong_groups:[],ky_tra_hoa_hong:Number,han_tt:{type:Number,default:1},trang_thai:String,signature:String,visible_to:{type:Number,default:0},visible_to_users:[String],visible_to_usergroups:[String],update_right:[String],delete_right:[String],exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},
4
- user_updated:{type:String,default:""}}),thongke=async $p$$=>{let $investments$$=await global.getModel("assinvestment").find({id_app:$p$$.id_app,id_period:$p$$.id,trang_thai:{$nin:["0","2","7"]}},{so_luong:1,da_rut_von:1,trang_thai:1}).lean();$p$$.da_dau_tu=$investments$$.map($ivt$$=>$ivt$$.so_luong).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$p$$.da_rut_von=$investments$$.map($ivt$$=>$ivt$$.da_rut_von||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$p$$.da_dao_han=$investments$$.filter($inv$$=>$inv$$.trang_thai=="5").map($ivt$$=>
5
- $ivt$$.so_luong).reduce(($a$$,$b$$)=>$a$$+$b$$,0)-$p$$.da_rut_von};assperiodSchema.post("find",async function($result$$){for(let $i$$=0;$i$$<$result$$.length;$i$$++){const $p$$=$result$$[$i$$];$p$$.id&&$p$$.id_app&&await thongke($p$$)}});assperiodSchema.post("findOne",async function($p$$){$p$$&&$p$$.id&&$p$$.id_app&&await thongke($p$$)});
6
- (global.configs||{}).createIndexes&&(assperiodSchema.index({id_app:1}),assperiodSchema.index({creator:1}),assperiodSchema.index({id:1}),assperiodSchema.index({ten_ky_han:1}),assperiodSchema.index({id_product:1}),assperiodSchema.index({product_token:1}),assperiodSchema.index({visible_to:1}),assperiodSchema.index({visible_to_users:1}),assperiodSchema.index({ten_san_pham:1}),assperiodSchema.index({co_phan:1}),assperiodSchema.index({ngay_phat_hanh:-1}),assperiodSchema.index({cho_phep_rut_von:1}),assperiodSchema.index({cho_phep_chuyen_nhuong:1}),
7
- assperiodSchema.index({hoat_dong:1}),assperiodSchema.index({denom:1}),assperiodSchema.index({trang_thai:1}),assperiodSchema.index({status:1}),assperiodSchema.index({user_created:1}),assperiodSchema.index({creator:"text",ten_san_pham:"text",ten_ky_han:"text",denom:"text"},{name:"assperiod_index2"}));const model=mongoose.models.assperiod||mongoose.model("assperiod",assperiodSchema);module.exports=model;
1
+ const _0x2b5628=_0x11af;function _0x11af(_0x16cffe,_0x4c3c9f){const _0x3b622e=_0x3b62();return _0x11af=function(_0x11af6c,_0x384046){_0x11af6c=_0x11af6c-0x84;let _0x4fabbc=_0x3b622e[_0x11af6c];if(_0x11af['xPFImA']===undefined){var _0x3f2155=function(_0x1d511d){const _0x3760c0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1acee1='',_0x3eddc8='';for(let _0x59f548=0x0,_0x280de6,_0x44ac2a,_0x4d80ac=0x0;_0x44ac2a=_0x1d511d['charAt'](_0x4d80ac++);~_0x44ac2a&&(_0x280de6=_0x59f548%0x4?_0x280de6*0x40+_0x44ac2a:_0x44ac2a,_0x59f548++%0x4)?_0x1acee1+=String['fromCharCode'](0xff&_0x280de6>>(-0x2*_0x59f548&0x6)):0x0){_0x44ac2a=_0x3760c0['indexOf'](_0x44ac2a);}for(let _0x4d0845=0x0,_0x303220=_0x1acee1['length'];_0x4d0845<_0x303220;_0x4d0845++){_0x3eddc8+='%'+('00'+_0x1acee1['charCodeAt'](_0x4d0845)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3eddc8);};_0x11af['LYmOXU']=_0x3f2155,_0x16cffe=arguments,_0x11af['xPFImA']=!![];}const _0x67dcd7=_0x3b622e[0x0],_0x5cb6e8=_0x11af6c+_0x67dcd7,_0x56630f=_0x16cffe[_0x5cb6e8];return!_0x56630f?(_0x4fabbc=_0x11af['LYmOXU'](_0x4fabbc),_0x16cffe[_0x5cb6e8]=_0x4fabbc):_0x4fabbc=_0x56630f,_0x4fabbc;},_0x11af(_0x16cffe,_0x4c3c9f);}(function(_0x35bb72,_0x2ad8e5){const _0x11008a=_0x11af,_0x5b5940=_0x35bb72();while(!![]){try{const _0x2e5cd7=parseInt(_0x11008a(0x89))/0x1*(parseInt(_0x11008a(0x99))/0x2)+parseInt(_0x11008a(0x9d))/0x3+-parseInt(_0x11008a(0xa6))/0x4+-parseInt(_0x11008a(0x87))/0x5*(parseInt(_0x11008a(0xa2))/0x6)+parseInt(_0x11008a(0x93))/0x7+parseInt(_0x11008a(0x88))/0x8+-parseInt(_0x11008a(0x95))/0x9;if(_0x2e5cd7===_0x2ad8e5)break;else _0x5b5940['push'](_0x5b5940['shift']());}catch(_0x25f305){_0x5b5940['push'](_0x5b5940['shift']());}}}(_0x3b62,0xec776));const assperiodSchema=new Schema({'id_app':String,'creator':{'type':String,'trim':!![]},'id':{'type':String,'trim':!![]},'ten_ky_han':{'type':String},'id_product':{'type':String,'trim':!![]},'ten_san_pham':{'type':String},'product_token':{'type':String,'lowercase':!![],'trim':!![]},'gia':{'type':Number,'default':0x0},'lai_suat_cam_ket':{'type':Number,'default':0x0},'lai_suat_truoc_han':{'type':Number,'default':0x0},'ky_han':{'type':Number},'ky_tinh_lai':{'type':Number},'chia_loi_nhuan':Boolean,'loi_nhuan_duoc_chia':{'type':Number,'default':0x0},'ngay_chia_loi_nhuan':Date,'lai_suat_thoi_gian_con_lai':{'type':Number,'default':0x0},'tong_so_token':{'type':Number,'default':0x0},'da_dau_tu':{'type':Number,'default':0x0},'da_dao_han':{'type':Number,'default':0x0},'da_rut_von':{'type':Number,'default':0x0},'cho_phep_rut_von':{'type':Boolean},'tg_xu_ly_rut_von':{'type':Number,'default':0x0},'cho_phep_chuyen_nhuong':{'type':Boolean},'hoat_dong':{'type':Boolean},'denom':{'type':String,'trim':!![]},'co_phan':Boolean,'goi_dau_tu':Boolean,'ngay_phat_hanh':Date,'id_rpt':String,'lai_suat_tang_them_so_huu_token':{'type':Number,'default':0x0},'token_so_huu':String,'so_luong_so_huu':{'type':Number,'default':0x0},'so_ngay_dau_tu_toi_thieu':{'type':Number,'default':0x0},'tru_lai_da_tra':Boolean,'ty_le_hoa_hong_groups':[],'ky_tra_hoa_hong':Number,'han_tt':{'type':Number,'default':0x1},'trang_thai':String,'signature':String,'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'visible_to_usergroups':[String],'update_right':[String],'delete_right':[String],'exfields':Schema[_0x2b5628(0x9e)][_0x2b5628(0x92)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date['now']},'date_updated':{'type':Date,'default':Date[_0x2b5628(0x9c)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}}),thongke=async _0x3b06a4=>{const _0x59efba=_0x2b5628,_0x25af33={'uRYqs':'assinvestment','jmzCO':function(_0x284c8a,_0x302a58){return _0x284c8a-_0x302a58;}};let _0x59adae=await global[_0x59efba(0xa0)](_0x25af33['uRYqs'])['find']({'id_app':_0x3b06a4[_0x59efba(0xa3)],'id_period':_0x3b06a4['id'],'trang_thai':{'$nin':['0','2','7']}},{'so_luong':0x1,'da_rut_von':0x1,'trang_thai':0x1})[_0x59efba(0x96)]();_0x3b06a4['da_dau_tu']=_0x59adae[_0x59efba(0x94)](_0x3ae193=>_0x3ae193[_0x59efba(0xa1)])[_0x59efba(0xa4)]((_0x105894,_0x17ee71)=>_0x105894+_0x17ee71,0x0),_0x3b06a4[_0x59efba(0x86)]=_0x59adae[_0x59efba(0x94)](_0x381697=>_0x381697['da_rut_von']||0x0)['reduce']((_0x45e20b,_0x32a42f)=>_0x45e20b+_0x32a42f,0x0),_0x3b06a4[_0x59efba(0xa5)]=_0x25af33[_0x59efba(0x85)](_0x59adae[_0x59efba(0x84)](_0x1f3d87=>_0x1f3d87['trang_thai']=='5')[_0x59efba(0x94)](_0x1b71a5=>_0x1b71a5[_0x59efba(0xa1)])['reduce']((_0x4b9186,_0x3e34f2)=>_0x4b9186+_0x3e34f2,0x0),_0x3b06a4['da_rut_von']);};function _0x3b62(){const _0x1d193d=['Bw9KzwXZ','z2v0tw9KzwW','C29FBhvVBMC','mtC3mtHZuxPKAhu','AwrFyxbW','CMvKDwnL','zgfFzgfVx2HHBG','mtC4mJi0nhnfrMXyza','zMLSDgvY','AM16q08','zgfFCNv0x3zVBG','mZa5nvPvDfb3sW','mtm5ndyXnJHXzK9Mv1m','mte4mda2n1n6rK16Ba','Cg9ZDa','Dgv4Da','yxnZCgvYAw9K','zMLUze9Uzq','BgvUz3rO','zxHWB3j0CW','yxnZCgvYAw9Kx2LUzgv4mG','rezlqKy','twL4zwq','mta1mJKZmdLzCuXhqwS','BwfW','mtm4ntaXmZzMr09Uu28','BgvHBG','C3bSAxq','Aw5KzxG','mKLRrxHZua','y29UzMLNCW','mNW1FdL8n3WXm3WXn3WXnNWXmxW0FdeYFdz8mtv8mtH8ohWXFdb8m3WXmhWXna','BM93','mta2mdiZourfzw9WCW','vhLWzxm'];_0x3b62=function(){return _0x1d193d;};return _0x3b62();}assperiodSchema[_0x2b5628(0x8a)]('find',async function(_0x9514d7){const _0x529bf4=_0x2b5628,_0x123c06={'DFKBF':function(_0x392edc,_0x578a20){return _0x392edc(_0x578a20);}};for(let _0x5cb180=0x0;_0x5cb180<_0x9514d7[_0x529bf4(0x8e)];_0x5cb180++){const _0x2076fb=_0x9514d7[_0x5cb180];_0x2076fb['id']&&_0x2076fb[_0x529bf4(0xa3)]&&await _0x123c06[_0x529bf4(0x91)](thongke,_0x2076fb);}}),assperiodSchema[_0x2b5628(0x8a)](_0x2b5628(0x8d),async function(_0x419368){const _0x2ee956=_0x2b5628;_0x419368&&_0x419368['id']&&_0x419368[_0x2ee956(0xa3)]&&await thongke(_0x419368);});if((global[_0x2b5628(0x9a)]||{})['createIndexes']){const upmLgH=_0x2b5628(0x9b)[_0x2b5628(0x97)]('|');let AAyLpK=0x0;while(!![]){switch(upmLgH[AAyLpK++]){case'0':assperiodSchema[_0x2b5628(0x98)]({'trang_thai':0x1});continue;case'1':assperiodSchema[_0x2b5628(0x98)]({'denom':0x1});continue;case'2':assperiodSchema[_0x2b5628(0x98)]({'id_app':0x1});continue;case'3':assperiodSchema[_0x2b5628(0x98)]({'status':0x1});continue;case'4':assperiodSchema[_0x2b5628(0x98)]({'ten_san_pham':0x1});continue;case'5':assperiodSchema[_0x2b5628(0x98)]({'creator':0x1});continue;case'6':assperiodSchema[_0x2b5628(0x98)]({'ngay_phat_hanh':-0x1});continue;case'7':assperiodSchema[_0x2b5628(0x98)]({'ten_ky_han':0x1});continue;case'8':assperiodSchema[_0x2b5628(0x98)]({'hoat_dong':0x1});continue;case'9':assperiodSchema['index']({'id':0x1});continue;case'10':assperiodSchema[_0x2b5628(0x98)]({'user_created':0x1});continue;case'11':assperiodSchema['index']({'visible_to_users':0x1});continue;case'12':assperiodSchema[_0x2b5628(0x98)]({'co_phan':0x1});continue;case'13':assperiodSchema[_0x2b5628(0x98)]({'id_product':0x1});continue;case'14':assperiodSchema['index']({'creator':'text','ten_san_pham':_0x2b5628(0x8b),'ten_ky_han':_0x2b5628(0x8b),'denom':_0x2b5628(0x8b)},{'name':_0x2b5628(0x90)});continue;case'15':assperiodSchema[_0x2b5628(0x98)]({'cho_phep_rut_von':0x1});continue;case'16':assperiodSchema[_0x2b5628(0x98)]({'visible_to':0x1});continue;case'17':assperiodSchema['index']({'product_token':0x1});continue;case'18':assperiodSchema[_0x2b5628(0x98)]({'cho_phep_chuyen_nhuong':0x1});continue;}break;}}const model=mongoose[_0x2b5628(0x9f)]['assperiod']||mongoose['model'](_0x2b5628(0x8c),assperiodSchema);module[_0x2b5628(0x8f)]=model;
@@ -1,13 +1 @@
1
- const assproductSchema=new Schema({id_app:String,creator:{type:String,required:!0,trim:!0},id:{type:String,trim:!0},ten_san_pham:{type:String,required:!0},mieu_ta:{type:String},tong_dien_tich:{type:String},chu_dau_tu:{type:String},gia_tri_hien_tai:{type:String},dia_chi:{type:String},hien_trang:{type:String},vi_tri:{type:String},thiet_ke:{type:String},tien_nghi:{type:String},hinh_anh:{type:String},video:{type:String},duoc_chuyen_thanh_cp:{type:Boolean},co_phan:Boolean,token:{type:String,required:!0,
2
- lowercase:!0,trim:!0},so_luong:{type:Number,default:0},so_luong_goi_dau_tu:{type:Number,default:0},tong_gia_tri_goi_dau_tu:{type:Number,default:0},tong_so_token_unactive:{type:Number,default:0},tong_gia_tri_unactive:{type:Number,default:0},da_dau_tu_unactive:{type:Number,default:0},gia_tri_da_dau_tu_unactive:{type:Number,default:0},signature:String,da_dau_tu:{type:Number,default:0},gia_tri_da_dau_tu:{type:Number,default:0},trang_thai:String,ma_loai:String,visible_to:{type:Number,default:0},visible_to_users:[String],
3
- visible_to_usergroups:[String],update_right:[String],delete_right:[String],exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}}),thongke=async $item$$=>{var $period_het_hoat_dong_periods_of_product$$=await global.getModel("assperiod").find({id_app:$item$$.id_app,id_product:$item$$.id.toString()}).lean();let $so_luong_goi_dau_tu$$=
4
- $period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.tong_so_token).reduce(($a$$,$b$$)=>$a$$+$b$$,0),$tong_gia_tri_goi_dau_tu$$=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.tong_so_token*$item$$.gia).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.da_dau_tu=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_dau_tu).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.gia_tri_da_dau_tu=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_dau_tu*$item$$.gia).reduce(($a$$,
5
- $b$$)=>$a$$+$b$$,0);$item$$.da_dao_han=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_dao_han).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.gia_tri_da_dao_han=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_dao_han*$item$$.gia).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.da_rut_von=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_rut_von).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.gia_tri_da_rut_von=$period_het_hoat_dong_periods_of_product$$.map($item$$=>
6
- $item$$.da_rut_von*$item$$.gia).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$period_het_hoat_dong_periods_of_product$$=$period_het_hoat_dong_periods_of_product$$.filter($p$$=>$p$$.hoat_dong==0);$item$$.tong_so_token_unactive=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.tong_so_token).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.tong_gia_tri_unactive=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.tong_so_token*$item$$.gia).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.da_dau_tu_unactive=
7
- $period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_dau_tu).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.gia_tri_da_dau_tu_unactive=$period_het_hoat_dong_periods_of_product$$.map($item$$=>$item$$.da_dau_tu*$item$$.gia).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$item$$.so_luong_goi_dau_tu=$so_luong_goi_dau_tu$$-$item$$.tong_so_token_unactive+$item$$.da_dau_tu_unactive;$item$$.tong_gia_tri_goi_dau_tu=$tong_gia_tri_goi_dau_tu$$-$item$$.tong_gia_tri_unactive+$item$$.gia_tri_da_dau_tu_unactive};
8
- assproductSchema.post("find",async function($result$$){for(let $i$$=0;$i$$<$result$$.length;$i$$++){const $item$$=$result$$[$i$$];$item$$.id&&$item$$.id_app&&await thongke($item$$)}});assproductSchema.post("findOne",async function($item$$){$item$$&&$item$$.id&&$item$$.id_app&&await thongke($item$$)});
9
- (global.configs||{}).createIndexes&&(assproductSchema.index({id_app:1}),assproductSchema.index({creator:1}),assproductSchema.index({id:1}),assproductSchema.index({ten_san_pham:1}),assproductSchema.index({duoc_chuyen_thanh_cp:1}),assproductSchema.index({token:1}),assproductSchema.index({id_app:1,token:1},{unique:!0}),assproductSchema.index({ma_loai:1}),assproductSchema.index({co_phan:1}),assproductSchema.index({trang_thai:1}),assproductSchema.index({visible_to:1}),assproductSchema.index({visible_to_users:1}),
10
- assproductSchema.index({status:1}),assproductSchema.index({user_created:1}),assproductSchema.index({creator:"text",ten_san_pham:"text",mieu_ta:"text",token:"text",ma_loai:"text"},{name:"assproduct_index3"}));const model=mongoose.models.assproduct||mongoose.model("assproduct",assproductSchema);
11
- model.getTokens=async($condition_id_app$$,$id_product$$,$id_period$$)=>{$condition_id_app$$={id_app:$condition_id_app$$};$id_product$$!==void 0&&($condition_id_app$$.id_product=$id_product$$);$id_period$$!==void 0&&($condition_id_app$$.id_period=$id_period$$);return await global.getModel("assinvestment").find($condition_id_app$$).lean()};
12
- model.getOwners=async($condition$$={})=>{if(!$condition$$.id_app)throw"H\u00e0m n\u00e0y y\u00eau c\u1ea7u \u0111i\u1ec1u ki\u1ec7n ch\u1ee9a id_app";let $id_app$$=$condition$$.id_app,$tokens$$=await model.getTokens($condition$$.id_app,$condition$$.id_product,$condition$$.id_period);const {denomBalancesGet:$denomBalancesGet$$}=require("../libs/blockchainconnect");return(await Promise.all($tokens$$.map($token$$=>(async()=>{try{let $bls$$=await $denomBalancesGet$$($id_app$$,$token$$.token);await $bls$$.asyncJoinModel2($condition$$.id_app,
13
- "asskey",{where:"address",fields:[{email:"username"}]});$bls$$=$bls$$.filter($b$$=>$b$$.email);await $bls$$.asyncJoinModel2(null,"user",{where:"email",fields:["name"]});$bls$$.forEach($b$$=>{$b$$.id_app=$token$$.id_app;$b$$.id_product=$token$$.id_product;$b$$.id_period=$token$$.id_period;$b$$.id_investment=$token$$.id});return $bls$$}catch($e$$){return console.error($e$$),[]}})()))).reduce(($a$$,$b$$)=>$a$$.concat($b$$),[])};module.exports=model;
1
+ const _0xa85c44=_0x15c9;(function(_0x19a649,_0x77517b){const _0x2f1741=_0x15c9,_0x5c7cd3=_0x19a649();while(!![]){try{const _0x5b91ca=-parseInt(_0x2f1741(0x121))/0x1*(-parseInt(_0x2f1741(0x133))/0x2)+-parseInt(_0x2f1741(0x12f))/0x3+-parseInt(_0x2f1741(0x132))/0x4*(parseInt(_0x2f1741(0x116))/0x5)+parseInt(_0x2f1741(0x13b))/0x6+-parseInt(_0x2f1741(0x13e))/0x7*(parseInt(_0x2f1741(0x120))/0x8)+-parseInt(_0x2f1741(0x110))/0x9*(parseInt(_0x2f1741(0x139))/0xa)+parseInt(_0x2f1741(0x155))/0xb;if(_0x5b91ca===_0x77517b)break;else _0x5c7cd3['push'](_0x5c7cd3['shift']());}catch(_0x502ac6){_0x5c7cd3['push'](_0x5c7cd3['shift']());}}}(_0x10a3,0x279c0));function _0x10a3(){const _0x49795d=['Aw5KzxG','ntmXnda2n2jPDvbuBq','zMLSDgvY','AwrFyxbW','zxHWB3j0CW','z2LH','zgfFzgf1x3r1x3vUywn0AxzL','lI4VBgLICY9IBg9JA2nOywLUy29UBMvJDa','Bw9KzwXZ','y3jLyxrLsw5KzxHLCW','z2v0tw9KzwW','uNHYBxe','mtr8mtf8n3W1Fdj8nNW5FdeZFdf8m3W4FdeYFdeWFdb8na','z2LHx3rYAv9Kyv9Kyw9FAgfU','yxnZCgvYAw9K','zw1HAwW','zgfFzgfVx2HHBG','rhfmwgW','ywXS','Dg9Uz19ZB190B2TLBG','z3rtv3C','Dg9Uz19NAwfFDhjPx2DVAv9KyxvFDhu','vfrOEuG','z1PcrLO','zxjYB3i','ugPewNC','yxnZChjVzhvJDf9PBMrLEdm','mtu2nJaWswHLDNzU','z2v0t3DUzxjZ','Dg9Uz19NAwfFDhjPx3vUywn0AxzL','tvfcEKq','wvv3Evi','DxnLCM5HBwu','mJe4otvluwHJzKq','Eu9zEfm','z2LHx3rYAv9Kyv9KyxvFDhvFDw5Hy3rPDMu','CxvqBfO','AhHHyuK','rNbXD00','uwryCxK','BM93','DLHHA0i','twL4zwq','mta2ndHds2LNv2i','mtDNCe54vuq','Dxbjq3C','zgfFzgf1x3r1','BwfW','DMjXCu4','vMjMzNO','BgvUz3rO','z2LHx3rYAv9Kyv9YDxrFDM9U','smoGBsbUW6b5ihNdQNuGy+g6P3uGXjfP4BUbDsbRAEg7H24Gy2JHU6LHigLKx2fWCa','DxnLCG','AwrFCgvYAw9K','Dg9Rzw4','Dgv4Da','y29Uy2f0','ntyZmJGZD1vXEwDJ','Dg9tDhjPBMC','zMLUze9Uzq','nJHPwKjvsKG','mtqWntHMu1nVree','wLvUyw4','AwrFChjVzhvJDa','C29FBhvVBMDFz29Px2rHDv90Dq','yxnZA2v5','C0f1B00','mtuWzgX0Avfi','DNr4u2e','mtG3mdCXnMzsBNH1tq','Cg9ZDa','DgvNCei','mtiWnePfuKPgrG','Dg9Uz19ZB190B2TLBL91BMfJDgL2zq','tgPhAuS','yxnZChjVzhvJDa','zM9YrwfJAa','Ehf5CLK','z2LHx3rYAv9Kyv9KyxvFDhu','CvLTvwC','yxnZAw52zxn0BwvUDa','vhLWzxm','z2v0vg9Rzw5Z','teX2thm','yxn5BMnkB2LUtw9KzwWY','ywrKCMvZCW','CMvKDwnL','yNjOCgq','zMLUza','BgvHBG','AwrFAw52zxn0BwvUDa','CML6AfO','zgfFCNv0x3zVBG','DMPUvwS'];_0x10a3=function(){return _0x49795d;};return _0x10a3();}function _0x15c9(_0x381ea6,_0x184804){const _0x10a327=_0x10a3();return _0x15c9=function(_0x15c913,_0x5b8aa7){_0x15c913=_0x15c913-0x108;let _0x431e85=_0x10a327[_0x15c913];if(_0x15c9['zPxxEs']===undefined){var _0x26fca9=function(_0x4c948c){const _0x17f6cb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31ab5c='',_0x2303b6='';for(let _0x240fb3=0x0,_0x3129ac,_0x508d95,_0x56ef7f=0x0;_0x508d95=_0x4c948c['charAt'](_0x56ef7f++);~_0x508d95&&(_0x3129ac=_0x240fb3%0x4?_0x3129ac*0x40+_0x508d95:_0x508d95,_0x240fb3++%0x4)?_0x31ab5c+=String['fromCharCode'](0xff&_0x3129ac>>(-0x2*_0x240fb3&0x6)):0x0){_0x508d95=_0x17f6cb['indexOf'](_0x508d95);}for(let _0x4c0a22=0x0,_0x122a8e=_0x31ab5c['length'];_0x4c0a22<_0x122a8e;_0x4c0a22++){_0x2303b6+='%'+('00'+_0x31ab5c['charCodeAt'](_0x4c0a22)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2303b6);};_0x15c9['MHwgRZ']=_0x26fca9,_0x381ea6=arguments,_0x15c9['zPxxEs']=!![];}const _0xf22c94=_0x10a327[0x0],_0x51f67c=_0x15c913+_0xf22c94,_0x2c5fc2=_0x381ea6[_0x51f67c];return!_0x2c5fc2?(_0x431e85=_0x15c9['MHwgRZ'](_0x431e85),_0x381ea6[_0x51f67c]=_0x431e85):_0x431e85=_0x2c5fc2,_0x431e85;},_0x15c9(_0x381ea6,_0x184804);}const assproductSchema=new Schema({'id_app':String,'creator':{'type':String,'required':!![],'trim':!![]},'id':{'type':String,'trim':!![]},'ten_san_pham':{'type':String,'required':!![]},'mieu_ta':{'type':String},'tong_dien_tich':{'type':String},'chu_dau_tu':{'type':String},'gia_tri_hien_tai':{'type':String},'dia_chi':{'type':String},'hien_trang':{'type':String},'vi_tri':{'type':String},'thiet_ke':{'type':String},'tien_nghi':{'type':String},'hinh_anh':{'type':String},'video':{'type':String},'duoc_chuyen_thanh_cp':{'type':Boolean},'co_phan':Boolean,'token':{'type':String,'required':!![],'lowercase':!![],'trim':!![]},'so_luong':{'type':Number,'default':0x0},'so_luong_goi_dau_tu':{'type':Number,'default':0x0},'tong_gia_tri_goi_dau_tu':{'type':Number,'default':0x0},'tong_so_token_unactive':{'type':Number,'default':0x0},'tong_gia_tri_unactive':{'type':Number,'default':0x0},'da_dau_tu_unactive':{'type':Number,'default':0x0},'gia_tri_da_dau_tu_unactive':{'type':Number,'default':0x0},'signature':String,'da_dau_tu':{'type':Number,'default':0x0},'gia_tri_da_dau_tu':{'type':Number,'default':0x0},'trang_thai':String,'ma_loai':String,'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'visible_to_usergroups':[String],'update_right':[String],'delete_right':[String],'exfields':Schema[_0xa85c44(0x147)][_0xa85c44(0x11f)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0xa85c44(0x11d)]},'date_updated':{'type':Date,'default':Date[_0xa85c44(0x11d)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}}),thongke=async _0x2612d2=>{const _0x555f3f=_0xa85c44,_0x118ec6={'vjnUk':function(_0x5d0057,_0x367a39){return _0x5d0057+_0x367a39;},'upICw':function(_0x34e9ba,_0x48eb6d){return _0x34e9ba-_0x48eb6d;}};let _0x19b4ac=await global[_0x555f3f(0x15e)](_0x555f3f(0x162))[_0x555f3f(0x14e)]({'id_app':_0x2612d2[_0x555f3f(0x157)],'id_product':_0x2612d2['id'][_0x555f3f(0x130)]()})[_0x555f3f(0x14f)](),_0x2e5a62=_0x19b4ac[_0x555f3f(0x124)](_0x2ac0c4=>_0x2ac0c4[_0x555f3f(0x108)])[_0x555f3f(0x14c)]((_0x1d7e55,_0x57a508)=>_0x1d7e55+_0x57a508,0x0),_0x174b18=_0x19b4ac[_0x555f3f(0x124)](_0x272d1c=>_0x272d1c[_0x555f3f(0x108)]*_0x272d1c[_0x555f3f(0x159)])[_0x555f3f(0x14c)]((_0xb1810a,_0x34b39e)=>_0xb1810a+_0x34b39e,0x0);_0x2612d2['da_dau_tu']=_0x19b4ac[_0x555f3f(0x124)](_0x27f4f7=>_0x27f4f7[_0x555f3f(0x123)])[_0x555f3f(0x14c)]((_0x519922,_0x24baab)=>_0x519922+_0x24baab,0x0),_0x2612d2[_0x555f3f(0x144)]=_0x19b4ac[_0x555f3f(0x124)](_0xab3575=>_0xab3575[_0x555f3f(0x123)]*_0xab3575[_0x555f3f(0x159)])[_0x555f3f(0x14c)]((_0x176b41,_0x5c7db7)=>_0x176b41+_0x5c7db7,0x0),_0x2612d2[_0x555f3f(0x164)]=_0x19b4ac[_0x555f3f(0x124)](_0x19caa5=>_0x19caa5[_0x555f3f(0x164)])['reduce']((_0x1def80,_0x40c1a3)=>_0x1def80+_0x40c1a3,0x0),_0x2612d2[_0x555f3f(0x161)]=_0x19b4ac[_0x555f3f(0x124)](_0x5c367a=>_0x5c367a[_0x555f3f(0x164)]*_0x5c367a[_0x555f3f(0x159)])[_0x555f3f(0x14c)]((_0xda171b,_0x3819a9)=>_0xda171b+_0x3819a9,0x0),_0x2612d2[_0x555f3f(0x152)]=_0x19b4ac[_0x555f3f(0x124)](_0x34fb38=>_0x34fb38[_0x555f3f(0x152)])[_0x555f3f(0x14c)]((_0x497ce8,_0x1f208c)=>_0x497ce8+_0x1f208c,0x0),_0x2612d2[_0x555f3f(0x128)]=_0x19b4ac['map'](_0x32a14a=>_0x32a14a['da_rut_von']*_0x32a14a['gia'])['reduce']((_0x56f974,_0x408523)=>_0x56f974+_0x408523,0x0);let _0x366b6f=_0x19b4ac[_0x555f3f(0x156)](_0x28544d=>_0x28544d['hoat_dong']==![]);_0x2612d2[_0x555f3f(0x13f)]=_0x366b6f['map'](_0x46439d=>_0x46439d[_0x555f3f(0x108)])[_0x555f3f(0x14c)]((_0x590dbb,_0x4ea1b9)=>_0x590dbb+_0x4ea1b9,0x0),_0x2612d2[_0x555f3f(0x112)]=_0x366b6f['map'](_0x552bcb=>_0x552bcb['tong_so_token']*_0x552bcb[_0x555f3f(0x159)])[_0x555f3f(0x14c)]((_0x3a8950,_0x2201df)=>_0x3a8950+_0x2201df,0x0),_0x2612d2[_0x555f3f(0x15a)]=_0x366b6f['map'](_0xb9ebb3=>_0xb9ebb3[_0x555f3f(0x123)])[_0x555f3f(0x14c)]((_0x16990a,_0x32a774)=>_0x16990a+_0x32a774,0x0),_0x2612d2[_0x555f3f(0x118)]=_0x366b6f[_0x555f3f(0x124)](_0x42a974=>_0x42a974[_0x555f3f(0x123)]*_0x42a974[_0x555f3f(0x159)])[_0x555f3f(0x14c)]((_0x9ade8c,_0x158d93)=>_0x9ade8c+_0x158d93,0x0),_0x2612d2[_0x555f3f(0x136)]=_0x118ec6[_0x555f3f(0x153)](_0x118ec6[_0x555f3f(0x122)](_0x2e5a62,_0x2612d2[_0x555f3f(0x13f)]),_0x2612d2[_0x555f3f(0x15a)]),_0x2612d2[_0x555f3f(0x10a)]=_0x118ec6[_0x555f3f(0x153)](_0x174b18-_0x2612d2[_0x555f3f(0x112)],_0x2612d2[_0x555f3f(0x118)]);};assproductSchema[_0xa85c44(0x13c)]('find',async function(_0x390470){const _0x53a777=_0xa85c44,_0x4539b0={'gZBFZ':function(_0x1d5a94,_0x3e57d3){return _0x1d5a94<_0x3e57d3;},'Vbffz':function(_0x43a1be,_0x2a39ba){return _0x43a1be===_0x2a39ba;},'QdXqy':'gNbvB','gGqgG':function(_0x515dc0,_0x57156e){return _0x515dc0(_0x57156e);}};for(let _0x318d5b=0x0;_0x4539b0[_0x53a777(0x10c)](_0x318d5b,_0x390470[_0x53a777(0x127)]);_0x318d5b++){const _0x47d1a1=_0x390470[_0x318d5b];if(_0x47d1a1['id']&&_0x47d1a1[_0x53a777(0x157)]){if(_0x4539b0[_0x53a777(0x126)](_0x4539b0[_0x53a777(0x11c)],_0x53a777(0x13d)))return _0x4e9782['error'](_0x5cec12),[];else await _0x4539b0['gGqgG'](thongke,_0x47d1a1);}}}),assproductSchema[_0xa85c44(0x13c)](_0xa85c44(0x131),async function(_0x3b0e12){const _0x196339=_0xa85c44;_0x3b0e12&&_0x3b0e12['id']&&_0x3b0e12[_0x196339(0x157)]&&await thongke(_0x3b0e12);});if((global['configs']||{})[_0xa85c44(0x15d)]){const vzFIKF=_0xa85c44(0x160)['split']('|');let soSPvU=0x0;while(!![]){switch(vzFIKF[soSPvU++]){case'0':assproductSchema[_0xa85c44(0x154)]({'user_created':0x1});continue;case'1':assproductSchema['index']({'co_phan':0x1});continue;case'2':assproductSchema[_0xa85c44(0x154)]({'duoc_chuyen_thanh_cp':0x1});continue;case'3':assproductSchema['index']({'trang_thai':0x1});continue;case'4':assproductSchema[_0xa85c44(0x154)]({'creator':_0xa85c44(0x12d),'ten_san_pham':_0xa85c44(0x12d),'mieu_ta':_0xa85c44(0x12d),'token':_0xa85c44(0x12d),'ma_loai':_0xa85c44(0x12d)},{'name':_0xa85c44(0x10f)});continue;case'5':assproductSchema[_0xa85c44(0x154)]({'ten_san_pham':0x1});continue;case'6':assproductSchema['index']({'token':0x1});continue;case'7':assproductSchema[_0xa85c44(0x154)]({'id':0x1});continue;case'8':assproductSchema['index']({'visible_to':0x1});continue;case'9':assproductSchema[_0xa85c44(0x154)]({'id_app':0x1,'token':0x1},{'unique':!![]});continue;case'10':assproductSchema['index']({'status':0x1});continue;case'11':assproductSchema[_0xa85c44(0x154)]({'creator':0x1});continue;case'12':assproductSchema[_0xa85c44(0x154)]({'visible_to_users':0x1});continue;case'13':assproductSchema[_0xa85c44(0x154)]({'ma_loai':0x1});continue;case'14':assproductSchema[_0xa85c44(0x154)]({'id_app':0x1});continue;}break;}}const model=mongoose[_0xa85c44(0x15c)][_0xa85c44(0x141)]||mongoose['model'](_0xa85c44(0x141),assproductSchema);model[_0xa85c44(0x148)]=async(_0x19e68b,_0x1a6c89,_0x477add)=>{const _0x1a437c=_0xa85c44,_0x1f3ebc={'FpqwM':function(_0x18200c,_0x9c343c){return _0x18200c!==_0x9c343c;},'sAuoM':function(_0x3fcb9d,_0x5531ef){return _0x3fcb9d!==_0x5531ef;}};let _0x2e9b23={'id_app':_0x19e68b};return _0x1f3ebc[_0x1a437c(0x11b)](_0x1a6c89,undefined)&&(_0x2e9b23['id_product']=_0x1a6c89),_0x1f3ebc[_0x1a437c(0x138)](_0x477add,undefined)&&(_0x2e9b23[_0x1a437c(0x12b)]=_0x477add),await global[_0x1a437c(0x15e)](_0x1a437c(0x146))[_0x1a437c(0x14e)](_0x2e9b23)[_0x1a437c(0x14f)]();},model[_0xa85c44(0x111)]=async(_0xd69fd4={})=>{const _0x180720=_0xa85c44,_0x5eb3e7={'iOXOf':'text','xqyrY':_0x180720(0x10f),'quPlZ':_0x180720(0x149),'rizhZ':function(_0x364c24,_0x4b1b1b,_0x40353e){return _0x364c24(_0x4b1b1b,_0x40353e);},'gtSWw':_0x180720(0x115),'DqLXl':'email','hxaaI':'name','vbqqN':function(_0x21f69e,_0x1f19ab){return _0x21f69e!==_0x1f19ab;},'LjGiK':_0x180720(0x14d),'TThyH':_0x180720(0x129),'jDSYF':_0x180720(0x15b)};if(!_0xd69fd4[_0x180720(0x157)])throw _0x5eb3e7[_0x180720(0x10b)];let _0x56c9c0=_0xd69fd4[_0x180720(0x157)],_0x4b67d7=await model['getTokens'](_0xd69fd4[_0x180720(0x157)],_0xd69fd4[_0x180720(0x135)],_0xd69fd4[_0x180720(0x12b)]);const {denomBalancesGet:_0x23003a}=require(_0x5eb3e7['jDSYF']);return(await Promise[_0x180720(0x166)](_0x4b67d7[_0x180720(0x124)](_0x216d63=>{const _0x2709fa=_0x180720,_0x30403b={'MQBzD':_0x5eb3e7['iOXOf'],'qYmUg':_0x5eb3e7[_0x2709fa(0x143)],'ZUnan':function(_0x5efa8c,_0x54e0c7){return _0x5efa8c!==_0x54e0c7;},'PjDZw':_0x5eb3e7[_0x2709fa(0x119)],'zDdkR':_0x2709fa(0x114),'OlYaM':function(_0x44e07f,_0x156dd9,_0x2c69cc){const _0x32ec7f=_0x2709fa;return _0x5eb3e7[_0x32ec7f(0x151)](_0x44e07f,_0x156dd9,_0x2c69cc);},'vtxSa':_0x2709fa(0x137),'vXakB':_0x2709fa(0x14b),'nbPRF':_0x5eb3e7[_0x2709fa(0x109)],'yOYxS':_0x5eb3e7[_0x2709fa(0x165)],'hrvcM':_0x5eb3e7[_0x2709fa(0x11a)]};if(_0x5eb3e7[_0x2709fa(0x125)](_0x5eb3e7[_0x2709fa(0x140)],_0x5eb3e7[_0x2709fa(0x140)]))_0xd24a1b[_0x2709fa(0x12b)]=_0x3ccc48;else return((async()=>{const _0x532a67=_0x2709fa;if(_0x30403b['ZUnan'](_0x532a67(0x114),_0x30403b['zDdkR']))_0x389b40[_0x532a67(0x154)]({'id_app':0x1}),_0x5f2b1f[_0x532a67(0x154)]({'creator':0x1}),_0x540826[_0x532a67(0x154)]({'id':0x1}),_0x5609b8[_0x532a67(0x154)]({'ten_san_pham':0x1}),_0x3ba531['index']({'duoc_chuyen_thanh_cp':0x1}),_0x614cd4[_0x532a67(0x154)]({'token':0x1}),_0x434218[_0x532a67(0x154)]({'id_app':0x1,'token':0x1},{'unique':!![]}),_0xaeee03[_0x532a67(0x154)]({'ma_loai':0x1}),_0x7f3480['index']({'co_phan':0x1}),_0x382d00[_0x532a67(0x154)]({'trang_thai':0x1}),_0x21ef73['index']({'visible_to':0x1}),_0x26f3bf[_0x532a67(0x154)]({'visible_to_users':0x1}),_0x55984a[_0x532a67(0x154)]({'status':0x1}),_0x1a2bc6['index']({'user_created':0x1}),_0x4bfc8f[_0x532a67(0x154)]({'creator':_0x30403b[_0x532a67(0x113)],'ten_san_pham':_0x30403b[_0x532a67(0x113)],'mieu_ta':_0x532a67(0x12d),'token':_0x30403b[_0x532a67(0x113)],'ma_loai':_0x30403b[_0x532a67(0x113)]},{'name':_0x30403b[_0x532a67(0x145)]});else try{let _0x536640=await _0x30403b['OlYaM'](_0x23003a,_0x56c9c0,_0x216d63[_0x532a67(0x12c)]);return await _0x536640[_0x532a67(0x14a)](_0xd69fd4['id_app'],_0x30403b[_0x532a67(0x13a)],{'where':_0x30403b[_0x532a67(0x11e)],'fields':[{'email':_0x30403b['nbPRF']}]}),_0x536640=_0x536640[_0x532a67(0x156)](_0x56fbc8=>_0x56fbc8[_0x532a67(0x163)]),await _0x536640['asyncJoinModel2'](null,_0x532a67(0x12a),{'where':_0x30403b[_0x532a67(0x117)],'fields':[_0x30403b['hrvcM']]}),_0x536640[_0x532a67(0x142)](_0x5598c9=>{const _0x50e0cb=_0x532a67;_0x30403b[_0x50e0cb(0x134)](_0x50e0cb(0x15f),_0x30403b[_0x50e0cb(0x10e)])?(_0x5598c9[_0x50e0cb(0x157)]=_0x216d63[_0x50e0cb(0x157)],_0x5598c9[_0x50e0cb(0x135)]=_0x216d63[_0x50e0cb(0x135)],_0x5598c9[_0x50e0cb(0x12b)]=_0x216d63['id_period'],_0x5598c9[_0x50e0cb(0x150)]=_0x216d63['id']):(_0x6fb9b[_0x50e0cb(0x157)]=_0x19882c[_0x50e0cb(0x157)],_0x12248a['id_product']=_0x2269f0[_0x50e0cb(0x135)],_0x57dcd5['id_period']=_0x341823[_0x50e0cb(0x12b)],_0x4e18cf['id_investment']=_0x4ebc87['id']);}),_0x536640;}catch(_0x25212a){return console[_0x532a67(0x10d)](_0x25212a),[];}})());})))[_0x180720(0x14c)]((_0x2ebe0c,_0x61ef48)=>_0x2ebe0c[_0x180720(0x12e)](_0x61ef48),[]);},module[_0xa85c44(0x158)]=model;
@@ -1,4 +1 @@
1
- const assprofitsharingSchema=new Schema({id_app:String,creator:{type:String,required:!0,trim:!0},id:{type:String,trim:!0},id_product:{type:String,required:!0,trim:!0},ten_san_pham:{type:String},token:{type:String,lowercase:!0,trim:!0},id_period:String,denom:{type:String,required:!0,trim:!0},da_chia_loi_nhuan:Boolean,loi_nhuan_duoc_chia:Number,ngay_chia_loi_nhuan:Date,trang_thai:String,signature:String,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},
2
- date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
3
- (global.configs||{}).createIndexes&&(assprofitsharingSchema.index({id_app:1}),assprofitsharingSchema.index({creator:1}),assprofitsharingSchema.index({id:1}),assprofitsharingSchema.index({id_product:1}),assprofitsharingSchema.index({id_period:1}),assprofitsharingSchema.index({token:1}),assprofitsharingSchema.index({ten_san_pham:1}),assprofitsharingSchema.index({denom:1}),assprofitsharingSchema.index({trang_thai:1}),assprofitsharingSchema.index({status:1}),assprofitsharingSchema.index({user_created:1}),
4
- assprofitsharingSchema.index({creator:"text",ten_san_pham:"text",ten_ky_han:"text",denom:"text"},{name:"assprofitsharing_index2"}));const model=mongoose.models.assprofitsharing||mongoose.model("assprofitsharing",assprofitsharingSchema);module.exports=model;
1
+ function _0x8632(){const _0x2cc6df=['mtn3C05cCNy','yxnZChjVzML0C2HHCMLUzW','y29UzMLNCW','mtuYodK3ndbMrKXxreS','nZa3m0jfwhDXCq','vhLWzxm','nJaWnhvdEMjTvq','yxnZChjVzML0C2HHCMLUz19PBMrLEdi','mtu4n1P6ugDivW','nJa3mhjvyuLNAa','twL4zwq','ndC4nJG1CLzMvwD2','Aw5KzxG','otm0mJLntKvivgW','Bw9KzwXZ','nJG4Bhb0r0zQ','nNWYFdf8m3WXmxW4Fdv8oxWWFdeWFdD8na','nZa2otCYy0LQqKLQ','BM93','mNblv0T6uG','mtjKvxPUyxy','Dgv4Da','mtCZota4mfDABNfRBa','C3bSAxq'];_0x8632=function(){return _0x2cc6df;};return _0x8632();}const _0x107654=_0x5f08;(function(_0x5550bb,_0xba577e){const _0x5cfbc2=_0x5f08,_0x289384=_0x5550bb();while(!![]){try{const _0x54210d=parseInt(_0x5cfbc2(0x1a0))/0x1*(-parseInt(_0x5cfbc2(0x19e))/0x2)+-parseInt(_0x5cfbc2(0x195))/0x3*(-parseInt(_0x5cfbc2(0x193))/0x4)+parseInt(_0x5cfbc2(0x198))/0x5*(parseInt(_0x5cfbc2(0x1a1))/0x6)+parseInt(_0x5cfbc2(0x18b))/0x7+parseInt(_0x5cfbc2(0x19c))/0x8*(-parseInt(_0x5cfbc2(0x19a))/0x9)+parseInt(_0x5cfbc2(0x196))/0xa*(-parseInt(_0x5cfbc2(0x191))/0xb)+parseInt(_0x5cfbc2(0x190))/0xc*(parseInt(_0x5cfbc2(0x18d))/0xd);if(_0x54210d===_0xba577e)break;else _0x289384['push'](_0x289384['shift']());}catch(_0x429d57){_0x289384['push'](_0x289384['shift']());}}}(_0x8632,0x7e7a1));const assprofitsharingSchema=new Schema({'id_app':String,'creator':{'type':String,'required':!![],'trim':!![]},'id':{'type':String,'trim':!![]},'id_product':{'type':String,'required':!![],'trim':!![]},'ten_san_pham':{'type':String},'token':{'type':String,'lowercase':!![],'trim':!![]},'id_period':String,'denom':{'type':String,'required':!![],'trim':!![]},'da_chia_loi_nhuan':Boolean,'loi_nhuan_duoc_chia':Number,'ngay_chia_loi_nhuan':Date,'trang_thai':String,'signature':String,'exfields':Schema[_0x107654(0x192)][_0x107654(0x197)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x107654(0x19f)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});if((global[_0x107654(0x18f)]||{})['createIndexes']){const JgZobA=_0x107654(0x19d)[_0x107654(0x18c)]('|');let GvFGCC=0x0;while(!![]){switch(JgZobA[GvFGCC++]){case'0':assprofitsharingSchema['index']({'trang_thai':0x1});continue;case'1':assprofitsharingSchema[_0x107654(0x199)]({'id':0x1});continue;case'2':assprofitsharingSchema[_0x107654(0x199)]({'creator':0x1});continue;case'3':assprofitsharingSchema['index']({'id_product':0x1});continue;case'4':assprofitsharingSchema[_0x107654(0x199)]({'creator':_0x107654(0x18a),'ten_san_pham':_0x107654(0x18a),'ten_ky_han':_0x107654(0x18a),'denom':_0x107654(0x18a)},{'name':_0x107654(0x194)});continue;case'5':assprofitsharingSchema[_0x107654(0x199)]({'ten_san_pham':0x1});continue;case'6':assprofitsharingSchema['index']({'id_app':0x1});continue;case'7':assprofitsharingSchema[_0x107654(0x199)]({'user_created':0x1});continue;case'8':assprofitsharingSchema[_0x107654(0x199)]({'token':0x1});continue;case'9':assprofitsharingSchema['index']({'denom':0x1});continue;case'10':assprofitsharingSchema[_0x107654(0x199)]({'status':0x1});continue;case'11':assprofitsharingSchema[_0x107654(0x199)]({'id_period':0x1});continue;}break;}}const model=mongoose[_0x107654(0x19b)]['assprofitsharing']||mongoose['model'](_0x107654(0x18e),assprofitsharingSchema);function _0x5f08(_0x399f06,_0x1550f6){const _0x863275=_0x8632();return _0x5f08=function(_0x5f0823,_0x16f11c){_0x5f0823=_0x5f0823-0x18a;let _0x560e96=_0x863275[_0x5f0823];if(_0x5f08['CdMiqk']===undefined){var _0x32d7a4=function(_0x4bf22b){const _0xa3b2e7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1841e2='',_0x4b893f='';for(let _0x1a1056=0x0,_0x255571,_0x1e53bf,_0x5b1996=0x0;_0x1e53bf=_0x4bf22b['charAt'](_0x5b1996++);~_0x1e53bf&&(_0x255571=_0x1a1056%0x4?_0x255571*0x40+_0x1e53bf:_0x1e53bf,_0x1a1056++%0x4)?_0x1841e2+=String['fromCharCode'](0xff&_0x255571>>(-0x2*_0x1a1056&0x6)):0x0){_0x1e53bf=_0xa3b2e7['indexOf'](_0x1e53bf);}for(let _0x4192ef=0x0,_0x5b1a5a=_0x1841e2['length'];_0x4192ef<_0x5b1a5a;_0x4192ef++){_0x4b893f+='%'+('00'+_0x1841e2['charCodeAt'](_0x4192ef)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4b893f);};_0x5f08['saMURR']=_0x32d7a4,_0x399f06=arguments,_0x5f08['CdMiqk']=!![];}const _0x311a2a=_0x863275[0x0],_0x955e21=_0x5f0823+_0x311a2a,_0x2e3cf7=_0x399f06[_0x955e21];return!_0x2e3cf7?(_0x560e96=_0x5f08['saMURR'](_0x560e96),_0x399f06[_0x955e21]=_0x560e96):_0x560e96=_0x2e3cf7,_0x560e96;},_0x5f08(_0x399f06,_0x1550f6);}module['exports']=model;
@@ -1,2 +1 @@
1
- const assreceiverSchema=new Schema({id_app:String,name:{type:String,maxlength:1024,required:!0},address:{type:String,required:!0,maxlength:2024,trim:!0},note:{type:String},exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
2
- (global.configs||{}).createIndexes&&(assreceiverSchema.index({id_app:1}),assreceiverSchema.index({address:1}),assreceiverSchema.index({name:1}),assreceiverSchema.index({note:1}),assreceiverSchema.index({status:1}),assreceiverSchema.index({user_created:1}),assreceiverSchema.index({address:"text",name:"text",note:"text"},{name:"assreceiver_index2"}));const model=mongoose.models.assreceiver||mongoose.model("assreceiver",assreceiverSchema);module.exports=model;
1
+ const _0x3db1e3=_0x1f10;(function(_0x1f3116,_0x50ea4c){const _0x5b40e1=_0x1f10,_0x1b527e=_0x1f3116();while(!![]){try{const _0x5d6289=parseInt(_0x5b40e1(0x158))/0x1+-parseInt(_0x5b40e1(0x15e))/0x2*(parseInt(_0x5b40e1(0x152))/0x3)+-parseInt(_0x5b40e1(0x151))/0x4*(parseInt(_0x5b40e1(0x15c))/0x5)+-parseInt(_0x5b40e1(0x154))/0x6*(parseInt(_0x5b40e1(0x159))/0x7)+-parseInt(_0x5b40e1(0x14d))/0x8+parseInt(_0x5b40e1(0x15d))/0x9+-parseInt(_0x5b40e1(0x14a))/0xa*(-parseInt(_0x5b40e1(0x15b))/0xb);if(_0x5d6289===_0x50ea4c)break;else _0x1b527e['push'](_0x1b527e['shift']());}catch(_0x13e78a){_0x1b527e['push'](_0x1b527e['shift']());}}}(_0x2a09,0x1ab7d));function _0x1f10(_0xf7ad45,_0x587add){const _0x2a09fd=_0x2a09();return _0x1f10=function(_0x1f1074,_0x21197d){_0x1f1074=_0x1f1074-0x14a;let _0xf80b80=_0x2a09fd[_0x1f1074];if(_0x1f10['ScVLCS']===undefined){var _0x5601ae=function(_0x2320c2){const _0x4f8f54='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x233c63='',_0x4b4702='';for(let _0x2df969=0x0,_0x355522,_0x5e1492,_0x5f425b=0x0;_0x5e1492=_0x2320c2['charAt'](_0x5f425b++);~_0x5e1492&&(_0x355522=_0x2df969%0x4?_0x355522*0x40+_0x5e1492:_0x5e1492,_0x2df969++%0x4)?_0x233c63+=String['fromCharCode'](0xff&_0x355522>>(-0x2*_0x2df969&0x6)):0x0){_0x5e1492=_0x4f8f54['indexOf'](_0x5e1492);}for(let _0x19ab94=0x0,_0x298463=_0x233c63['length'];_0x19ab94<_0x298463;_0x19ab94++){_0x4b4702+='%'+('00'+_0x233c63['charCodeAt'](_0x19ab94)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4b4702);};_0x1f10['oGEBkJ']=_0x5601ae,_0xf7ad45=arguments,_0x1f10['ScVLCS']=!![];}const _0x2157b8=_0x2a09fd[0x0],_0x29f935=_0x1f1074+_0x2157b8,_0x353b4e=_0xf7ad45[_0x29f935];return!_0x353b4e?(_0xf80b80=_0x1f10['oGEBkJ'](_0xf80b80),_0xf7ad45[_0x29f935]=_0xf80b80):_0xf80b80=_0x353b4e,_0xf80b80;},_0x1f10(_0xf7ad45,_0x587add);}function _0x2a09(){const _0xb17508=['Bw9KzwW','zxHWB3j0CW','mte2mtu4nfjLtKrIqG','BM93','mxWWFdr8mNW1Fdz8mW','vhLWzxm','otqXmdbqrg1fC1C','mtqYotHTzMTtsxG','yxnZCMvJzwL2zxi','mteXntiXnhrqB21cua','y29UzMLNCW','Aw5KzxG','Dgv4Da','nJC2mhHZC3bLBa','n3DgB2LqDG','C3bSAxq','mtfosKfQA3i','mtbivNn1Agi','mtC4mdyYm2fhCfPXtW','nZr4v2DvCxu','Bw9KzwXZ','ndu5mJG5mgPbDufPuW'];_0x2a09=function(){return _0xb17508;};return _0x2a09();}const assreceiverSchema=new Schema({'id_app':String,'name':{'type':String,'maxlength':0x400,'required':!![]},'address':{'type':String,'required':!![],'maxlength':0x7e8,'trim':!![]},'note':{'type':String},'exfields':Schema[_0x3db1e3(0x150)]['Mixed'],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x3db1e3(0x14e)]},'date_updated':{'type':Date,'default':Date[_0x3db1e3(0x14e)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});if((global[_0x3db1e3(0x155)]||{})['createIndexes']){const QCZOJD=_0x3db1e3(0x14f)[_0x3db1e3(0x15a)]('|');let zfXeSo=0x0;while(!![]){switch(QCZOJD[zfXeSo++]){case'0':assreceiverSchema[_0x3db1e3(0x156)]({'address':0x1});continue;case'1':assreceiverSchema['index']({'id_app':0x1});continue;case'2':assreceiverSchema['index']({'note':0x1});continue;case'3':assreceiverSchema[_0x3db1e3(0x156)]({'address':_0x3db1e3(0x157),'name':_0x3db1e3(0x157),'note':'text'},{'name':'assreceiver_index2'});continue;case'4':assreceiverSchema[_0x3db1e3(0x156)]({'name':0x1});continue;case'5':assreceiverSchema['index']({'status':0x1});continue;case'6':assreceiverSchema[_0x3db1e3(0x156)]({'user_created':0x1});continue;}break;}}const model=mongoose[_0x3db1e3(0x15f)][_0x3db1e3(0x153)]||mongoose[_0x3db1e3(0x14b)](_0x3db1e3(0x153),assreceiverSchema);module[_0x3db1e3(0x14c)]=model;