owl-progiciel 1.0.2 → 1.0.4
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.
- package/dist/api/routes/client.routes.d.ts +2 -0
- package/dist/api/routes/client.routes.js +1 -0
- package/dist/api/routes/item.routes.d.ts +2 -0
- package/dist/api/routes/item.routes.js +1 -0
- package/dist/api/routes/order.routes.d.ts +2 -0
- package/dist/api/routes/order.routes.js +1 -0
- package/dist/api/routes/preparation.routes.d.ts +2 -0
- package/dist/api/routes/preparation.routes.js +1 -0
- package/dist/api/routes/purchase.routes.d.ts +2 -0
- package/dist/api/routes/purchase.routes.js +1 -0
- package/dist/api/routes/reception.routes.d.ts +2 -0
- package/dist/api/routes/reception.routes.js +1 -0
- package/dist/api/routes/stock.routes.d.ts +2 -0
- package/dist/api/routes/stock.routes.js +1 -0
- package/dist/api/routes/supplier.routes.d.ts +2 -0
- package/dist/api/routes/supplier.routes.js +1 -0
- package/dist/api/routes/tax.routes.d.ts +2 -0
- package/dist/api/routes/tax.routes.js +1 -0
- package/dist/api/routes/user.routes.d.ts +2 -0
- package/dist/api/routes/user.routes.js +1 -0
- package/dist/api/server.d.ts +1 -0
- package/dist/api/server.js +1 -0
- package/dist/core/Entity.js +1 -1
- package/dist/core/EventBus.js +1 -1
- package/dist/core/{PrismaDatabase.d.ts → EventsDatabase.d.ts} +1 -3
- package/dist/core/EventsDatabase.js +1 -0
- package/dist/core/Manager.js +1 -1
- package/dist/core/events/ClientEvents.d.ts +1 -2
- package/dist/core/events/ClientEvents.js +1 -1
- package/dist/core/events/ItemEvents.d.ts +1 -2
- package/dist/core/events/ItemEvents.js +1 -1
- package/dist/core/events/OrderEvents.d.ts +1 -2
- package/dist/core/events/OrderEvents.js +1 -1
- package/dist/core/events/PreparationEvents.d.ts +1 -2
- package/dist/core/events/PreparationEvents.js +1 -1
- package/dist/core/events/PurchaseEvents.d.ts +1 -2
- package/dist/core/events/PurchaseEvents.js +1 -1
- package/dist/core/events/ReceptionEvents.d.ts +1 -2
- package/dist/core/events/ReceptionEvents.js +1 -1
- package/dist/core/events/StockEvents.d.ts +1 -2
- package/dist/core/events/StockEvents.js +1 -1
- package/dist/core/events/SupplierEvents.d.ts +1 -2
- package/dist/core/events/SupplierEvents.js +1 -1
- package/dist/core/events/TaxEvents.d.ts +1 -2
- package/dist/core/events/TaxEvents.js +1 -1
- package/dist/core/events/UserEvents.d.ts +1 -2
- package/dist/core/events/UserEvents.js +1 -1
- package/dist/entities/Client.js +1 -1
- package/dist/entities/Item.js +1 -1
- package/dist/entities/Order.js +1 -1
- package/dist/entities/Preparation.js +1 -1
- package/dist/entities/Purchase.js +1 -1
- package/dist/entities/Reception.js +1 -1
- package/dist/entities/Stock.js +1 -1
- package/dist/entities/Supplier.js +1 -1
- package/dist/entities/Tax.js +1 -1
- package/dist/entities/User.js +1 -1
- package/dist/index.js +1 -1
- package/dist/managers/ClientManager.js +1 -1
- package/dist/managers/ItemManager.js +1 -1
- package/dist/managers/OrderManager.js +1 -1
- package/dist/managers/PreparationManager.js +1 -1
- package/dist/managers/PurchaseManager.js +1 -1
- package/dist/managers/ReceptionManager.js +1 -1
- package/dist/managers/StockManager.js +1 -1
- package/dist/managers/SupplierManager.js +1 -1
- package/dist/managers/TaxManager.js +1 -1
- package/dist/managers/UserManager.js +1 -1
- package/dist/owl/OWLClient.d.ts +2 -2
- package/dist/owl/OWLClient.js +1 -1
- package/package.json +10 -2
- package/dist/core/PrismaDatabase.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a0_0x5c8747=a0_0x2ebc;(function(_0x27a720,_0x4b1628){const _0x1d7f64=a0_0x2ebc,_0x379d97=_0x27a720();while(!![]){try{const _0x42e08d=-parseInt(_0x1d7f64(0x177))/0x1*(parseInt(_0x1d7f64(0x182))/0x2)+parseInt(_0x1d7f64(0x171))/0x3*(parseInt(_0x1d7f64(0x173))/0x4)+-parseInt(_0x1d7f64(0x185))/0x5*(parseInt(_0x1d7f64(0x175))/0x6)+parseInt(_0x1d7f64(0x170))/0x7+-parseInt(_0x1d7f64(0x17e))/0x8+parseInt(_0x1d7f64(0x186))/0x9*(-parseInt(_0x1d7f64(0x18b))/0xa)+-parseInt(_0x1d7f64(0x17a))/0xb*(-parseInt(_0x1d7f64(0x18c))/0xc);if(_0x42e08d===_0x4b1628)break;else _0x379d97['push'](_0x379d97['shift']());}catch(_0x16929b){_0x379d97['push'](_0x379d97['shift']());}}}(a0_0x16f9,0x523b7));function a0_0x16f9(){const _0x3e5f4a=['findMany','client','2545208IsrJhe','status','/search','delete','8lVjncv','params','put','3027385EBgDpY','9UoUjil','/:id','send','json','map','5033730msduRW','12MaEimy','1660603vUltat','15CTypwN','post','424920ogNmCi','create','6SVdBSr','get','110033BHGNFY','message','update','15791347RWKdXu','body'];a0_0x16f9=function(){return _0x3e5f4a;};return a0_0x16f9();}import{Router}from'express';import{PrismaClient}from'@prisma/client';function a0_0x2ebc(_0x7ee55f,_0x940b4b){_0x7ee55f=_0x7ee55f-0x170;const _0x16f970=a0_0x16f9();let _0x2ebc2a=_0x16f970[_0x7ee55f];return _0x2ebc2a;}const prisma=new PrismaClient(),router=Router();router[a0_0x5c8747(0x172)]('/',async(_0x394669,_0x333eb5)=>{const _0x939e7e=a0_0x5c8747;try{const {taxes:_0x46e3af,..._0x30a4d3}=_0x394669[_0x939e7e(0x17b)],_0x59c49f=await prisma[_0x939e7e(0x17d)][_0x939e7e(0x174)]({'data':{..._0x30a4d3,'taxes':{'create':_0x46e3af?.[_0x939e7e(0x18a)](_0x1aee30=>({'tax':{'create':{..._0x1aee30}}}))||[]}},'include':{'taxes':{'include':{'tax':!![]}}}});_0x333eb5['json']({'id':_0x59c49f['id']});}catch(_0x1f7b86){_0x333eb5[_0x939e7e(0x17f)](0x1f4)[_0x939e7e(0x189)]({'error':_0x1f7b86[_0x939e7e(0x178)]});}}),router[a0_0x5c8747(0x176)]('/:id',async(_0x4126a2,_0x20f75a)=>{const _0x2f47a5=a0_0x5c8747;try{const {id:_0x3cd200}=_0x4126a2[_0x2f47a5(0x183)],_0x30cf93=await prisma[_0x2f47a5(0x17d)]['findUnique']({'where':{'id':Number(_0x3cd200)},'include':{'taxes':{'include':{'tax':!![]}}}});_0x20f75a[_0x2f47a5(0x189)](_0x30cf93);}catch(_0x7a2c02){_0x20f75a[_0x2f47a5(0x17f)](0x1f4)[_0x2f47a5(0x189)]({'error':_0x7a2c02['message']});}}),router[a0_0x5c8747(0x176)]('/',async(_0x273d7d,_0x494854)=>{const _0x4a79ef=a0_0x5c8747;try{const _0x148711=await prisma['client'][_0x4a79ef(0x17c)]({'include':{'taxes':{'include':{'tax':!![]}}}});_0x494854[_0x4a79ef(0x189)](_0x148711);}catch(_0x15d8b1){_0x494854[_0x4a79ef(0x17f)](0x1f4)['json']({'error':_0x15d8b1[_0x4a79ef(0x178)]});}}),router['post'](a0_0x5c8747(0x180),async(_0x22ea95,_0x3483ab)=>{const _0x251821=a0_0x5c8747;try{const _0x184a4e=_0x22ea95[_0x251821(0x17b)],_0x219b5d=await prisma['client'][_0x251821(0x17c)]({'where':_0x184a4e,'include':{'taxes':{'include':{'tax':!![]}}}});_0x3483ab[_0x251821(0x189)](_0x219b5d);}catch(_0xd2e793){_0x3483ab[_0x251821(0x17f)](0x1f4)[_0x251821(0x189)]({'error':_0xd2e793[_0x251821(0x178)]});}}),router[a0_0x5c8747(0x184)](a0_0x5c8747(0x187),async(_0x12b902,_0x3b93ee)=>{const _0x4826d7=a0_0x5c8747;try{const {id:_0x21c78a}=_0x12b902[_0x4826d7(0x183)],_0x22cc20=_0x12b902[_0x4826d7(0x17b)],_0x2851ca=await prisma[_0x4826d7(0x17d)][_0x4826d7(0x179)]({'where':{'id':Number(_0x21c78a)},'data':_0x22cc20});_0x3b93ee[_0x4826d7(0x189)](_0x2851ca);}catch(_0x55b71d){_0x3b93ee[_0x4826d7(0x17f)](0x1f4)[_0x4826d7(0x189)]({'error':_0x55b71d[_0x4826d7(0x178)]});}}),router[a0_0x5c8747(0x181)]('/:id',async(_0x38cc63,_0x3b35ab)=>{const _0x13bf35=a0_0x5c8747;try{const {id:_0x14fc43}=_0x38cc63['params'];await prisma[_0x13bf35(0x17d)]['delete']({'where':{'id':Number(_0x14fc43)}}),_0x3b35ab[_0x13bf35(0x17f)](0xcc)[_0x13bf35(0x188)]();}catch(_0x48a15a){_0x3b35ab[_0x13bf35(0x17f)](0x1f4)['json']({'error':_0x48a15a[_0x13bf35(0x178)]});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a1_0x4d6269=a1_0x2a30;(function(_0x160e9a,_0x23703d){const _0xf97fe5=a1_0x2a30,_0x236222=_0x160e9a();while(!![]){try{const _0x3e175e=-parseInt(_0xf97fe5(0xbc))/0x1*(parseInt(_0xf97fe5(0xc9))/0x2)+parseInt(_0xf97fe5(0xb3))/0x3+-parseInt(_0xf97fe5(0xc7))/0x4+-parseInt(_0xf97fe5(0xbb))/0x5*(parseInt(_0xf97fe5(0xaf))/0x6)+parseInt(_0xf97fe5(0xad))/0x7*(parseInt(_0xf97fe5(0xb2))/0x8)+-parseInt(_0xf97fe5(0xc2))/0x9+parseInt(_0xf97fe5(0xc1))/0xa*(parseInt(_0xf97fe5(0xae))/0xb);if(_0x3e175e===_0x23703d)break;else _0x236222['push'](_0x236222['shift']());}catch(_0x2a5a9c){_0x236222['push'](_0x236222['shift']());}}}(a1_0x2dba,0x8ae76));import{Router}from'express';import{PrismaClient}from'@prisma/client';function a1_0x2dba(){const _0x15e86b=['post','status','findMany','message','663484YEpilz','/search','61382hfNGHN','506191TwIYFv','11rqjkzE','30pVKVAV','get','create','8QSMzpi','1783629uRvbiH','params','send','findUnique','update','delete','map','body','947165LIBNJF','9GoYOXV','put','json','item','/:id','16746590txpoKQ','3449790uaeBDh'];a1_0x2dba=function(){return _0x15e86b;};return a1_0x2dba();}const prisma=new PrismaClient(),router=Router();function a1_0x2a30(_0x181764,_0x54c748){_0x181764=_0x181764-0xad;const _0x2dba18=a1_0x2dba();let _0x2a3086=_0x2dba18[_0x181764];return _0x2a3086;}router[a1_0x4d6269(0xc3)]('/',async(_0x3cf2d1,_0x4de179)=>{const _0xa9a5ea=a1_0x4d6269;try{const {taxes:_0x29b469,..._0x13d215}=_0x3cf2d1[_0xa9a5ea(0xba)],_0x469466=await prisma[_0xa9a5ea(0xbf)][_0xa9a5ea(0xb1)]({'data':{..._0x13d215,'taxes':{'create':_0x29b469?.[_0xa9a5ea(0xb9)](_0x48ad50=>({'tax':{'create':{..._0x48ad50}}}))||[]}},'include':{'taxes':{'include':{'tax':!![]}}}});_0x4de179[_0xa9a5ea(0xbe)]({'id':_0x469466['id']});}catch(_0x425376){_0x4de179[_0xa9a5ea(0xc4)](0x1f4)[_0xa9a5ea(0xbe)]({'error':_0x425376[_0xa9a5ea(0xc6)]});}}),router[a1_0x4d6269(0xb0)]('/:id',async(_0xba465,_0x25f2e8)=>{const _0x5b4173=a1_0x4d6269;try{const {id:_0x35fff3}=_0xba465[_0x5b4173(0xb4)],_0x37c519=await prisma[_0x5b4173(0xbf)][_0x5b4173(0xb6)]({'where':{'id':Number(_0x35fff3)},'include':{'taxes':{'include':{'tax':!![]}}}});_0x25f2e8['json'](_0x37c519);}catch(_0x2748f9){_0x25f2e8[_0x5b4173(0xc4)](0x1f4)[_0x5b4173(0xbe)]({'error':_0x2748f9['message']});}}),router[a1_0x4d6269(0xb0)]('/',async(_0x516392,_0x3d71cb)=>{const _0x24251b=a1_0x4d6269;try{const _0x3b2494=await prisma[_0x24251b(0xbf)][_0x24251b(0xc5)]({'include':{'taxes':{'include':{'tax':!![]}}}});_0x3d71cb[_0x24251b(0xbe)](_0x3b2494);}catch(_0x2c0b18){_0x3d71cb[_0x24251b(0xc4)](0x1f4)[_0x24251b(0xbe)]({'error':_0x2c0b18['message']});}}),router['post'](a1_0x4d6269(0xc8),async(_0x20a2f0,_0x12d50e)=>{const _0x120cab=a1_0x4d6269;try{const _0x444ba1=_0x20a2f0['body'],_0x2522b2=await prisma[_0x120cab(0xbf)][_0x120cab(0xc5)]({'where':_0x444ba1,'include':{'taxes':{'include':{'tax':!![]}}}});_0x12d50e[_0x120cab(0xbe)](_0x2522b2);}catch(_0x18d573){_0x12d50e[_0x120cab(0xc4)](0x1f4)[_0x120cab(0xbe)]({'error':_0x18d573['message']});}}),router[a1_0x4d6269(0xbd)](a1_0x4d6269(0xc0),async(_0x5d7142,_0x26abb9)=>{const _0x5e87c3=a1_0x4d6269;try{const {id:_0x4b9e05}=_0x5d7142[_0x5e87c3(0xb4)],_0x5d3755=_0x5d7142['body'],_0x36bab7=await prisma['item'][_0x5e87c3(0xb7)]({'where':{'id':Number(_0x4b9e05)},'data':_0x5d3755});_0x26abb9[_0x5e87c3(0xbe)](_0x36bab7);}catch(_0xc962f0){_0x26abb9['status'](0x1f4)['json']({'error':_0xc962f0[_0x5e87c3(0xc6)]});}}),router[a1_0x4d6269(0xb8)]('/:id',async(_0x2133b3,_0x2debf3)=>{const _0x25b171=a1_0x4d6269;try{const {id:_0x279290}=_0x2133b3[_0x25b171(0xb4)];await prisma[_0x25b171(0xbf)][_0x25b171(0xb8)]({'where':{'id':Number(_0x279290)}}),_0x2debf3[_0x25b171(0xc4)](0xcc)[_0x25b171(0xb5)]();}catch(_0x486b7c){_0x2debf3[_0x25b171(0xc4)](0x1f4)[_0x25b171(0xbe)]({'error':_0x486b7c[_0x25b171(0xc6)]});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a2_0xf191(_0x48a003,_0x1a308c){_0x48a003=_0x48a003-0x16f;const _0x24d742=a2_0x24d7();let _0xf19152=_0x24d742[_0x48a003];return _0xf19152;}const a2_0x91fa55=a2_0xf191;(function(_0x18fd01,_0x4c063d){const _0x37b46b=a2_0xf191,_0x3113f5=_0x18fd01();while(!![]){try{const _0x835d22=-parseInt(_0x37b46b(0x177))/0x1+parseInt(_0x37b46b(0x179))/0x2+parseInt(_0x37b46b(0x188))/0x3*(-parseInt(_0x37b46b(0x170))/0x4)+parseInt(_0x37b46b(0x180))/0x5+-parseInt(_0x37b46b(0x175))/0x6*(-parseInt(_0x37b46b(0x176))/0x7)+parseInt(_0x37b46b(0x173))/0x8+parseInt(_0x37b46b(0x172))/0x9*(parseInt(_0x37b46b(0x187))/0xa);if(_0x835d22===_0x4c063d)break;else _0x3113f5['push'](_0x3113f5['shift']());}catch(_0x3d14ab){_0x3113f5['push'](_0x3113f5['shift']());}}}(a2_0x24d7,0x9cea4));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a2_0x24d7(){const _0xc9da9=['order','353670YgYycD','21GMRqSd','489125drpeSH','/search','518238gZBiwH','findMany','get','message','send','findUnique','status','1537075VIXBun','body','/:id','put','delete','update','json','10yuwnjQ','3uQIgPG','params','569548WOHKVo','post','465219CxWFIM','3833408CKDeSt'];a2_0x24d7=function(){return _0xc9da9;};return a2_0x24d7();}router[a2_0x91fa55(0x171)]('/',async(_0x575a1e,_0x291513)=>{const _0x201faa=a2_0x91fa55;try{const _0x265ac6=await prisma[_0x201faa(0x174)]['create']({'data':_0x575a1e[_0x201faa(0x181)]});_0x291513['json']({'id':_0x265ac6['id']});}catch(_0x340526){_0x291513[_0x201faa(0x17f)](0x1f4)[_0x201faa(0x186)]({'error':_0x340526['message']});}}),router[a2_0x91fa55(0x17b)]('/:id',async(_0x290c31,_0x459ace)=>{const _0x546d30=a2_0x91fa55;try{const {id:_0x22a6fc}=_0x290c31[_0x546d30(0x16f)],_0x3fbac6=await prisma[_0x546d30(0x174)][_0x546d30(0x17e)]({'where':{'id':Number(_0x22a6fc)}});_0x459ace[_0x546d30(0x186)](_0x3fbac6);}catch(_0x41f489){_0x459ace[_0x546d30(0x17f)](0x1f4)['json']({'error':_0x41f489[_0x546d30(0x17c)]});}}),router[a2_0x91fa55(0x17b)]('/',async(_0x78c669,_0x16e8b2)=>{const _0x427a20=a2_0x91fa55;try{const _0x13b100=await prisma[_0x427a20(0x174)][_0x427a20(0x17a)]();_0x16e8b2[_0x427a20(0x186)](_0x13b100);}catch(_0x160d1e){_0x16e8b2[_0x427a20(0x17f)](0x1f4)[_0x427a20(0x186)]({'error':_0x160d1e[_0x427a20(0x17c)]});}}),router['post'](a2_0x91fa55(0x178),async(_0x15acb8,_0x4dc6c8)=>{const _0x198388=a2_0x91fa55;try{const _0x404091=_0x15acb8[_0x198388(0x181)],_0x46bf62=await prisma['order'][_0x198388(0x17a)]({'where':_0x404091});_0x4dc6c8[_0x198388(0x186)](_0x46bf62);}catch(_0x4ab3e6){_0x4dc6c8[_0x198388(0x17f)](0x1f4)[_0x198388(0x186)]({'error':_0x4ab3e6[_0x198388(0x17c)]});}}),router[a2_0x91fa55(0x183)](a2_0x91fa55(0x182),async(_0x386d52,_0x19ab80)=>{const _0xa37bfa=a2_0x91fa55;try{const {id:_0x2dca69}=_0x386d52['params'],_0x2ecef4=_0x386d52[_0xa37bfa(0x181)],_0x277245=await prisma['order'][_0xa37bfa(0x185)]({'where':{'id':Number(_0x2dca69)},'data':_0x2ecef4});_0x19ab80['json'](_0x277245);}catch(_0x201017){_0x19ab80['status'](0x1f4)[_0xa37bfa(0x186)]({'error':_0x201017['message']});}}),router[a2_0x91fa55(0x184)](a2_0x91fa55(0x182),async(_0x991510,_0x9aa18e)=>{const _0x282661=a2_0x91fa55;try{const {id:_0x2e0202}=_0x991510[_0x282661(0x16f)];await prisma[_0x282661(0x174)]['delete']({'where':{'id':Number(_0x2e0202)}}),_0x9aa18e[_0x282661(0x17f)](0xcc)[_0x282661(0x17d)]();}catch(_0x1f3c89){_0x9aa18e[_0x282661(0x17f)](0x1f4)[_0x282661(0x186)]({'error':_0x1f3c89['message']});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a3_0x1951(){const _0x30f32d=['body','message','4240KEaWQv','12ACVdVA','5955756LzXRuj','get','1218dNDKQO','post','preparation','delete','create','findMany','4070745BugfDL','524680KMGlYC','send','json','267819Rgfcnc','put','params','/:id','status','7477578qkLpDZ','1672366qyQvFh'];a3_0x1951=function(){return _0x30f32d;};return a3_0x1951();}const a3_0x5de895=a3_0x1df6;(function(_0x4b1a29,_0xc48dc){const _0x48b0a9=a3_0x1df6,_0x374c64=_0x4b1a29();while(!![]){try{const _0x29060c=-parseInt(_0x48b0a9(0xaf))/0x1+parseInt(_0x48b0a9(0xb8))/0x2+-parseInt(_0x48b0a9(0xb2))/0x3*(parseInt(_0x48b0a9(0xbc))/0x4)+parseInt(_0x48b0a9(0xae))/0x5+-parseInt(_0x48b0a9(0xbd))/0x6+parseInt(_0x48b0a9(0xbf))/0x7*(-parseInt(_0x48b0a9(0xbb))/0x8)+parseInt(_0x48b0a9(0xb7))/0x9;if(_0x29060c===_0xc48dc)break;else _0x374c64['push'](_0x374c64['shift']());}catch(_0x26b16b){_0x374c64['push'](_0x374c64['shift']());}}}(a3_0x1951,0x936b5));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router[a3_0x5de895(0xc0)]('/',async(_0x26a0a8,_0xa72627)=>{const _0x3df735=a3_0x5de895;try{const _0x3dd8de=await prisma[_0x3df735(0xc1)][_0x3df735(0xc3)]({'data':_0x26a0a8['body']});_0xa72627[_0x3df735(0xb1)]({'id':_0x3dd8de['id']});}catch(_0x3154d5){_0xa72627[_0x3df735(0xb6)](0x1f4)[_0x3df735(0xb1)]({'error':_0x3154d5[_0x3df735(0xba)]});}}),router[a3_0x5de895(0xbe)](a3_0x5de895(0xb5),async(_0xb22bdc,_0x34baf1)=>{const _0x261770=a3_0x5de895;try{const {id:_0x4f5d36}=_0xb22bdc['params'],_0x514529=await prisma[_0x261770(0xc1)]['findUnique']({'where':{'id':Number(_0x4f5d36)}});_0x34baf1[_0x261770(0xb1)](_0x514529);}catch(_0x5733b2){_0x34baf1['status'](0x1f4)[_0x261770(0xb1)]({'error':_0x5733b2[_0x261770(0xba)]});}}),router['get']('/',async(_0x232331,_0x1ce611)=>{const _0x2d0377=a3_0x5de895;try{const _0x5bc87e=await prisma['preparation']['findMany']();_0x1ce611[_0x2d0377(0xb1)](_0x5bc87e);}catch(_0x1e8ccc){_0x1ce611[_0x2d0377(0xb6)](0x1f4)[_0x2d0377(0xb1)]({'error':_0x1e8ccc['message']});}}),router[a3_0x5de895(0xc0)]('/search',async(_0x594aae,_0x357e1d)=>{const _0x3d8d56=a3_0x5de895;try{const _0xed1cea=_0x594aae[_0x3d8d56(0xb9)],_0x1212bf=await prisma[_0x3d8d56(0xc1)][_0x3d8d56(0xc4)]({'where':_0xed1cea});_0x357e1d[_0x3d8d56(0xb1)](_0x1212bf);}catch(_0x7a564){_0x357e1d[_0x3d8d56(0xb6)](0x1f4)[_0x3d8d56(0xb1)]({'error':_0x7a564[_0x3d8d56(0xba)]});}}),router[a3_0x5de895(0xb3)](a3_0x5de895(0xb5),async(_0x2b7c94,_0xe37dd3)=>{const _0x37021b=a3_0x5de895;try{const {id:_0x129f40}=_0x2b7c94['params'],_0x19b273=_0x2b7c94[_0x37021b(0xb9)],_0x2414f8=await prisma[_0x37021b(0xc1)]['update']({'where':{'id':Number(_0x129f40)},'data':_0x19b273});_0xe37dd3['json'](_0x2414f8);}catch(_0x4dba22){_0xe37dd3[_0x37021b(0xb6)](0x1f4)[_0x37021b(0xb1)]({'error':_0x4dba22[_0x37021b(0xba)]});}}),router['delete'](a3_0x5de895(0xb5),async(_0x151c87,_0x2f6236)=>{const _0x13e5ac=a3_0x5de895;try{const {id:_0x5e6200}=_0x151c87[_0x13e5ac(0xb4)];await prisma['preparation'][_0x13e5ac(0xc2)]({'where':{'id':Number(_0x5e6200)}}),_0x2f6236[_0x13e5ac(0xb6)](0xcc)[_0x13e5ac(0xb0)]();}catch(_0x6d6ecb){_0x2f6236[_0x13e5ac(0xb6)](0x1f4)['json']({'error':_0x6d6ecb[_0x13e5ac(0xba)]});}});function a3_0x1df6(_0x319979,_0x4eec7e){_0x319979=_0x319979-0xae;const _0x1951ab=a3_0x1951();let _0x1df636=_0x1951ab[_0x319979];return _0x1df636;}export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a4_0x23fee2=a4_0x3de7;function a4_0x1110(){const _0x226314=['update','map','/:id','52764GmGCal','4571wqYJqn','2761XahXah','19268sTJaHy','send','1263567maidVc','params','body','delete','purchase','status','9864VHnYLW','findUnique','5ZRgibD','findMany','2OzQUiq','message','get','json','780VwcrPV','3070oDIYsI','429257UyMpct','post','1842872TjmiDQ','create'];a4_0x1110=function(){return _0x226314;};return a4_0x1110();}(function(_0x571fe5,_0x413711){const _0x36989e=a4_0x3de7,_0x1ca623=_0x571fe5();while(!![]){try{const _0x7a82aa=-parseInt(_0x36989e(0x193))/0x1+-parseInt(_0x36989e(0x18d))/0x2*(parseInt(_0x36989e(0x19f))/0x3)+-parseInt(_0x36989e(0x19d))/0x4*(parseInt(_0x36989e(0x1a7))/0x5)+-parseInt(_0x36989e(0x191))/0x6*(-parseInt(_0x36989e(0x19b))/0x7)+parseInt(_0x36989e(0x195))/0x8+parseInt(_0x36989e(0x1a5))/0x9*(-parseInt(_0x36989e(0x192))/0xa)+-parseInt(_0x36989e(0x19c))/0xb*(-parseInt(_0x36989e(0x19a))/0xc);if(_0x7a82aa===_0x413711)break;else _0x1ca623['push'](_0x1ca623['shift']());}catch(_0x11d944){_0x1ca623['push'](_0x1ca623['shift']());}}}(a4_0x1110,0x37759));import{Router}from'express';import{PrismaClient}from'@prisma/client';function a4_0x3de7(_0x2a59fe,_0x5d5abb){_0x2a59fe=_0x2a59fe-0x18d;const _0x1110a6=a4_0x1110();let _0x3de757=_0x1110a6[_0x2a59fe];return _0x3de757;}const prisma=new PrismaClient(),router=Router();router[a4_0x23fee2(0x194)]('/',async(_0x4a376b,_0x1afe43)=>{const _0xf5be2b=a4_0x23fee2;try{const {Items:_0x2a014b,..._0x1720dd}=_0x4a376b[_0xf5be2b(0x1a1)],_0x15f2ca=await prisma[_0xf5be2b(0x1a3)][_0xf5be2b(0x196)]({'data':{..._0x1720dd,'Items':{'create':_0x2a014b?.[_0xf5be2b(0x198)](_0x56b72c=>({'item':{'create':{..._0x56b72c}}}))||[]}},'include':{'items':{'include':{'item':!![]}}}});_0x1afe43['json']({'id':_0x15f2ca['id']});}catch(_0x37b0e4){_0x1afe43[_0xf5be2b(0x1a4)](0x1f4)[_0xf5be2b(0x190)]({'error':_0x37b0e4[_0xf5be2b(0x18e)]});}}),router[a4_0x23fee2(0x18f)](a4_0x23fee2(0x199),async(_0x1a1318,_0x55ef12)=>{const _0x5186ef=a4_0x23fee2;try{const {id:_0x421554}=_0x1a1318[_0x5186ef(0x1a0)],_0x96f039=await prisma[_0x5186ef(0x1a3)][_0x5186ef(0x1a6)]({'where':{'id':Number(_0x421554)},'include':{'items':{'include':{'item':!![]}}}});_0x55ef12['json'](_0x96f039);}catch(_0xcac562){_0x55ef12[_0x5186ef(0x1a4)](0x1f4)[_0x5186ef(0x190)]({'error':_0xcac562[_0x5186ef(0x18e)]});}}),router['get']('/',async(_0x35f6fd,_0x5005a8)=>{const _0x45b7f4=a4_0x23fee2;try{const _0x9c4d74=await prisma['purchase'][_0x45b7f4(0x1a8)]({'include':{'items':{'include':{'item':!![]}}}});_0x5005a8['json'](_0x9c4d74);}catch(_0x56e986){_0x5005a8[_0x45b7f4(0x1a4)](0x1f4)[_0x45b7f4(0x190)]({'error':_0x56e986[_0x45b7f4(0x18e)]});}}),router['post']('/search',async(_0x50f55b,_0x46bbd6)=>{const _0x4c6823=a4_0x23fee2;try{const _0x5537ea=_0x50f55b[_0x4c6823(0x1a1)],_0x4003f0=await prisma['purchase'][_0x4c6823(0x1a8)]({'where':_0x5537ea,'include':{'items':{'include':{'item':!![]}}}});_0x46bbd6['json'](_0x4003f0);}catch(_0x4889c5){_0x46bbd6['status'](0x1f4)[_0x4c6823(0x190)]({'error':_0x4889c5[_0x4c6823(0x18e)]});}}),router['put'](a4_0x23fee2(0x199),async(_0x630b48,_0x357625)=>{const _0xe430cf=a4_0x23fee2;try{const {id:_0x290218}=_0x630b48[_0xe430cf(0x1a0)],_0x1eea5d=_0x630b48[_0xe430cf(0x1a1)],_0x2b95df=await prisma[_0xe430cf(0x1a3)][_0xe430cf(0x197)]({'where':{'id':Number(_0x290218)},'data':_0x1eea5d,'include':{'items':{'include':{'item':!![]}}}});_0x357625[_0xe430cf(0x190)](_0x2b95df);}catch(_0xd462dd){_0x357625[_0xe430cf(0x1a4)](0x1f4)[_0xe430cf(0x190)]({'error':_0xd462dd[_0xe430cf(0x18e)]});}}),router[a4_0x23fee2(0x1a2)]('/:id',async(_0x2a6a1a,_0x8bab4e)=>{const _0x221698=a4_0x23fee2;try{const {id:_0x4435fe}=_0x2a6a1a[_0x221698(0x1a0)];await prisma[_0x221698(0x1a3)][_0x221698(0x1a2)]({'where':{'id':Number(_0x4435fe)}}),_0x8bab4e[_0x221698(0x1a4)](0xcc)[_0x221698(0x19e)]();}catch(_0x5d903f){_0x8bab4e[_0x221698(0x1a4)](0x1f4)[_0x221698(0x190)]({'error':_0x5d903f[_0x221698(0x18e)]});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a5_0x57e058=a5_0x5a52;(function(_0x570d84,_0x2d84e0){const _0x8961e5=a5_0x5a52,_0x5269fe=_0x570d84();while(!![]){try{const _0x3a8cdb=-parseInt(_0x8961e5(0xdd))/0x1+-parseInt(_0x8961e5(0xdf))/0x2+parseInt(_0x8961e5(0xee))/0x3+parseInt(_0x8961e5(0xec))/0x4*(-parseInt(_0x8961e5(0xde))/0x5)+-parseInt(_0x8961e5(0xf4))/0x6+parseInt(_0x8961e5(0xe9))/0x7+parseInt(_0x8961e5(0xf1))/0x8;if(_0x3a8cdb===_0x2d84e0)break;else _0x5269fe['push'](_0x5269fe['shift']());}catch(_0x2a79cc){_0x5269fe['push'](_0x5269fe['shift']());}}}(a5_0x28ba,0x96fa1));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a5_0x5a52(_0x15b407,_0x395619){_0x15b407=_0x15b407-0xdd;const _0x28ba23=a5_0x28ba();let _0x5a52d2=_0x28ba23[_0x15b407];return _0x5a52d2;}router['post']('/',async(_0x2d168a,_0x1f97de)=>{const _0x386c1c=a5_0x5a52;try{const {items:_0x472d5d,purchase:_0x3f18ca,..._0x2cf9b8}=_0x2d168a[_0x386c1c(0xe2)],_0x1a910e=await prisma[_0x386c1c(0xf0)][_0x386c1c(0xf2)]({'data':{..._0x2cf9b8,..._0x3f18ca?{'Purchase':{'create':{..._0x3f18ca}}}:{},'Items':{'create':_0x472d5d?.[_0x386c1c(0xea)](_0x27e870=>({'item':{'create':{..._0x27e870}}}))||[]}},'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x1f97de['json']({'id':_0x1a910e['id']});}catch(_0xbcf706){_0x1f97de['status'](0x1f4)['json']({'error':_0xbcf706[_0x386c1c(0xe4)]});}}),router[a5_0x57e058(0xf6)](a5_0x57e058(0xe3),async(_0x3b1c08,_0x23b2ee)=>{const _0x33d735=a5_0x57e058;try{const {id:_0x3a0f63}=_0x3b1c08[_0x33d735(0xf5)],_0x27b2d3=await prisma[_0x33d735(0xf0)][_0x33d735(0xe0)]({'where':{'id':Number(_0x3a0f63)},'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x23b2ee[_0x33d735(0xe7)](_0x27b2d3);}catch(_0x574d93){_0x23b2ee['status'](0x1f4)[_0x33d735(0xe7)]({'error':_0x574d93['message']});}}),router['get']('/',async(_0x540a08,_0x339ec1)=>{const _0x25d41a=a5_0x57e058;try{const _0x219772=await prisma[_0x25d41a(0xf0)]['findMany']({'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x339ec1['json'](_0x219772);}catch(_0x32c51a){_0x339ec1[_0x25d41a(0xeb)](0x1f4)['json']({'error':_0x32c51a[_0x25d41a(0xe4)]});}}),router[a5_0x57e058(0xe8)](a5_0x57e058(0xe1),async(_0x2d3008,_0x57fab5)=>{const _0x324c07=a5_0x57e058;try{const _0x24bdf9=_0x2d3008[_0x324c07(0xe2)],_0x426a89=await prisma['reception'][_0x324c07(0xe6)]({'where':_0x24bdf9,'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x57fab5[_0x324c07(0xe7)](_0x426a89);}catch(_0x5382c0){_0x57fab5[_0x324c07(0xeb)](0x1f4)[_0x324c07(0xe7)]({'error':_0x5382c0['message']});}}),router[a5_0x57e058(0xed)](a5_0x57e058(0xe3),async(_0x12a763,_0x1cb605)=>{const _0x5e77fc=a5_0x57e058;try{const {id:_0x7dbc68}=_0x12a763[_0x5e77fc(0xf5)],_0x25e949=_0x12a763[_0x5e77fc(0xe2)],_0x44b932=await prisma[_0x5e77fc(0xf0)][_0x5e77fc(0xef)]({'where':{'id':Number(_0x7dbc68)},'data':_0x25e949,'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x1cb605[_0x5e77fc(0xe7)](_0x44b932);}catch(_0x4f4396){_0x1cb605[_0x5e77fc(0xeb)](0x1f4)[_0x5e77fc(0xe7)]({'error':_0x4f4396[_0x5e77fc(0xe4)]});}}),router['delete'](a5_0x57e058(0xe3),async(_0x49cfaa,_0x3f4c4f)=>{const _0x2d59d2=a5_0x57e058;try{const {id:_0x330986}=_0x49cfaa[_0x2d59d2(0xf5)];await prisma[_0x2d59d2(0xf0)][_0x2d59d2(0xf3)]({'where':{'id':Number(_0x330986)}}),_0x3f4c4f[_0x2d59d2(0xeb)](0xcc)[_0x2d59d2(0xe5)]();}catch(_0x246b81){_0x3f4c4f['status'](0x1f4)['json']({'error':_0x246b81[_0x2d59d2(0xe4)]});}});export default router;function a5_0x28ba(){const _0xbc6e95=['create','delete','2860236pKOnzP','params','get','170882yEuqVZ','50TyrpwW','2119546cDkBjF','findUnique','/search','body','/:id','message','send','findMany','json','post','3801812YVQnUM','map','status','381284LptTVw','put','3133794CgkLgd','update','reception','13530064llAZWX'];a5_0x28ba=function(){return _0xbc6e95;};return a5_0x28ba();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a6_0x23d25e=a6_0x1ee2;function a6_0x1ee2(_0x96de27,_0x2f0137){_0x96de27=_0x96de27-0xce;const _0x219bca=a6_0x219b();let _0x1ee211=_0x219bca[_0x96de27];return _0x1ee211;}(function(_0x1bdbe9,_0x23c20e){const _0x2be4ea=a6_0x1ee2,_0x4e179b=_0x1bdbe9();while(!![]){try{const _0x402bc7=parseInt(_0x2be4ea(0xe4))/0x1+parseInt(_0x2be4ea(0xe3))/0x2*(-parseInt(_0x2be4ea(0xdb))/0x3)+parseInt(_0x2be4ea(0xe2))/0x4+parseInt(_0x2be4ea(0xd6))/0x5+parseInt(_0x2be4ea(0xda))/0x6+parseInt(_0x2be4ea(0xdc))/0x7*(-parseInt(_0x2be4ea(0xdf))/0x8)+parseInt(_0x2be4ea(0xdd))/0x9*(-parseInt(_0x2be4ea(0xe7))/0xa);if(_0x402bc7===_0x23c20e)break;else _0x4e179b['push'](_0x4e179b['shift']());}catch(_0x2ce8f8){_0x4e179b['push'](_0x4e179b['shift']());}}}(a6_0x219b,0x1920b));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a6_0x219b(){const _0x4f999b=['update','json','findMany','792315DWrljJ','/search','create','get','973188VLnVPE','462QQpOvt','3647Koybqu','36VbfmYX','put','152bDPjEk','body','delete','532864sHftQB','2166cAVQER','82667eHsxDX','message','stock','642350FuVOKC','post','findUnique','status','/:id','params'];a6_0x219b=function(){return _0x4f999b;};return a6_0x219b();}router[a6_0x23d25e(0xce)]('/',async(_0x5903a8,_0x5e0659)=>{const _0x6e920b=a6_0x23d25e;try{const {item:_0x14ea45,..._0x11f557}=_0x5903a8['body'],_0x1bd5b8=await prisma[_0x6e920b(0xe6)][_0x6e920b(0xd8)]({'data':{..._0x11f557,..._0x14ea45?{'Item':{'create':{..._0x14ea45}}}:{}},'include':{'item':!![]}});_0x5e0659['json']({'id':_0x1bd5b8['id']});}catch(_0x274c64){_0x5e0659[_0x6e920b(0xd0)](0x1f4)[_0x6e920b(0xd4)]({'error':_0x274c64[_0x6e920b(0xe5)]});}}),router[a6_0x23d25e(0xd9)](a6_0x23d25e(0xd1),async(_0x57b391,_0x4a1c6d)=>{const _0x279459=a6_0x23d25e;try{const {id:_0xef99f5}=_0x57b391[_0x279459(0xd2)],_0x194c3c=await prisma[_0x279459(0xe6)][_0x279459(0xcf)]({'where':{'id':Number(_0xef99f5)},'include':{'item':!![]}});_0x4a1c6d[_0x279459(0xd4)](_0x194c3c);}catch(_0x9b3d80){_0x4a1c6d[_0x279459(0xd0)](0x1f4)['json']({'error':_0x9b3d80[_0x279459(0xe5)]});}}),router[a6_0x23d25e(0xd9)]('/',async(_0x2a9dc6,_0x53fbb5)=>{const _0x14c763=a6_0x23d25e;try{const _0x1171be=await prisma[_0x14c763(0xe6)][_0x14c763(0xd5)]({'include':{'item':!![]}});_0x53fbb5[_0x14c763(0xd4)](_0x1171be);}catch(_0x5d1520){_0x53fbb5[_0x14c763(0xd0)](0x1f4)[_0x14c763(0xd4)]({'error':_0x5d1520['message']});}}),router[a6_0x23d25e(0xce)](a6_0x23d25e(0xd7),async(_0xf8f8e6,_0x11be88)=>{const _0xc8f5c1=a6_0x23d25e;try{const _0x2bdb51=_0xf8f8e6[_0xc8f5c1(0xe0)],_0x52cd3e=await prisma[_0xc8f5c1(0xe6)][_0xc8f5c1(0xd5)]({'where':_0x2bdb51,'include':{'item':!![]}});_0x11be88[_0xc8f5c1(0xd4)](_0x52cd3e);}catch(_0x47715b){_0x11be88['status'](0x1f4)[_0xc8f5c1(0xd4)]({'error':_0x47715b[_0xc8f5c1(0xe5)]});}}),router[a6_0x23d25e(0xde)]('/:id',async(_0x5c48d8,_0x71f846)=>{const _0x3d25d3=a6_0x23d25e;try{const {id:_0x2663b8}=_0x5c48d8[_0x3d25d3(0xd2)],_0x40bc5d=_0x5c48d8[_0x3d25d3(0xe0)],_0x900f97=await prisma['stock'][_0x3d25d3(0xd3)]({'where':{'id':Number(_0x2663b8)},'data':_0x40bc5d,'include':{'item':!![]}});_0x71f846['json'](_0x900f97);}catch(_0xd1a8a2){_0x71f846['status'](0x1f4)[_0x3d25d3(0xd4)]({'error':_0xd1a8a2[_0x3d25d3(0xe5)]});}}),router[a6_0x23d25e(0xe1)](a6_0x23d25e(0xd1),async(_0x517b6a,_0x57cdb7)=>{const _0x264be5=a6_0x23d25e;try{const {id:_0x2c2342}=_0x517b6a[_0x264be5(0xd2)];await prisma[_0x264be5(0xe6)][_0x264be5(0xe1)]({'where':{'id':Number(_0x2c2342)}}),_0x57cdb7['status'](0xcc)['send']();}catch(_0x3f105b){_0x57cdb7['status'](0x1f4)[_0x264be5(0xd4)]({'error':_0x3f105b['message']});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a7_0x118758=a7_0x3524;(function(_0x2f1a8e,_0x3e128c){const _0x4ff5cc=a7_0x3524,_0x16aabc=_0x2f1a8e();while(!![]){try{const _0x22b6b0=parseInt(_0x4ff5cc(0x80))/0x1*(-parseInt(_0x4ff5cc(0x7c))/0x2)+parseInt(_0x4ff5cc(0x78))/0x3*(parseInt(_0x4ff5cc(0x84))/0x4)+parseInt(_0x4ff5cc(0x69))/0x5*(-parseInt(_0x4ff5cc(0x7b))/0x6)+-parseInt(_0x4ff5cc(0x83))/0x7+parseInt(_0x4ff5cc(0x74))/0x8*(-parseInt(_0x4ff5cc(0x71))/0x9)+-parseInt(_0x4ff5cc(0x68))/0xa*(parseInt(_0x4ff5cc(0x72))/0xb)+parseInt(_0x4ff5cc(0x7f))/0xc;if(_0x22b6b0===_0x3e128c)break;else _0x16aabc['push'](_0x16aabc['shift']());}catch(_0x2c2619){_0x16aabc['push'](_0x16aabc['shift']());}}}(a7_0x3bbb,0x7f4e2));function a7_0x3524(_0x1b7039,_0x15c72e){_0x1b7039=_0x1b7039-0x67;const _0x3bbb75=a7_0x3bbb();let _0x35242e=_0x3bbb75[_0x1b7039];return _0x35242e;}import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router[a7_0x118758(0x7e)]('/',async(_0x291c6b,_0xd8628e)=>{const _0x4f6378=a7_0x118758;try{const {taxes:_0x1808bb,..._0xd53799}=_0x291c6b[_0x4f6378(0x7a)],_0x1c8f2e=await prisma[_0x4f6378(0x6f)][_0x4f6378(0x73)]({'data':{..._0xd53799,'taxes':{'create':_0x1808bb[_0x4f6378(0x6d)](_0x4bdab8=>({'tax':{'create':{..._0x4bdab8}}}))}},'include':{'taxes':{'include':{'tax':!![]}}}});_0xd8628e[_0x4f6378(0x82)]({'id':_0x1c8f2e['id']});}catch(_0x5730d5){_0xd8628e[_0x4f6378(0x6c)](0x1f4)[_0x4f6378(0x82)]({'error':_0x5730d5[_0x4f6378(0x6b)]});}}),router[a7_0x118758(0x6e)](a7_0x118758(0x79),async(_0x1ccab6,_0x4e28d1)=>{const _0x3a3042=a7_0x118758;try{const {id:_0x5272ec}=_0x1ccab6[_0x3a3042(0x76)],_0x1ba0b8=await prisma['supplier'][_0x3a3042(0x67)]({'where':{'id':Number(_0x5272ec)},'include':{'taxes':{'include':{'tax':!![]}}}});_0x4e28d1[_0x3a3042(0x82)](_0x1ba0b8);}catch(_0x23c823){_0x4e28d1['status'](0x1f4)[_0x3a3042(0x82)]({'error':_0x23c823[_0x3a3042(0x6b)]});}}),router[a7_0x118758(0x6e)]('/',async(_0x2d655f,_0x31ad0a)=>{const _0x490fe0=a7_0x118758;try{const _0x460fd1=await prisma[_0x490fe0(0x6f)][_0x490fe0(0x7d)]({'include':{'taxes':{'include':{'tax':!![]}}}});_0x31ad0a['json'](_0x460fd1);}catch(_0x6fee59){_0x31ad0a[_0x490fe0(0x6c)](0x1f4)[_0x490fe0(0x82)]({'error':_0x6fee59['message']});}}),router[a7_0x118758(0x7e)](a7_0x118758(0x6a),async(_0xcf53b2,_0x600f04)=>{const _0x48fdfd=a7_0x118758;try{const _0x1a830a=_0xcf53b2[_0x48fdfd(0x7a)],_0x4d3c0b=await prisma['supplier'][_0x48fdfd(0x7d)]({'where':_0x1a830a,'include':{'taxes':{'include':{'tax':!![]}}}});_0x600f04[_0x48fdfd(0x82)](_0x4d3c0b);}catch(_0xa194a0){_0x600f04[_0x48fdfd(0x6c)](0x1f4)[_0x48fdfd(0x82)]({'error':_0xa194a0[_0x48fdfd(0x6b)]});}}),router[a7_0x118758(0x77)]('/:id',async(_0x45ff1d,_0x490854)=>{const _0x4b95d8=a7_0x118758;try{const {id:_0x35289b}=_0x45ff1d[_0x4b95d8(0x76)],_0x5a44c0=_0x45ff1d[_0x4b95d8(0x7a)],_0x4a66f5=await prisma[_0x4b95d8(0x6f)][_0x4b95d8(0x75)]({'where':{'id':Number(_0x35289b)},'data':_0x5a44c0,'include':{'taxes':{'include':{'tax':!![]}}}});_0x490854[_0x4b95d8(0x82)](_0x4a66f5);}catch(_0x59678c){_0x490854[_0x4b95d8(0x6c)](0x1f4)['json']({'error':_0x59678c[_0x4b95d8(0x6b)]});}}),router[a7_0x118758(0x81)](a7_0x118758(0x79),async(_0x55f425,_0x291e8b)=>{const _0x1bdf4b=a7_0x118758;try{const {id:_0x4b718b}=_0x55f425['params'];await prisma[_0x1bdf4b(0x6f)]['delete']({'where':{'id':Number(_0x4b718b)}}),_0x291e8b['status'](0xcc)[_0x1bdf4b(0x70)]();}catch(_0x110bc4){_0x291e8b[_0x1bdf4b(0x6c)](0x1f4)[_0x1bdf4b(0x82)]({'error':_0x110bc4[_0x1bdf4b(0x6b)]});}});function a7_0x3bbb(){const _0x5b23bf=['delete','json','1503635dQWcSr','12uzHGRz','findUnique','240FnGKoE','76115VCYUMB','/search','message','status','map','get','supplier','send','306xmCYrs','253726dVWCls','create','109400gvQdte','update','params','put','697869dJkgAS','/:id','body','6dWhRpp','2GbUsOS','findMany','post','13865172twFRrW','83296nrtOMQ'];a7_0x3bbb=function(){return _0x5b23bf;};return a7_0x3bbb();}export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a8_0x449259=a8_0x1b31;function a8_0x50e3(){const _0x594c6d=['body','put','send','tax','create','36xPBkCV','7967001XCgjlo','66398uRPlbb','delete','params','json','status','post','update','12abnFkh','789013GEJUqw','findMany','903530gilest','get','message','/search','1032489bbdxhf','/:id','284550qZmEDV','4616472tZNEiC','findUnique'];a8_0x50e3=function(){return _0x594c6d;};return a8_0x50e3();}(function(_0x3143a6,_0x1c3fa8){const _0x54d36f=a8_0x1b31,_0x1b28d3=_0x3143a6();while(!![]){try{const _0x1fb59b=parseInt(_0x54d36f(0x112))/0x1+parseInt(_0x54d36f(0x10a))/0x2*(-parseInt(_0x54d36f(0x108))/0x3)+parseInt(_0x54d36f(0x111))/0x4*(-parseInt(_0x54d36f(0x114))/0x5)+parseInt(_0x54d36f(0x100))/0x6+parseInt(_0x54d36f(0x109))/0x7+-parseInt(_0x54d36f(0x101))/0x8+parseInt(_0x54d36f(0xfe))/0x9;if(_0x1fb59b===_0x1c3fa8)break;else _0x1b28d3['push'](_0x1b28d3['shift']());}catch(_0x23bae8){_0x1b28d3['push'](_0x1b28d3['shift']());}}}(a8_0x50e3,0x8b959));import{Router}from'express';import{PrismaClient}from'@prisma/client';function a8_0x1b31(_0x3a853b,_0x28273c){_0x3a853b=_0x3a853b-0xfd;const _0x50e3ed=a8_0x50e3();let _0x1b319c=_0x50e3ed[_0x3a853b];return _0x1b319c;}const prisma=new PrismaClient(),router=Router();router[a8_0x449259(0x10f)]('/',async(_0x3fc5ed,_0x1ba5e3)=>{const _0x323a13=a8_0x449259;try{const _0x2e6ebe=await prisma[_0x323a13(0x106)][_0x323a13(0x107)]({'data':_0x3fc5ed[_0x323a13(0x103)]});_0x1ba5e3[_0x323a13(0x10d)]({'id':_0x2e6ebe['id']});}catch(_0x3fa103){_0x1ba5e3['status'](0x1f4)[_0x323a13(0x10d)]({'error':_0x3fa103[_0x323a13(0x116)]});}}),router[a8_0x449259(0x115)](a8_0x449259(0xff),async(_0x28546c,_0x3ce03d)=>{const _0x3c629b=a8_0x449259;try{const {id:_0x52e097}=_0x28546c[_0x3c629b(0x10c)],_0x4fe2a1=await prisma['tax'][_0x3c629b(0x102)]({'where':{'id':Number(_0x52e097)}});_0x3ce03d[_0x3c629b(0x10d)](_0x4fe2a1);}catch(_0x240580){_0x3ce03d[_0x3c629b(0x10e)](0x1f4)[_0x3c629b(0x10d)]({'error':_0x240580[_0x3c629b(0x116)]});}}),router['get']('/',async(_0x1f03dd,_0x30b413)=>{const _0x4a4f5c=a8_0x449259;try{const _0x214b30=await prisma[_0x4a4f5c(0x106)]['findMany']();_0x30b413['json'](_0x214b30);}catch(_0x24f70f){_0x30b413['status'](0x1f4)['json']({'error':_0x24f70f['message']});}}),router[a8_0x449259(0x10f)](a8_0x449259(0xfd),async(_0x39a7e7,_0x24c635)=>{const _0x1942ba=a8_0x449259;try{const _0x3a71c6=_0x39a7e7[_0x1942ba(0x103)],_0xc091b2=await prisma[_0x1942ba(0x106)][_0x1942ba(0x113)]({'where':_0x3a71c6});_0x24c635[_0x1942ba(0x10d)](_0xc091b2);}catch(_0x3a37b4){_0x24c635[_0x1942ba(0x10e)](0x1f4)[_0x1942ba(0x10d)]({'error':_0x3a37b4[_0x1942ba(0x116)]});}}),router[a8_0x449259(0x104)]('/:id',async(_0x1f512f,_0x12683f)=>{const _0xf321cb=a8_0x449259;try{const {id:_0x4b8088}=_0x1f512f[_0xf321cb(0x10c)],_0x1c40dc=_0x1f512f[_0xf321cb(0x103)],_0x190db4=await prisma[_0xf321cb(0x106)][_0xf321cb(0x110)]({'where':{'id':Number(_0x4b8088)},'data':_0x1c40dc});_0x12683f['json'](_0x190db4);}catch(_0x13bb5b){_0x12683f[_0xf321cb(0x10e)](0x1f4)[_0xf321cb(0x10d)]({'error':_0x13bb5b['message']});}}),router['delete'](a8_0x449259(0xff),async(_0x7d3939,_0x4cd1bc)=>{const _0x10e5c5=a8_0x449259;try{const {id:_0x3733bd}=_0x7d3939[_0x10e5c5(0x10c)];await prisma[_0x10e5c5(0x106)][_0x10e5c5(0x10b)]({'where':{'id':Number(_0x3733bd)}}),_0x4cd1bc['status'](0xcc)[_0x10e5c5(0x105)]();}catch(_0x5c8fbd){_0x4cd1bc['status'](0x1f4)[_0x10e5c5(0x10d)]({'error':_0x5c8fbd['message']});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a9_0x1fc6(){const _0x3e3777=['77522wXyoIp','7YzOlFl','send','json','password','status','8ROVymL','1690191SAsUaK','put','8sLIuwc','/login','from','User\x20not\x20found.','params','Invalid\x20password.','321435SpFwwq','post','5115750pApiCS','6289613RfVfwo','9BiGWoV','findUnique','update','163974mACxTu','946284toixpw','message','/:id','/search','body','get','user','findMany'];a9_0x1fc6=function(){return _0x3e3777;};return a9_0x1fc6();}function a9_0x7f61(_0xa067c8,_0x2a6804){_0xa067c8=_0xa067c8-0x10a;const _0x1fc629=a9_0x1fc6();let _0x7f615b=_0x1fc629[_0xa067c8];return _0x7f615b;}const a9_0x79ad85=a9_0x7f61;(function(_0x2cd0f0,_0x2a98dd){const _0x2e203f=a9_0x7f61,_0xc622d7=_0x2cd0f0();while(!![]){try{const _0x48a343=-parseInt(_0x2e203f(0x114))/0x1+parseInt(_0x2e203f(0x10b))/0x2*(-parseInt(_0x2e203f(0x127))/0x3)+parseInt(_0x2e203f(0x11a))/0x4*(-parseInt(_0x2e203f(0x123))/0x5)+-parseInt(_0x2e203f(0x10c))/0x6*(parseInt(_0x2e203f(0x115))/0x7)+-parseInt(_0x2e203f(0x11d))/0x8*(parseInt(_0x2e203f(0x11b))/0x9)+parseInt(_0x2e203f(0x125))/0xa+parseInt(_0x2e203f(0x126))/0xb;if(_0x48a343===_0x2a98dd)break;else _0xc622d7['push'](_0xc622d7['shift']());}catch(_0x39e811){_0xc622d7['push'](_0xc622d7['shift']());}}}(a9_0x1fc6,0x45c5c));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router[a9_0x79ad85(0x124)](a9_0x79ad85(0x11e),async(_0x551de4,_0x16a82c)=>{const _0x5179d1=a9_0x79ad85;try{const {email:_0x354a86,password:_0x5c77f7}=_0x551de4[_0x5179d1(0x110)],_0x50f600=await prisma['user'][_0x5179d1(0x128)]({'where':{'email':_0x354a86}});if(!_0x50f600)return _0x16a82c[_0x5179d1(0x119)](0x194)[_0x5179d1(0x117)]({'error':_0x5179d1(0x120)});if(_0x50f600[_0x5179d1(0x118)]!==_0x5c77f7)return _0x16a82c[_0x5179d1(0x119)](0x191)[_0x5179d1(0x117)]({'error':_0x5179d1(0x122)});_0x16a82c['json'](_0x50f600);}catch(_0x5a23f1){_0x16a82c[_0x5179d1(0x119)](0x1f4)[_0x5179d1(0x117)]({'error':_0x5a23f1[_0x5179d1(0x10d)]});}}),router[a9_0x79ad85(0x124)]('/',async(_0x287bc2,_0x47ffbf)=>{const _0x1f7191=a9_0x79ad85;try{const {email:_0x24e815,password:_0x4d6d6a,authorizations:_0x5da336}=_0x287bc2[_0x1f7191(0x110)],_0x5bf324=await prisma[_0x1f7191(0x112)]['create']({'data':{'email':_0x24e815??null,'password':_0x4d6d6a??null,'authorizations':Array[_0x1f7191(0x11f)](_0x5da336??[])}});_0x47ffbf[_0x1f7191(0x117)]({'id':_0x5bf324['id']});}catch(_0x4ea633){_0x47ffbf[_0x1f7191(0x119)](0x1f4)[_0x1f7191(0x117)]({'error':_0x4ea633[_0x1f7191(0x10d)]});}}),router[a9_0x79ad85(0x111)](a9_0x79ad85(0x10e),async(_0x1a1482,_0x3347c6)=>{const _0x4c517c=a9_0x79ad85;try{const {id:_0x9c4ae4}=_0x1a1482[_0x4c517c(0x121)],_0x9e6cfe=await prisma['user'][_0x4c517c(0x128)]({'where':{'id':Number(_0x9c4ae4)}});_0x3347c6[_0x4c517c(0x117)](_0x9e6cfe);}catch(_0x3a484e){_0x3347c6[_0x4c517c(0x119)](0x1f4)[_0x4c517c(0x117)]({'error':_0x3a484e[_0x4c517c(0x10d)]});}}),router['get']('/',async(_0x3e9e4c,_0x22a1dc)=>{const _0x533b8d=a9_0x79ad85;try{const _0x2a4837=await prisma[_0x533b8d(0x112)][_0x533b8d(0x113)]();_0x22a1dc[_0x533b8d(0x117)](_0x2a4837);}catch(_0x2a0cf9){_0x22a1dc[_0x533b8d(0x119)](0x1f4)[_0x533b8d(0x117)]({'error':_0x2a0cf9[_0x533b8d(0x10d)]});}}),router[a9_0x79ad85(0x124)](a9_0x79ad85(0x10f),async(_0x33f630,_0x38c0af)=>{const _0x539fe7=a9_0x79ad85;try{const _0x3e3010=_0x33f630[_0x539fe7(0x110)],_0x1d2304=await prisma[_0x539fe7(0x112)][_0x539fe7(0x113)]({'where':_0x3e3010});_0x38c0af['json'](_0x1d2304);}catch(_0x367941){_0x38c0af[_0x539fe7(0x119)](0x1f4)[_0x539fe7(0x117)]({'error':_0x367941[_0x539fe7(0x10d)]});}}),router[a9_0x79ad85(0x11c)]('/:id',async(_0x582708,_0x3a634d)=>{const _0x2581bf=a9_0x79ad85;try{const {id:_0x726b8b}=_0x582708['params'],_0x2a96be=_0x582708[_0x2581bf(0x110)],_0x248952=await prisma['user'][_0x2581bf(0x10a)]({'where':{'id':Number(_0x726b8b)},'data':_0x2a96be});_0x3a634d[_0x2581bf(0x117)](_0x248952);}catch(_0x28adc0){_0x3a634d['status'](0x1f4)[_0x2581bf(0x117)]({'error':_0x28adc0[_0x2581bf(0x10d)]});}}),router['delete'](a9_0x79ad85(0x10e),async(_0x2e32a3,_0x50e692)=>{const _0x1b9f95=a9_0x79ad85;try{const {id:_0x5efc6b}=_0x2e32a3[_0x1b9f95(0x121)];await prisma[_0x1b9f95(0x112)]['delete']({'where':{'id':Number(_0x5efc6b)}}),_0x50e692[_0x1b9f95(0x119)](0xcc)[_0x1b9f95(0x116)]();}catch(_0x1d7d16){_0x50e692['status'](0x1f4)[_0x1b9f95(0x117)]({'error':_0x1d7d16[_0x1b9f95(0x10d)]});}});export default router;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a10_0xd2bf2d=a10_0x971a;(function(_0x3ccd20,_0x569e79){const _0x49fb7f=a10_0x971a,_0x547d66=_0x3ccd20();while(!![]){try{const _0x1da54e=-parseInt(_0x49fb7f(0x1c2))/0x1+-parseInt(_0x49fb7f(0x1d6))/0x2+parseInt(_0x49fb7f(0x1cb))/0x3*(-parseInt(_0x49fb7f(0x1c6))/0x4)+-parseInt(_0x49fb7f(0x1d5))/0x5*(parseInt(_0x49fb7f(0x1ce))/0x6)+parseInt(_0x49fb7f(0x1d4))/0x7+-parseInt(_0x49fb7f(0x1cd))/0x8*(parseInt(_0x49fb7f(0x1c8))/0x9)+parseInt(_0x49fb7f(0x1d2))/0xa*(parseInt(_0x49fb7f(0x1c7))/0xb);if(_0x1da54e===_0x569e79)break;else _0x547d66['push'](_0x547d66['shift']());}catch(_0x38293a){_0x547d66['push'](_0x547d66['shift']());}}}(a10_0x3e04,0x36fd4));import a10_0x16e219 from'./routes/client.routes.js';import a10_0x4a12ef from'./routes/item.routes.js';import a10_0x54cf25 from'./routes/order.routes.js';import a10_0x282e9f from'./routes/preparation.routes.js';import a10_0x2f20f5 from'./routes/purchase.routes.js';function a10_0x971a(_0x94ba0,_0x32e086){_0x94ba0=_0x94ba0-0x1c2;const _0x3e042f=a10_0x3e04();let _0x971a3e=_0x3e042f[_0x94ba0];return _0x971a3e;}function a10_0x3e04(){const _0x20fe69=['/clients','/users','/orders','4845820fdKLYg','listen','984340FJdlwx','5ZdffQs','403916VwFOzY','59335njcmFT','/stocks','/receptions','/preparations','4700oNLlin','22uRCNcn','90621KnxUbh','/items','/purchases','711UxFCkI','use','152FehQog','920814Awpuru'];a10_0x3e04=function(){return _0x20fe69;};return a10_0x3e04();}import a10_0x3c414f from'./routes/reception.routes.js';import a10_0x1293af from'./routes/stock.routes.js';import a10_0x29a9c8 from'./routes/supplier.routes.js';import a10_0x305a2a from'./routes/tax.routes.js';import a10_0x3bd5c1 from'./routes/user.routes.js';import a10_0x487bbd from'express';import a10_0x113243 from'cors';const app=a10_0x487bbd();app[a10_0xd2bf2d(0x1cc)](a10_0x487bbd['json']()),app[a10_0xd2bf2d(0x1cc)](a10_0x113243()),app[a10_0xd2bf2d(0x1cc)](a10_0xd2bf2d(0x1cf),a10_0x16e219),app[a10_0xd2bf2d(0x1cc)](a10_0xd2bf2d(0x1c9),a10_0x4a12ef),app[a10_0xd2bf2d(0x1cc)](a10_0xd2bf2d(0x1d1),a10_0x54cf25),app['use'](a10_0xd2bf2d(0x1c5),a10_0x282e9f),app['use'](a10_0xd2bf2d(0x1ca),a10_0x2f20f5),app['use'](a10_0xd2bf2d(0x1c4),a10_0x3c414f),app[a10_0xd2bf2d(0x1cc)](a10_0xd2bf2d(0x1c3),a10_0x1293af),app[a10_0xd2bf2d(0x1cc)]('/suppliers',a10_0x29a9c8),app[a10_0xd2bf2d(0x1cc)]('/taxes',a10_0x305a2a),app[a10_0xd2bf2d(0x1cc)](a10_0xd2bf2d(0x1d0),a10_0x3bd5c1),app[a10_0xd2bf2d(0x1d3)](0x1389,()=>{console['log']('Server\x20running\x20on\x205001');});
|
package/dist/core/Entity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x2c69(){var _0x1e4e31=['81565twBvVx','150DayJhv','1940HccaqY','1513398dVKHAe','21054GgiJAb','3gRdvAP','14BCVJha','2952Nfvpwi','4928128lnZewg','89952horpZH','26118LiXqlT','329568OqAeXk'];a13_0x2c69=function(){return _0x1e4e31;};return a13_0x2c69();}function a13_0x1b6d(_0x24fe37,_0x64674f){_0x24fe37=_0x24fe37-0xb5;var _0x2c696=a13_0x2c69();var _0x1b6dff=_0x2c696[_0x24fe37];return _0x1b6dff;}(function(_0x3fa2b6,_0x4f2976){var _0x528bf0=a13_0x1b6d,_0x5b97e3=_0x3fa2b6();while(!![]){try{var _0x2c5354=-parseInt(_0x528bf0(0xbe))/0x1+parseInt(_0x528bf0(0xb6))/0x2*(parseInt(_0x528bf0(0xb8))/0x3)+parseInt(_0x528bf0(0xbc))/0x4*(-parseInt(_0x528bf0(0xc0))/0x5)+parseInt(_0x528bf0(0xb7))/0x6*(-parseInt(_0x528bf0(0xb9))/0x7)+-parseInt(_0x528bf0(0xbb))/0x8+parseInt(_0x528bf0(0xbd))/0x9*(-parseInt(_0x528bf0(0xb5))/0xa)+-parseInt(_0x528bf0(0xbf))/0xb*(-parseInt(_0x528bf0(0xba))/0xc);if(_0x2c5354===_0x4f2976)break;else _0x5b97e3['push'](_0x5b97e3['shift']());}catch(_0x3b553d){_0x5b97e3['push'](_0x5b97e3['shift']());}}}(a13_0x2c69,0x5f59f));export class Entity{constructor(_0x2bb8d6){this['owl']=_0x2bb8d6;}}
|
package/dist/core/EventBus.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x4713(){const _0x2eb8a4=['push','7006reONki','570534zkBDKJ','15RxSCmM','set','No\x20request\x20listener\x20for\x20event\x20\x22','1191780xXsxJg','off','58322KAaEPw','3300tKaTHo','1536qVOKwG','3248960RGYggL','listeners','requestListeners','emit','request','get','428918vTuKqR','once','56Crnxbx','3120UIANrH'];a14_0x4713=function(){return _0x2eb8a4;};return a14_0x4713();}function a14_0x2421(_0x302031,_0x2a8d7c){_0x302031=_0x302031-0x17f;const _0x4713a6=a14_0x4713();let _0x2421da=_0x4713a6[_0x302031];return _0x2421da;}const a14_0x43e518=a14_0x2421;(function(_0x3eaaa6,_0x5b8a8a){const _0x34bf3c=a14_0x2421,_0x13f22b=_0x3eaaa6();while(!![]){try{const _0x1c98a2=parseInt(_0x34bf3c(0x189))/0x1+-parseInt(_0x34bf3c(0x188))/0x2*(-parseInt(_0x34bf3c(0x18a))/0x3)+parseInt(_0x34bf3c(0x192))/0x4+-parseInt(_0x34bf3c(0x190))/0x5*(parseInt(_0x34bf3c(0x191))/0x6)+parseInt(_0x34bf3c(0x183))/0x7+-parseInt(_0x34bf3c(0x185))/0x8*(-parseInt(_0x34bf3c(0x18d))/0x9)+-parseInt(_0x34bf3c(0x186))/0xa*(parseInt(_0x34bf3c(0x18f))/0xb);if(_0x1c98a2===_0x5b8a8a)break;else _0x13f22b['push'](_0x13f22b['shift']());}catch(_0x476fdd){_0x13f22b['push'](_0x13f22b['shift']());}}}(a14_0x4713,0x8a047));export class EventBus{constructor(){const _0x390a61=a14_0x2421;this[_0x390a61(0x193)]=new Map(),this[_0x390a61(0x17f)]=new Map();}['on'](_0x5d24a2,_0x563433){const _0x28ad4f=a14_0x2421;!this[_0x28ad4f(0x193)]['has'](_0x5d24a2)&&this[_0x28ad4f(0x193)][_0x28ad4f(0x18b)](_0x5d24a2,[]),this[_0x28ad4f(0x193)]['get'](_0x5d24a2)[_0x28ad4f(0x187)](_0x563433);}[a14_0x43e518(0x184)](_0x1960db,_0x4d4e9a){const _0x463645=_0x43c52b=>{const _0x1d10c6=a14_0x2421;_0x4d4e9a(_0x43c52b),this[_0x1d10c6(0x18e)](_0x1960db,_0x463645);};this['on'](_0x1960db,_0x463645);}[a14_0x43e518(0x18e)](_0x9b3b62,_0x46d721){const _0x4fce12=a14_0x43e518,_0x16a827=this[_0x4fce12(0x193)][_0x4fce12(0x182)](_0x9b3b62);if(!_0x16a827)return;this[_0x4fce12(0x193)]['set'](_0x9b3b62,_0x16a827['filter'](_0x4b513b=>_0x4b513b!==_0x46d721));}[a14_0x43e518(0x180)](_0x1072cd,_0x180d66){const _0x256c68=a14_0x43e518,_0x391143=this[_0x256c68(0x193)][_0x256c68(0x182)](_0x1072cd)??[];_0x391143['forEach'](_0x88482a=>_0x88482a(_0x180d66));}['onRequest'](_0x3927ca,_0x4a3770){const _0x334f83=a14_0x43e518;this[_0x334f83(0x17f)][_0x334f83(0x18b)](_0x3927ca,_0x4a3770);}async[a14_0x43e518(0x181)](_0x31d108,_0x2f6a1c){const _0x48529f=a14_0x43e518,_0x3ef163=this[_0x48529f(0x17f)]['get'](_0x31d108);if(!_0x3ef163)throw new Error(_0x48529f(0x18c)+_0x31d108+'\x22');return await _0x3ef163(_0x2f6a1c);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a25_0x125200=a25_0x4cc2;(function(_0x4564ff,_0x286967){var _0x2d02ee=a25_0x4cc2,_0x3d9241=_0x4564ff();while(!![]){try{var _0x430761=parseInt(_0x2d02ee(0x7c))/0x1*(parseInt(_0x2d02ee(0x7f))/0x2)+parseInt(_0x2d02ee(0x7e))/0x3*(parseInt(_0x2d02ee(0x84))/0x4)+-parseInt(_0x2d02ee(0x83))/0x5*(parseInt(_0x2d02ee(0x76))/0x6)+parseInt(_0x2d02ee(0x86))/0x7*(parseInt(_0x2d02ee(0x82))/0x8)+parseInt(_0x2d02ee(0x78))/0x9*(parseInt(_0x2d02ee(0x80))/0xa)+parseInt(_0x2d02ee(0x77))/0xb*(parseInt(_0x2d02ee(0x7d))/0xc)+-parseInt(_0x2d02ee(0x7b))/0xd;if(_0x430761===_0x286967)break;else _0x3d9241['push'](_0x3d9241['shift']());}catch(_0x31770a){_0x3d9241['push'](_0x3d9241['shift']());}}}(a25_0x49de,0xdf194));import a25_0x5e372b from'./events/UserEvents.js';import a25_0x52361a from'./events/ClientEvents.js';function a25_0x49de(){var _0x5e5583=['tokenIsValide','bindEvents','72195149DPEtAR','1MtzJQX','28392CFxIKA','5104569WiDOjr','2637496sepJAd','51690zJcSVZ','owl','1776DLGbrx','15aoMFyg','4YWGOOQ','000001:\x20Invalid\x20Token.','22757eYSaal','230118lMsZxw','6116PTRJkE','2655tWfNDq'];a25_0x49de=function(){return _0x5e5583;};return a25_0x49de();}import a25_0x39939e from'./events/SupplierEvents.js';import a25_0x3a94ed from'./events/ItemEvents.js';import a25_0x2e78f3 from'./events/TaxEvents.js';import a25_0x42e7c3 from'./events/OrderEvents.js';import a25_0x2c5c1d from'./events/PreparationEvents.js';import a25_0x35a16b from'./events/PurchaseEvents.js';import a25_0xfac75e from'./events/ReceptionEvents.js';import a25_0x43dbbe from'./events/StockEvents.js';function a25_0x4cc2(_0x3dba5d,_0x41f629){_0x3dba5d=_0x3dba5d-0x76;var _0x49deb4=a25_0x49de();var _0x4cc264=_0x49deb4[_0x3dba5d];return _0x4cc264;}export class EventsDatabase{constructor(_0x372a67){var _0x47955a=a25_0x4cc2;this[_0x47955a(0x81)]=_0x372a67,this[_0x47955a(0x7a)]();}[a25_0x125200(0x7a)](){var _0xc70921=a25_0x125200;if(!this['owl'][_0xc70921(0x79)]())throw new Error(_0xc70921(0x85));a25_0x5e372b(this['owl']),a25_0x52361a(this[_0xc70921(0x81)]),a25_0x39939e(this[_0xc70921(0x81)]),a25_0x3a94ed(this[_0xc70921(0x81)]),a25_0x2e78f3(this['owl']),a25_0x42e7c3(this[_0xc70921(0x81)]),a25_0x2c5c1d(this['owl']),a25_0x35a16b(this[_0xc70921(0x81)]),a25_0xfac75e(this[_0xc70921(0x81)]),a25_0x43dbbe(this[_0xc70921(0x81)]);}}
|
package/dist/core/Manager.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a26_0x39a4(_0x1e56b5,_0x56e856){_0x1e56b5=_0x1e56b5-0x1b5;var _0x1c2768=a26_0x1c27();var _0x39a497=_0x1c2768[_0x1e56b5];return _0x39a497;}(function(_0x102959,_0x31eefe){var _0x189c1b=a26_0x39a4,_0x4e9fc0=_0x102959();while(!![]){try{var _0x488239=parseInt(_0x189c1b(0x1bf))/0x1+parseInt(_0x189c1b(0x1bc))/0x2*(-parseInt(_0x189c1b(0x1c0))/0x3)+parseInt(_0x189c1b(0x1bb))/0x4+parseInt(_0x189c1b(0x1b9))/0x5+-parseInt(_0x189c1b(0x1be))/0x6+-parseInt(_0x189c1b(0x1bd))/0x7*(parseInt(_0x189c1b(0x1ba))/0x8)+-parseInt(_0x189c1b(0x1b8))/0x9*(-parseInt(_0x189c1b(0x1b5))/0xa);if(_0x488239===_0x31eefe)break;else _0x4e9fc0['push'](_0x4e9fc0['shift']());}catch(_0x47599c){_0x4e9fc0['push'](_0x4e9fc0['shift']());}}}(a26_0x1c27,0x4bb41));export class Manager{constructor(_0x4a9cb7){var _0x7cc19a=a26_0x39a4;this[_0x7cc19a(0x1b7)]=_0x4a9cb7,this[_0x7cc19a(0x1b6)]=new Map();}}function a26_0x1c27(){var _0x43bdda=['4390tBEklT','cache','owl','3852RhgDDE','2645755aVDalj','8yBYqmh','1430876aaloOn','2236NOMlyL','4269349nmBPPT','1586964uGZYEQ','480896YYuFNB','996GIyRzw'];a26_0x1c27=function(){return _0x43bdda;};return a26_0x1c27();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a15_0x28a411=a15_0x2a4a;function a15_0x3286(){const _0x3eb3cf=['CLIENT_CREATED','DELETE','/search','196351ItqVKJ','307284FcuuJn','200002:\x20Action\x20not\x20allowed.','application/json','client.read','events','client.read.some','json','1122608zgskWZ','5zbriCM','client.deleted','POST','1005rNsAlW','346041IvwThp','status','API\x20Error:\x20','146VhlXxg','hasPermission','stringify','56zkTVlr','getCurrentUser','28QMHUxa','200001:\x20Action\x20not\x20allowed.','http://localhost:5001/clients','200003:\x20Action\x20not\x20allowed.','CLIENT_READ','ADMIN','5541790QUqEQH','onRequest','client','CLIENT_DELETED','200004:\x20Action\x20not\x20allowed.','CLIENT_ALL','17814654XdyXZd','statusText','client.created','CLIENT_UPDATED'];a15_0x3286=function(){return _0x3eb3cf;};return a15_0x3286();}(function(_0x4eeebf,_0x1eb351){const _0x425053=a15_0x2a4a,_0x5aea79=_0x4eeebf();while(!![]){try{const _0x35113f=parseInt(_0x425053(0x1c2))/0x1+-parseInt(_0x425053(0x1d2))/0x2*(-parseInt(_0x425053(0x1ce))/0x3)+parseInt(_0x425053(0x1ca))/0x4*(-parseInt(_0x425053(0x1cb))/0x5)+-parseInt(_0x425053(0x1c3))/0x6*(parseInt(_0x425053(0x1d7))/0x7)+-parseInt(_0x425053(0x1d5))/0x8*(parseInt(_0x425053(0x1cf))/0x9)+-parseInt(_0x425053(0x1b5))/0xa+parseInt(_0x425053(0x1bb))/0xb;if(_0x35113f===_0x1eb351)break;else _0x5aea79['push'](_0x5aea79['shift']());}catch(_0x598c3a){_0x5aea79['push'](_0x5aea79['shift']());}}}(a15_0x3286,0x81c22));function a15_0x2a4a(_0x2cb7ca,_0xac62ac){_0x2cb7ca=_0x2cb7ca-0x1b5;const _0x3286a6=a15_0x3286();let _0x2a4a0f=_0x3286a6[_0x2cb7ca];return _0x2a4a0f;}const API_BASE=a15_0x28a411(0x1d9);export default function bindClientEvents(_0x3e4111){const _0x39b7df=a15_0x28a411;_0x3e4111[_0x39b7df(0x1c7)][_0x39b7df(0x1b6)](_0x39b7df(0x1bd),async _0x257742=>{const _0x385dd5=_0x39b7df;if(!_0x3e4111[_0x385dd5(0x1d6)]()[_0x385dd5(0x1d3)](_0x385dd5(0x1dc))&&!_0x3e4111[_0x385dd5(0x1d6)]()[_0x385dd5(0x1d3)](_0x385dd5(0x1ba))&&!_0x3e4111[_0x385dd5(0x1d6)]()[_0x385dd5(0x1d3)](_0x385dd5(0x1bf)))throw new Error(_0x385dd5(0x1d8));const _0x2077e5=await fetch(''+API_BASE,{'method':'POST','headers':{'Content-Type':_0x385dd5(0x1c5)},'body':JSON['stringify'](_0x257742[_0x385dd5(0x1b7)])});if(!_0x2077e5['ok'])throw new Error(_0x385dd5(0x1d1)+_0x2077e5[_0x385dd5(0x1bc)]);const _0xf672ca=await _0x2077e5['json']();return _0xf672ca['id'];}),_0x3e4111[_0x39b7df(0x1c7)]['onRequest'](_0x39b7df(0x1c6),async({id:_0x4118fd})=>{const _0x5cc129=_0x39b7df;if(!_0x3e4111[_0x5cc129(0x1d6)]()[_0x5cc129(0x1d3)](_0x5cc129(0x1dc))&&!_0x3e4111[_0x5cc129(0x1d6)]()[_0x5cc129(0x1d3)]('CLIENT_ALL')&&!_0x3e4111['getCurrentUser']()['hasPermission'](_0x5cc129(0x1db)))throw new Error('200002:\x20Action\x20not\x20allowed.');const _0x4dcd60=await fetch(API_BASE+'/'+_0x4118fd);if(!_0x4dcd60['ok'])throw new Error(_0x5cc129(0x1d1)+_0x4dcd60[_0x5cc129(0x1bc)]);return await _0x4dcd60[_0x5cc129(0x1c9)]();}),_0x3e4111[_0x39b7df(0x1c7)]['onRequest']('client.read.all',async()=>{const _0x381d15=_0x39b7df;if(!_0x3e4111['getCurrentUser']()[_0x381d15(0x1d3)](_0x381d15(0x1dc))&&!_0x3e4111[_0x381d15(0x1d6)]()[_0x381d15(0x1d3)]('CLIENT_ALL')&&!_0x3e4111['getCurrentUser']()[_0x381d15(0x1d3)](_0x381d15(0x1db)))throw new Error(_0x381d15(0x1c4));const _0x4b1754=await fetch(''+API_BASE);if(!_0x4b1754['ok'])throw new Error(_0x381d15(0x1d1)+_0x4b1754[_0x381d15(0x1bc)]);return await _0x4b1754[_0x381d15(0x1c9)]();}),_0x3e4111[_0x39b7df(0x1c7)][_0x39b7df(0x1b6)](_0x39b7df(0x1c8),async _0x3b77e0=>{const _0x2ab974=_0x39b7df;if(!_0x3e4111[_0x2ab974(0x1d6)]()[_0x2ab974(0x1d3)](_0x2ab974(0x1dc))&&!_0x3e4111['getCurrentUser']()[_0x2ab974(0x1d3)](_0x2ab974(0x1ba))&&!_0x3e4111['getCurrentUser']()[_0x2ab974(0x1d3)]('CLIENT_READ'))throw new Error(_0x2ab974(0x1c4));const _0x455621=await fetch(API_BASE+_0x2ab974(0x1c1),{'method':_0x2ab974(0x1cd),'headers':{'Content-Type':'application/json'},'body':JSON[_0x2ab974(0x1d4)](_0x3b77e0)});if(!_0x455621['ok'])throw new Error(_0x2ab974(0x1d1)+_0x455621[_0x2ab974(0x1bc)]);return await _0x455621[_0x2ab974(0x1c9)]();}),_0x3e4111['events'][_0x39b7df(0x1b6)]('client.updated',async _0xb5d2f5=>{const _0x4c22bd=_0x39b7df;if(!_0x3e4111[_0x4c22bd(0x1d6)]()[_0x4c22bd(0x1d3)](_0x4c22bd(0x1dc))&&!_0x3e4111['getCurrentUser']()[_0x4c22bd(0x1d3)](_0x4c22bd(0x1ba))&&!_0x3e4111['getCurrentUser']()[_0x4c22bd(0x1d3)](_0x4c22bd(0x1be)))throw new Error(_0x4c22bd(0x1da));const {where:_0x58fc82,..._0x292a24}=_0xb5d2f5,_0x519999=await fetch(API_BASE+'/'+_0x58fc82['id'],{'method':'PUT','headers':{'Content-Type':'application/json'},'body':JSON[_0x4c22bd(0x1d4)](_0x292a24)});if(!_0x519999['ok'])throw new Error(_0x4c22bd(0x1d1)+_0x519999[_0x4c22bd(0x1bc)]);return await _0x519999[_0x4c22bd(0x1c9)]();}),_0x3e4111[_0x39b7df(0x1c7)]['on'](_0x39b7df(0x1cc),async({id:_0x5783eb})=>{const _0x106af0=_0x39b7df;if(!_0x3e4111[_0x106af0(0x1d6)]()[_0x106af0(0x1d3)](_0x106af0(0x1dc))&&!_0x3e4111[_0x106af0(0x1d6)]()[_0x106af0(0x1d3)]('CLIENT_ALL')&&!_0x3e4111[_0x106af0(0x1d6)]()[_0x106af0(0x1d3)](_0x106af0(0x1b8)))throw new Error(_0x106af0(0x1b9));const _0x1f3ff8=await fetch(API_BASE+'/'+_0x5783eb,{'method':_0x106af0(0x1c0)});if(!_0x1f3ff8['ok']&&_0x1f3ff8[_0x106af0(0x1d0)]!==0xcc)throw new Error(_0x106af0(0x1d1)+_0x1f3ff8[_0x106af0(0x1bc)]);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a16_0x2ce9(_0x134aab,_0x2c2461){_0x134aab=_0x134aab-0x158;const _0x255f92=a16_0x255f();let _0x2ce9e0=_0x255f92[_0x134aab];return _0x2ce9e0;}function a16_0x255f(){const _0x1e6e4f=['item.read','3LqWqmJ','ITEM_UPDATED','52epMIMU','stringify','400002:\x20Action\x20not\x20allowed.','onRequest','item.updated','1354745kdUxTO','ITEM_READ','ADMIN','8714BRHqDv','ITEM_DELETED','38120dzvWxl','status','760165oriaTF','getCurrentUser','application/json','hasPermission','216180pKhbWO','item.read.all','json','616ikpIUe','400003:\x20Action\x20not\x20allowed.','events','item.read.some','400004:\x20Action\x20not\x20allowed.','statusText','ITEM_CREATED','6aCXPQs','36132NemxXk','DELETE','item','400001:\x20Action\x20not\x20allowed.','API\x20Error:\x20','579448ITYDhS','POST','item.deleted','ITEM_ALL','/search'];a16_0x255f=function(){return _0x1e6e4f;};return a16_0x255f();}(function(_0x25c0e2,_0x253357){const _0x42e236=a16_0x2ce9,_0x3f0a75=_0x25c0e2();while(!![]){try{const _0x134b88=parseInt(_0x42e236(0x166))/0x1*(-parseInt(_0x42e236(0x15e))/0x2)+-parseInt(_0x42e236(0x15c))/0x3*(-parseInt(_0x42e236(0x179))/0x4)+-parseInt(_0x42e236(0x16a))/0x5*(parseInt(_0x42e236(0x178))/0x6)+parseInt(_0x42e236(0x163))/0x7+parseInt(_0x42e236(0x17e))/0x8+parseInt(_0x42e236(0x16e))/0x9+parseInt(_0x42e236(0x168))/0xa*(parseInt(_0x42e236(0x171))/0xb);if(_0x134b88===_0x253357)break;else _0x3f0a75['push'](_0x3f0a75['shift']());}catch(_0x5be9f2){_0x3f0a75['push'](_0x3f0a75['shift']());}}}(a16_0x255f,0x20b06));const API_BASE='http://localhost:5001/items';export default function bindItemEvents(_0x4c3b28){const _0x56eff7=a16_0x2ce9;_0x4c3b28['events'][_0x56eff7(0x161)]('item.created',async _0x3f99fa=>{const _0x1f6f47=_0x56eff7;if(!_0x4c3b28[_0x1f6f47(0x16b)]()[_0x1f6f47(0x16d)]('ADMIN')&&!_0x4c3b28[_0x1f6f47(0x16b)]()[_0x1f6f47(0x16d)](_0x1f6f47(0x159))&&!_0x4c3b28[_0x1f6f47(0x16b)]()[_0x1f6f47(0x16d)](_0x1f6f47(0x177)))throw new Error(_0x1f6f47(0x17c));const _0x4de409=await fetch(''+API_BASE,{'method':_0x1f6f47(0x17f),'headers':{'Content-Type':'application/json'},'body':JSON[_0x1f6f47(0x15f)](_0x3f99fa[_0x1f6f47(0x17b)])});if(!_0x4de409['ok'])throw new Error(_0x1f6f47(0x17d)+_0x4de409[_0x1f6f47(0x176)]);const _0x22747b=await _0x4de409[_0x1f6f47(0x170)]();return _0x22747b['id'];}),_0x4c3b28[_0x56eff7(0x173)][_0x56eff7(0x161)](_0x56eff7(0x15b),async({id:_0x171e1b})=>{const _0x56d1bb=_0x56eff7;if(!_0x4c3b28[_0x56d1bb(0x16b)]()[_0x56d1bb(0x16d)]('ADMIN')&&!_0x4c3b28[_0x56d1bb(0x16b)]()[_0x56d1bb(0x16d)](_0x56d1bb(0x159))&&!_0x4c3b28['getCurrentUser']()['hasPermission']('ITEM_READ'))throw new Error(_0x56d1bb(0x160));const _0x3c85f2=await fetch(API_BASE+'/'+_0x171e1b);if(!_0x3c85f2['ok'])throw new Error(_0x56d1bb(0x17d)+_0x3c85f2['statusText']);return await _0x3c85f2[_0x56d1bb(0x170)]();}),_0x4c3b28[_0x56eff7(0x173)][_0x56eff7(0x161)](_0x56eff7(0x16f),async()=>{const _0x3e7795=_0x56eff7;if(!_0x4c3b28[_0x3e7795(0x16b)]()[_0x3e7795(0x16d)](_0x3e7795(0x165))&&!_0x4c3b28['getCurrentUser']()[_0x3e7795(0x16d)](_0x3e7795(0x159))&&!_0x4c3b28['getCurrentUser']()['hasPermission'](_0x3e7795(0x164)))throw new Error(_0x3e7795(0x160));const _0x183954=await fetch(''+API_BASE);if(!_0x183954['ok'])throw new Error(_0x3e7795(0x17d)+_0x183954['statusText']);return await _0x183954[_0x3e7795(0x170)]();}),_0x4c3b28[_0x56eff7(0x173)][_0x56eff7(0x161)](_0x56eff7(0x174),async _0x2a59ab=>{const _0x32647c=_0x56eff7;if(!_0x4c3b28['getCurrentUser']()['hasPermission'](_0x32647c(0x165))&&!_0x4c3b28[_0x32647c(0x16b)]()['hasPermission'](_0x32647c(0x159))&&!_0x4c3b28[_0x32647c(0x16b)]()[_0x32647c(0x16d)](_0x32647c(0x164)))throw new Error(_0x32647c(0x160));const _0xeb437c=await fetch(API_BASE+_0x32647c(0x15a),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x32647c(0x15f)](_0x2a59ab)});if(!_0xeb437c['ok'])throw new Error(_0x32647c(0x17d)+_0xeb437c[_0x32647c(0x176)]);return await _0xeb437c[_0x32647c(0x170)]();}),_0x4c3b28[_0x56eff7(0x173)]['onRequest'](_0x56eff7(0x162),async _0x191535=>{const _0x59d3dd=_0x56eff7;if(!_0x4c3b28[_0x59d3dd(0x16b)]()[_0x59d3dd(0x16d)]('ADMIN')&&!_0x4c3b28[_0x59d3dd(0x16b)]()[_0x59d3dd(0x16d)](_0x59d3dd(0x159))&&!_0x4c3b28[_0x59d3dd(0x16b)]()[_0x59d3dd(0x16d)](_0x59d3dd(0x15d)))throw new Error(_0x59d3dd(0x172));const {where:_0x21ee54,..._0x47bc1e}=_0x191535,_0x3d3268=await fetch(API_BASE+'/'+_0x21ee54['id'],{'method':'PUT','headers':{'Content-Type':_0x59d3dd(0x16c)},'body':JSON[_0x59d3dd(0x15f)](_0x47bc1e)});if(!_0x3d3268['ok'])throw new Error(_0x59d3dd(0x17d)+_0x3d3268[_0x59d3dd(0x176)]);return await _0x3d3268['json']();}),_0x4c3b28[_0x56eff7(0x173)]['on'](_0x56eff7(0x158),async({id:_0x18c90a})=>{const _0x4e23c8=_0x56eff7;if(!_0x4c3b28[_0x4e23c8(0x16b)]()[_0x4e23c8(0x16d)](_0x4e23c8(0x165))&&!_0x4c3b28[_0x4e23c8(0x16b)]()['hasPermission'](_0x4e23c8(0x159))&&!_0x4c3b28['getCurrentUser']()[_0x4e23c8(0x16d)](_0x4e23c8(0x167)))throw new Error(_0x4e23c8(0x175));const _0x4d72e5=await fetch(API_BASE+'/'+_0x18c90a,{'method':_0x4e23c8(0x17a)});if(!_0x4d72e5['ok']&&_0x4d72e5[_0x4e23c8(0x169)]!==0xcc)throw new Error('API\x20Error:\x20'+_0x4d72e5['statusText']);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1f2411,_0x591857){const _0x3e8c1c=a17_0x496e,_0x5cf2e4=_0x1f2411();while(!![]){try{const _0x3bed98=parseInt(_0x3e8c1c(0xf0))/0x1*(parseInt(_0x3e8c1c(0xe9))/0x2)+parseInt(_0x3e8c1c(0xe4))/0x3*(-parseInt(_0x3e8c1c(0xfe))/0x4)+-parseInt(_0x3e8c1c(0xe6))/0x5+-parseInt(_0x3e8c1c(0xe0))/0x6+parseInt(_0x3e8c1c(0xe1))/0x7+-parseInt(_0x3e8c1c(0xf6))/0x8*(parseInt(_0x3e8c1c(0xe8))/0x9)+-parseInt(_0x3e8c1c(0xef))/0xa*(-parseInt(_0x3e8c1c(0xf3))/0xb);if(_0x3bed98===_0x591857)break;else _0x5cf2e4['push'](_0x5cf2e4['shift']());}catch(_0x2f42be){_0x5cf2e4['push'](_0x5cf2e4['shift']());}}}(a17_0x2c20,0xb1694));const API_BASE='http://localhost:5001/orders';function a17_0x2c20(){const _0x5cf143=['5379jhhjUN','getCurrentUser','ORDER_UPDATED','5056064WiWjpZ','json','events','ORDER_DELETED','210003:\x20Action\x20not\x20allowed.','status','ORDER_ALL','stringify','2637196tZjbLW','ORDER_CREATED','210001:\x20Action\x20not\x20allowed.','order.read.some','ORDER_READ','PUT','1418604OsDuYD','2906239XRXWfO','hasPermission','210002:\x20Action\x20not\x20allowed.','6tbXVYY','statusText','4072220OiFQrt','POST','18yETzIF','376RLuell','application/json','API\x20Error:\x20','onRequest','ADMIN','/search','56350zXvndd','6327EjgHOl','order.read.all','order.created'];a17_0x2c20=function(){return _0x5cf143;};return a17_0x2c20();}function a17_0x496e(_0x3582d2,_0x272d32){_0x3582d2=_0x3582d2-0xdd;const _0x2c208a=a17_0x2c20();let _0x496e17=_0x2c208a[_0x3582d2];return _0x496e17;}export default function bindOrderEvents(_0x575d77){const _0x567987=a17_0x496e;_0x575d77['events'][_0x567987(0xec)](_0x567987(0xf2),async _0x57f585=>{const _0x210d87=_0x567987;if(!_0x575d77['getCurrentUser']()[_0x210d87(0xe2)](_0x210d87(0xed))&&!_0x575d77[_0x210d87(0xf4)]()[_0x210d87(0xe2)](_0x210d87(0xfc))&&!_0x575d77[_0x210d87(0xf4)]()[_0x210d87(0xe2)](_0x210d87(0xff)))throw new Error(_0x210d87(0x100));const _0x2f7c28=await fetch(''+API_BASE,{'method':_0x210d87(0xe7),'headers':{'Content-Type':_0x210d87(0xea)},'body':JSON['stringify'](_0x57f585['order'])});if(!_0x2f7c28['ok'])throw new Error(_0x210d87(0xeb)+_0x2f7c28[_0x210d87(0xe5)]);const _0x3ccc10=await _0x2f7c28[_0x210d87(0xf7)]();return _0x3ccc10['id'];}),_0x575d77[_0x567987(0xf8)][_0x567987(0xec)]('order.read',async({id:_0x3349a7})=>{const _0xe255d4=_0x567987;if(!_0x575d77[_0xe255d4(0xf4)]()[_0xe255d4(0xe2)](_0xe255d4(0xed))&&!_0x575d77[_0xe255d4(0xf4)]()[_0xe255d4(0xe2)](_0xe255d4(0xfc))&&!_0x575d77['getCurrentUser']()['hasPermission'](_0xe255d4(0xde)))throw new Error(_0xe255d4(0xe3));const _0x445ac9=await fetch(API_BASE+'/'+_0x3349a7);if(!_0x445ac9['ok'])throw new Error(_0xe255d4(0xeb)+_0x445ac9[_0xe255d4(0xe5)]);return await _0x445ac9['json']();}),_0x575d77[_0x567987(0xf8)][_0x567987(0xec)](_0x567987(0xf1),async()=>{const _0x57d1f4=_0x567987;if(!_0x575d77[_0x57d1f4(0xf4)]()[_0x57d1f4(0xe2)](_0x57d1f4(0xed))&&!_0x575d77[_0x57d1f4(0xf4)]()['hasPermission'](_0x57d1f4(0xfc))&&!_0x575d77[_0x57d1f4(0xf4)]()[_0x57d1f4(0xe2)](_0x57d1f4(0xde)))throw new Error(_0x57d1f4(0xe3));const _0x15f5b2=await fetch(''+API_BASE);if(!_0x15f5b2['ok'])throw new Error(_0x57d1f4(0xeb)+_0x15f5b2[_0x57d1f4(0xe5)]);return await _0x15f5b2['json']();}),_0x575d77[_0x567987(0xf8)]['onRequest'](_0x567987(0xdd),async _0x64b699=>{const _0x3e21d4=_0x567987;if(!_0x575d77['getCurrentUser']()['hasPermission'](_0x3e21d4(0xed))&&!_0x575d77['getCurrentUser']()[_0x3e21d4(0xe2)]('ORDER_ALL')&&!_0x575d77['getCurrentUser']()[_0x3e21d4(0xe2)](_0x3e21d4(0xde)))throw new Error(_0x3e21d4(0xe3));const _0x35b2d4=await fetch(API_BASE+_0x3e21d4(0xee),{'method':_0x3e21d4(0xe7),'headers':{'Content-Type':_0x3e21d4(0xea)},'body':JSON[_0x3e21d4(0xfd)](_0x64b699)});if(!_0x35b2d4['ok'])throw new Error(_0x3e21d4(0xeb)+_0x35b2d4[_0x3e21d4(0xe5)]);return await _0x35b2d4[_0x3e21d4(0xf7)]();}),_0x575d77[_0x567987(0xf8)][_0x567987(0xec)]('order.updated',async _0x2b4472=>{const _0x1f8f68=_0x567987;if(!_0x575d77['getCurrentUser']()[_0x1f8f68(0xe2)]('ADMIN')&&!_0x575d77[_0x1f8f68(0xf4)]()['hasPermission'](_0x1f8f68(0xfc))&&!_0x575d77[_0x1f8f68(0xf4)]()[_0x1f8f68(0xe2)](_0x1f8f68(0xf5)))throw new Error(_0x1f8f68(0xfa));const {where:_0x5b124e,..._0x4f96a8}=_0x2b4472,_0x33720b=await fetch(API_BASE+'/'+_0x5b124e['id'],{'method':_0x1f8f68(0xdf),'headers':{'Content-Type':_0x1f8f68(0xea)},'body':JSON[_0x1f8f68(0xfd)](_0x4f96a8)});if(!_0x33720b['ok'])throw new Error(_0x1f8f68(0xeb)+_0x33720b[_0x1f8f68(0xe5)]);return await _0x33720b[_0x1f8f68(0xf7)]();}),_0x575d77[_0x567987(0xf8)]['on']('order.deleted',async({id:_0x31420c})=>{const _0x46ced9=_0x567987;if(!_0x575d77[_0x46ced9(0xf4)]()['hasPermission']('ADMIN')&&!_0x575d77[_0x46ced9(0xf4)]()[_0x46ced9(0xe2)](_0x46ced9(0xfc))&&!_0x575d77[_0x46ced9(0xf4)]()[_0x46ced9(0xe2)](_0x46ced9(0xf9)))throw new Error('210004:\x20Action\x20not\x20allowed.');const _0x25114f=await fetch(API_BASE+'/'+_0x31420c,{'method':'DELETE'});if(!_0x25114f['ok']&&_0x25114f[_0x46ced9(0xfb)]!==0xcc)throw new Error(_0x46ced9(0xeb)+_0x25114f[_0x46ced9(0xe5)]);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a18_0x866a(){const _0x120be2=['preparation.read.all','PREPARATION_ALL','http://localhost:5001/preparations','16hpcDMA','PUT','statusText','ADMIN','onRequest','908kfMuuV','status','PREPARATION_DELETED','POST','220003:\x20Action\x20not\x20allowed.','35219200ZpliAn','stringify','6LkHEAJ','hasPermission','events','PREPARATION_CREATED','preparation.created','706705rlVbLz','1438209fpNNlO','1399160zMGQwh','preparation.deleted','json','3274200anWoDo','PREPARATION_READ','getCurrentUser','220004:\x20Action\x20not\x20allowed.','9005255llPQbm','API\x20Error:\x20','preparation.updated','application/json','preparation','220002:\x20Action\x20not\x20allowed.','5142RCkipE'];a18_0x866a=function(){return _0x120be2;};return a18_0x866a();}const a18_0x4159a6=a18_0x3b83;(function(_0xeab67c,_0x709b30){const _0x2c0cd3=a18_0x3b83,_0x5aa4d4=_0xeab67c();while(!![]){try{const _0x1affaf=parseInt(_0x2c0cd3(0xdf))/0x1+-parseInt(_0x2c0cd3(0xc0))/0x2+parseInt(_0x2c0cd3(0xca))/0x3*(parseInt(_0x2c0cd3(0xd3))/0x4)+parseInt(_0x2c0cd3(0xc4))/0x5*(-parseInt(_0x2c0cd3(0xda))/0x6)+-parseInt(_0x2c0cd3(0xe1))/0x7*(parseInt(_0x2c0cd3(0xce))/0x8)+parseInt(_0x2c0cd3(0xe0))/0x9+parseInt(_0x2c0cd3(0xd8))/0xa;if(_0x1affaf===_0x709b30)break;else _0x5aa4d4['push'](_0x5aa4d4['shift']());}catch(_0x3a43d5){_0x5aa4d4['push'](_0x5aa4d4['shift']());}}}(a18_0x866a,0xe5649));function a18_0x3b83(_0x4c403f,_0x29701b){_0x4c403f=_0x4c403f-0xc0;const _0x866a9=a18_0x866a();let _0x3b839b=_0x866a9[_0x4c403f];return _0x3b839b;}const API_BASE=a18_0x4159a6(0xcd);export default function bindPreparationEvents(_0x48f84a){const _0x20b882=a18_0x4159a6;_0x48f84a['events'][_0x20b882(0xd2)](_0x20b882(0xde),async _0x25b527=>{const _0x2e812b=_0x20b882;if(!_0x48f84a['getCurrentUser']()[_0x2e812b(0xdb)](_0x2e812b(0xd1))&&!_0x48f84a[_0x2e812b(0xc2)]()[_0x2e812b(0xdb)]('PREPARATION_ALL')&&!_0x48f84a[_0x2e812b(0xc2)]()[_0x2e812b(0xdb)](_0x2e812b(0xdd)))throw new Error('220001:\x20Action\x20not\x20allowed.');const _0x524b78=await fetch(''+API_BASE,{'method':_0x2e812b(0xd6),'headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x25b527[_0x2e812b(0xc8)])});if(!_0x524b78['ok'])throw new Error('API\x20Error:\x20'+_0x524b78['statusText']);const _0x39b755=await _0x524b78[_0x2e812b(0xe3)]();return _0x39b755['id'];}),_0x48f84a[_0x20b882(0xdc)][_0x20b882(0xd2)]('preparation.read',async({id:_0x4c16be})=>{const _0x17cfec=_0x20b882;if(!_0x48f84a['getCurrentUser']()[_0x17cfec(0xdb)](_0x17cfec(0xd1))&&!_0x48f84a[_0x17cfec(0xc2)]()[_0x17cfec(0xdb)](_0x17cfec(0xcc))&&!_0x48f84a[_0x17cfec(0xc2)]()[_0x17cfec(0xdb)](_0x17cfec(0xc1)))throw new Error(_0x17cfec(0xc9));const _0x1dc14e=await fetch(API_BASE+'/'+_0x4c16be);if(!_0x1dc14e['ok'])throw new Error(_0x17cfec(0xc5)+_0x1dc14e[_0x17cfec(0xd0)]);return await _0x1dc14e[_0x17cfec(0xe3)]();}),_0x48f84a[_0x20b882(0xdc)][_0x20b882(0xd2)](_0x20b882(0xcb),async()=>{const _0x5a6808=_0x20b882;if(!_0x48f84a[_0x5a6808(0xc2)]()['hasPermission'](_0x5a6808(0xd1))&&!_0x48f84a['getCurrentUser']()[_0x5a6808(0xdb)](_0x5a6808(0xcc))&&!_0x48f84a[_0x5a6808(0xc2)]()[_0x5a6808(0xdb)]('PREPARATION_READ'))throw new Error(_0x5a6808(0xc9));const _0x214626=await fetch(''+API_BASE);if(!_0x214626['ok'])throw new Error(_0x5a6808(0xc5)+_0x214626[_0x5a6808(0xd0)]);return await _0x214626[_0x5a6808(0xe3)]();}),_0x48f84a[_0x20b882(0xdc)][_0x20b882(0xd2)]('preparation.read.some',async _0x245ebe=>{const _0x3914ea=_0x20b882;if(!_0x48f84a[_0x3914ea(0xc2)]()[_0x3914ea(0xdb)]('ADMIN')&&!_0x48f84a[_0x3914ea(0xc2)]()[_0x3914ea(0xdb)](_0x3914ea(0xcc))&&!_0x48f84a[_0x3914ea(0xc2)]()[_0x3914ea(0xdb)](_0x3914ea(0xc1)))throw new Error(_0x3914ea(0xc9));const _0x43cb0f=await fetch(API_BASE+'/search',{'method':_0x3914ea(0xd6),'headers':{'Content-Type':'application/json'},'body':JSON[_0x3914ea(0xd9)](_0x245ebe)});if(!_0x43cb0f['ok'])throw new Error('API\x20Error:\x20'+_0x43cb0f[_0x3914ea(0xd0)]);return await _0x43cb0f['json']();}),_0x48f84a[_0x20b882(0xdc)]['onRequest'](_0x20b882(0xc6),async _0xfd0382=>{const _0x35d95d=_0x20b882;if(!_0x48f84a[_0x35d95d(0xc2)]()[_0x35d95d(0xdb)](_0x35d95d(0xd1))&&!_0x48f84a['getCurrentUser']()[_0x35d95d(0xdb)](_0x35d95d(0xcc))&&!_0x48f84a[_0x35d95d(0xc2)]()[_0x35d95d(0xdb)]('PREPARATION_UPDATED'))throw new Error(_0x35d95d(0xd7));const {where:_0x494eef,..._0xa308c9}=_0xfd0382,_0x323faa=await fetch(API_BASE+'/'+_0x494eef['id'],{'method':_0x35d95d(0xcf),'headers':{'Content-Type':_0x35d95d(0xc7)},'body':JSON[_0x35d95d(0xd9)](_0xa308c9)});if(!_0x323faa['ok'])throw new Error('API\x20Error:\x20'+_0x323faa[_0x35d95d(0xd0)]);return await _0x323faa[_0x35d95d(0xe3)]();}),_0x48f84a[_0x20b882(0xdc)]['on'](_0x20b882(0xe2),async({id:_0x1c6ae9})=>{const _0x565a93=_0x20b882;if(!_0x48f84a[_0x565a93(0xc2)]()[_0x565a93(0xdb)]('ADMIN')&&!_0x48f84a[_0x565a93(0xc2)]()[_0x565a93(0xdb)](_0x565a93(0xcc))&&!_0x48f84a['getCurrentUser']()[_0x565a93(0xdb)](_0x565a93(0xd5)))throw new Error(_0x565a93(0xc3));const _0x31abdb=await fetch(API_BASE+'/'+_0x1c6ae9,{'method':'DELETE'});if(!_0x31abdb['ok']&&_0x31abdb[_0x565a93(0xd4)]!==0xcc)throw new Error('API\x20Error:\x20'+_0x31abdb[_0x565a93(0xd0)]);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a19_0x1341(_0x4b481b,_0x45d0c4){_0x4b481b=_0x4b481b-0x7f;const _0x37d8a3=a19_0x37d8();let _0x1341eb=_0x37d8a3[_0x4b481b];return _0x1341eb;}const a19_0x14e8ea=a19_0x1341;(function(_0x1de303,_0x115eca){const _0x1f1e53=a19_0x1341,_0x118149=_0x1de303();while(!![]){try{const _0x4e3037=parseInt(_0x1f1e53(0x84))/0x1*(parseInt(_0x1f1e53(0xa2))/0x2)+parseInt(_0x1f1e53(0x8b))/0x3*(-parseInt(_0x1f1e53(0xa5))/0x4)+-parseInt(_0x1f1e53(0x82))/0x5+parseInt(_0x1f1e53(0xa1))/0x6*(parseInt(_0x1f1e53(0x86))/0x7)+-parseInt(_0x1f1e53(0x8a))/0x8*(parseInt(_0x1f1e53(0x8f))/0x9)+parseInt(_0x1f1e53(0x99))/0xa+-parseInt(_0x1f1e53(0x95))/0xb;if(_0x4e3037===_0x115eca)break;else _0x118149['push'](_0x118149['shift']());}catch(_0x2c42f3){_0x118149['push'](_0x118149['shift']());}}}(a19_0x37d8,0xa8e99));function a19_0x37d8(){const _0xa015b0=['DELETE','310002:\x20Action\x20not\x20allowed.','3292120UnoqJO','stringify','API\x20Error:\x20','PURCHASE_READ','purchase.deleted','statusText','PURCHASE_ALL','hasPermission','60UEPeBc','9820rDrouH','purchase.created','http://localhost:5001/purchases','4ACfkLg','events','PURCHASE_DELETED','POST','/search','3437345XjGsCv','310001:\x20Action\x20not\x20allowed.','270jqUYRx','purchase.read.some','868007QHains','json','purchase','310004:\x20Action\x20not\x20allowed.','8nlHmbQ','1668099yFSIIz','ADMIN','310003:\x20Action\x20not\x20allowed.','getCurrentUser','7559820MBnqxT','purchase.read','PURCHASE_CREATED','application/json','PURCHASE_UPDATED','onRequest','1315325cCoKOP','status'];a19_0x37d8=function(){return _0xa015b0;};return a19_0x37d8();}const API_BASE=a19_0x14e8ea(0xa4);export default function bindPurchaseEvents(_0x3f595d){const _0x451c28=a19_0x14e8ea;_0x3f595d[_0x451c28(0xa6)]['onRequest'](_0x451c28(0xa3),async _0x3332e4=>{const _0x43c48d=_0x451c28;if(!_0x3f595d[_0x43c48d(0x8e)]()['hasPermission'](_0x43c48d(0x8c))&&!_0x3f595d[_0x43c48d(0x8e)]()['hasPermission'](_0x43c48d(0x9f))&&!_0x3f595d[_0x43c48d(0x8e)]()[_0x43c48d(0xa0)](_0x43c48d(0x91)))throw new Error(_0x43c48d(0x83));const _0x25d6f1=await fetch(''+API_BASE,{'method':_0x43c48d(0x80),'headers':{'Content-Type':_0x43c48d(0x92)},'body':JSON[_0x43c48d(0x9a)](_0x3332e4[_0x43c48d(0x88)])});if(!_0x25d6f1['ok'])throw new Error(_0x43c48d(0x9b)+_0x25d6f1['statusText']);const _0x69ab3c=await _0x25d6f1[_0x43c48d(0x87)]();return _0x69ab3c['id'];}),_0x3f595d['events'][_0x451c28(0x94)](_0x451c28(0x90),async({id:_0x1ebdbd})=>{const _0x1f273e=_0x451c28;if(!_0x3f595d[_0x1f273e(0x8e)]()[_0x1f273e(0xa0)](_0x1f273e(0x8c))&&!_0x3f595d[_0x1f273e(0x8e)]()[_0x1f273e(0xa0)]('PURCHASE_ALL')&&!_0x3f595d[_0x1f273e(0x8e)]()[_0x1f273e(0xa0)](_0x1f273e(0x9c)))throw new Error(_0x1f273e(0x98));const _0x3b2d03=await fetch(API_BASE+'/'+_0x1ebdbd);if(!_0x3b2d03['ok'])throw new Error(_0x1f273e(0x9b)+_0x3b2d03[_0x1f273e(0x9e)]);return await _0x3b2d03[_0x1f273e(0x87)]();}),_0x3f595d[_0x451c28(0xa6)]['onRequest']('purchase.read.all',async()=>{const _0x4c374c=_0x451c28;if(!_0x3f595d[_0x4c374c(0x8e)]()[_0x4c374c(0xa0)](_0x4c374c(0x8c))&&!_0x3f595d[_0x4c374c(0x8e)]()[_0x4c374c(0xa0)](_0x4c374c(0x9f))&&!_0x3f595d['getCurrentUser']()[_0x4c374c(0xa0)](_0x4c374c(0x9c)))throw new Error(_0x4c374c(0x98));const _0x203c7c=await fetch(''+API_BASE);if(!_0x203c7c['ok'])throw new Error(_0x4c374c(0x9b)+_0x203c7c[_0x4c374c(0x9e)]);return await _0x203c7c[_0x4c374c(0x87)]();}),_0x3f595d['events'][_0x451c28(0x94)](_0x451c28(0x85),async _0xcf5df9=>{const _0x84250c=_0x451c28;if(!_0x3f595d[_0x84250c(0x8e)]()[_0x84250c(0xa0)](_0x84250c(0x8c))&&!_0x3f595d[_0x84250c(0x8e)]()[_0x84250c(0xa0)](_0x84250c(0x9f))&&!_0x3f595d[_0x84250c(0x8e)]()[_0x84250c(0xa0)](_0x84250c(0x9c)))throw new Error(_0x84250c(0x98));const _0x1985f4=await fetch(API_BASE+_0x84250c(0x81),{'method':_0x84250c(0x80),'headers':{'Content-Type':'application/json'},'body':JSON[_0x84250c(0x9a)](_0xcf5df9)});if(!_0x1985f4['ok'])throw new Error('API\x20Error:\x20'+_0x1985f4[_0x84250c(0x9e)]);return await _0x1985f4[_0x84250c(0x87)]();}),_0x3f595d['events'][_0x451c28(0x94)]('purchase.updated',async _0x35d181=>{const _0x38f43c=_0x451c28;if(!_0x3f595d['getCurrentUser']()['hasPermission'](_0x38f43c(0x8c))&&!_0x3f595d[_0x38f43c(0x8e)]()[_0x38f43c(0xa0)](_0x38f43c(0x9f))&&!_0x3f595d['getCurrentUser']()[_0x38f43c(0xa0)](_0x38f43c(0x93)))throw new Error(_0x38f43c(0x8d));const {where:_0x509a2c,..._0x4f3179}=_0x35d181,_0x2a019b=await fetch(API_BASE+'/'+_0x509a2c['id'],{'method':'PUT','headers':{'Content-Type':_0x38f43c(0x92)},'body':JSON[_0x38f43c(0x9a)](_0x4f3179)});if(!_0x2a019b['ok'])throw new Error(_0x38f43c(0x9b)+_0x2a019b[_0x38f43c(0x9e)]);return await _0x2a019b['json']();}),_0x3f595d[_0x451c28(0xa6)]['on'](_0x451c28(0x9d),async({id:_0x189503})=>{const _0x4c44bf=_0x451c28;if(!_0x3f595d[_0x4c44bf(0x8e)]()['hasPermission'](_0x4c44bf(0x8c))&&!_0x3f595d[_0x4c44bf(0x8e)]()[_0x4c44bf(0xa0)](_0x4c44bf(0x9f))&&!_0x3f595d['getCurrentUser']()['hasPermission'](_0x4c44bf(0x7f)))throw new Error(_0x4c44bf(0x89));const _0x4c6227=await fetch(API_BASE+'/'+_0x189503,{'method':_0x4c44bf(0x97)});if(!_0x4c6227['ok']&&_0x4c6227[_0x4c44bf(0x96)]!==0xcc)throw new Error(_0x4c44bf(0x9b)+_0x4c6227[_0x4c44bf(0x9e)]);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a20_0x34c8e1=a20_0x4cb9;(function(_0x159666,_0x13c946){const _0x4c015d=a20_0x4cb9,_0x433b8c=_0x159666();while(!![]){try{const _0x348f82=parseInt(_0x4c015d(0x16e))/0x1+-parseInt(_0x4c015d(0x158))/0x2+-parseInt(_0x4c015d(0x155))/0x3+-parseInt(_0x4c015d(0x15b))/0x4*(parseInt(_0x4c015d(0x165))/0x5)+parseInt(_0x4c015d(0x162))/0x6+parseInt(_0x4c015d(0x163))/0x7*(-parseInt(_0x4c015d(0x16a))/0x8)+-parseInt(_0x4c015d(0x16c))/0x9*(-parseInt(_0x4c015d(0x152))/0xa);if(_0x348f82===_0x13c946)break;else _0x433b8c['push'](_0x433b8c['shift']());}catch(_0x1216e8){_0x433b8c['push'](_0x433b8c['shift']());}}}(a20_0x131f,0xb60bb));function a20_0x4cb9(_0x588ae7,_0x1d040a){_0x588ae7=_0x588ae7-0x152;const _0x131fa9=a20_0x131f();let _0x4cb98d=_0x131fa9[_0x588ae7];return _0x4cb98d;}function a20_0x131f(){const _0x431f5b=['ADMIN','hasPermission','RECEPTION_UPDATED','DELETE','reception.created','status','statusText','10lbEzhw','RECEPTION_READ','320002:\x20Action\x20not\x20allowed.','3309678tMEUrl','RECEPTION_ALL','reception.read.some','2266014NVaPbq','reception.read.all','stringify','1513964jtzzuv','reception.deleted','PUT','320003:\x20Action\x20not\x20allowed.','events','API\x20Error:\x20','RECEPTION_CREATED','5732196VxmcDo','9059575xhMLyM','reception.updated','5SCgsej','POST','json','http://localhost:5001/receptions','320004:\x20Action\x20not\x20allowed.','8wVmTXV','application/json','28705968rleiJh','getCurrentUser','509690GxdOjx','onRequest','reception'];a20_0x131f=function(){return _0x431f5b;};return a20_0x131f();}const API_BASE=a20_0x34c8e1(0x168);export default function bindReceptionEvents(_0x3932be){const _0x369e4d=a20_0x34c8e1;_0x3932be['events'][_0x369e4d(0x16f)](_0x369e4d(0x175),async _0x1b5d48=>{const _0x3d37fc=_0x369e4d;if(!_0x3932be['getCurrentUser']()['hasPermission'](_0x3d37fc(0x171))&&!_0x3932be[_0x3d37fc(0x16d)]()['hasPermission'](_0x3d37fc(0x156))&&!_0x3932be['getCurrentUser']()['hasPermission'](_0x3d37fc(0x161)))throw new Error('320001:\x20Action\x20not\x20allowed.');const _0x16694a=await fetch(''+API_BASE,{'method':_0x3d37fc(0x166),'headers':{'Content-Type':_0x3d37fc(0x16b)},'body':JSON[_0x3d37fc(0x15a)](_0x1b5d48[_0x3d37fc(0x170)])});if(!_0x16694a['ok'])throw new Error(_0x3d37fc(0x160)+_0x16694a[_0x3d37fc(0x177)]);const _0x1191e2=await _0x16694a[_0x3d37fc(0x167)]();return _0x1191e2['id'];}),_0x3932be[_0x369e4d(0x15f)][_0x369e4d(0x16f)]('reception.read',async({id:_0x35769b})=>{const _0x2f865b=_0x369e4d;if(!_0x3932be[_0x2f865b(0x16d)]()[_0x2f865b(0x172)](_0x2f865b(0x171))&&!_0x3932be[_0x2f865b(0x16d)]()[_0x2f865b(0x172)]('RECEPTION_ALL')&&!_0x3932be[_0x2f865b(0x16d)]()[_0x2f865b(0x172)](_0x2f865b(0x153)))throw new Error(_0x2f865b(0x154));const _0x27d037=await fetch(API_BASE+'/'+_0x35769b);if(!_0x27d037['ok'])throw new Error(_0x2f865b(0x160)+_0x27d037[_0x2f865b(0x177)]);return await _0x27d037['json']();}),_0x3932be['events'][_0x369e4d(0x16f)](_0x369e4d(0x159),async()=>{const _0x2b9988=_0x369e4d;if(!_0x3932be[_0x2b9988(0x16d)]()['hasPermission'](_0x2b9988(0x171))&&!_0x3932be[_0x2b9988(0x16d)]()[_0x2b9988(0x172)](_0x2b9988(0x156))&&!_0x3932be['getCurrentUser']()[_0x2b9988(0x172)](_0x2b9988(0x153)))throw new Error(_0x2b9988(0x154));const _0x388058=await fetch(''+API_BASE);if(!_0x388058['ok'])throw new Error('API\x20Error:\x20'+_0x388058[_0x2b9988(0x177)]);return await _0x388058[_0x2b9988(0x167)]();}),_0x3932be[_0x369e4d(0x15f)]['onRequest'](_0x369e4d(0x157),async _0x55263f=>{const _0x305d04=_0x369e4d;if(!_0x3932be[_0x305d04(0x16d)]()['hasPermission']('ADMIN')&&!_0x3932be[_0x305d04(0x16d)]()[_0x305d04(0x172)](_0x305d04(0x156))&&!_0x3932be[_0x305d04(0x16d)]()[_0x305d04(0x172)](_0x305d04(0x153)))throw new Error(_0x305d04(0x154));const _0x4408e0=await fetch(API_BASE+'/search',{'method':_0x305d04(0x166),'headers':{'Content-Type':_0x305d04(0x16b)},'body':JSON[_0x305d04(0x15a)](_0x55263f)});if(!_0x4408e0['ok'])throw new Error('API\x20Error:\x20'+_0x4408e0['statusText']);return await _0x4408e0[_0x305d04(0x167)]();}),_0x3932be['events'][_0x369e4d(0x16f)](_0x369e4d(0x164),async _0x4b8af6=>{const _0x152de6=_0x369e4d;if(!_0x3932be[_0x152de6(0x16d)]()['hasPermission']('ADMIN')&&!_0x3932be['getCurrentUser']()[_0x152de6(0x172)](_0x152de6(0x156))&&!_0x3932be[_0x152de6(0x16d)]()[_0x152de6(0x172)](_0x152de6(0x173)))throw new Error(_0x152de6(0x15e));const {where:_0x1660ab,..._0x175afe}=_0x4b8af6,_0x1dd986=await fetch(API_BASE+'/'+_0x1660ab['id'],{'method':_0x152de6(0x15d),'headers':{'Content-Type':_0x152de6(0x16b)},'body':JSON[_0x152de6(0x15a)](_0x175afe)});if(!_0x1dd986['ok'])throw new Error(_0x152de6(0x160)+_0x1dd986[_0x152de6(0x177)]);return await _0x1dd986[_0x152de6(0x167)]();}),_0x3932be[_0x369e4d(0x15f)]['on'](_0x369e4d(0x15c),async({id:_0x3f0636})=>{const _0x2f6f42=_0x369e4d;if(!_0x3932be[_0x2f6f42(0x16d)]()[_0x2f6f42(0x172)](_0x2f6f42(0x171))&&!_0x3932be[_0x2f6f42(0x16d)]()[_0x2f6f42(0x172)](_0x2f6f42(0x156))&&!_0x3932be[_0x2f6f42(0x16d)]()[_0x2f6f42(0x172)]('RECEPTION_DELETED'))throw new Error(_0x2f6f42(0x169));const _0x3da132=await fetch(API_BASE+'/'+_0x3f0636,{'method':_0x2f6f42(0x174)});if(!_0x3da132['ok']&&_0x3da132[_0x2f6f42(0x176)]!==0xcc)throw new Error(_0x2f6f42(0x160)+_0x3da132['statusText']);});}
|