@e-techsolutions/e-baas-sdk 1.1.7 → 1.1.9

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/README.md CHANGED
@@ -58,7 +58,7 @@ const { data, error } = await query.execute();
58
58
  if (error) {
59
59
  console.error("Error fetching users:", error);
60
60
  } else {
61
- console.log("Users found:", users.length);
61
+ console.log("Users found:", data.length);
62
62
  }
63
63
  ```
64
64
 
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';(function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x496b29(_0x544a00,_0x5b4dcd){return _0xe923(_0x5b4dcd-0x18,_0x544a00);}while(!![]){try{const _0x88f5ff=-parseInt(_0x496b29(0x2cf,0x266))/0x1+parseInt(_0x496b29(0x262,0x240))/0x2+parseInt(_0x496b29(0x274,0x260))/0x3*(parseInt(_0x496b29(0x1a7,0x1ed))/0x4)+-parseInt(_0x496b29(0x258,0x1fb))/0x5*(-parseInt(_0x496b29(0x2a1,0x21c))/0x6)+parseInt(_0x496b29(0x28e,0x25c))/0x7+-parseInt(_0x496b29(0x21a,0x239))/0x8*(-parseInt(_0x496b29(0x227,0x263))/0x9)+-parseInt(_0x496b29(0x2d1,0x27c))/0xa*(parseInt(_0x496b29(0x1bb,0x1bd))/0xb);if(_0x88f5ff===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x4273a5){stringArray['push'](stringArray['shift']());}}}(_0x2a45,0x19f41));function _0x2a45(){const _0x2f2c53=['Cg9ZDgDYzxnqB3j0','zMLSzq','mta4mZaXturIuevm','zxjYB3jLza','B2zM','qxv0AenSAwvUDa','rMfPBgvKihrVigDLDcbIDwnRzxq','zw50CNLWB2LUDa','ChjVzhvJDa','BgLZDa','BgLZDej1y2TLDhm','BgvUz3rO','Bwv0Ag9K','B25Jzq','C3rHDgu','CNbJ','BgvHDMLUzW','yxnJzw5KAw5N','zxzLBNq','y3jLzgvUDgLHBhm','AxnezwXLDgu','yNvJA2v0swq','CgvYAw9K','zgvSzxrLqNvJA2v0','mZbnA1vYwhi','CMvJB25Uzwn0qxr0zw1WDhm','rMfPBgvKihrVihjLBw92zsbMAwXLCW','zgvMyxvSDhm','y29Kzq','BwfRzvjLzG','Cgf0y2G','p29WzxjHDgLVBJ1KzwXLDgu','x2DLDfnVy2TLDa','y2fWDhvYzvn0ywnRvhjHy2u','AgvHCNrIzwf0sw50zxj2ywW','CMvMCMvZAf90B2TLBG','y3vYCMvUDfnLC3nPB24','B2zMC2v0','C2vZC2LVBG','BwfW','zgv0zwn0q3vZDg9Trgf0ywjHC2u','CMvJB25Uzwn0sw50zxj2ywW','CMvZB2X1DgLVBJ1TzxjNzs1KDxbSAwnHDgvZlhjLDhvYBJ1YzxbYzxnLBNrHDgLVBG','z2v0vxnLCG','Ahr0CenSAwvUDa','C2LNBLvW','zM9YrwfJAa','zgvWBg95','CMvHBhrPBwu','zgf0ywjHC2u','DMvYAwz5','x3rYAwDNzxi','p3vWC2vYDd10CNvL','B3jKzxi','lMfZyW','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','uMvHBhrPBwvdAgfUBMvS','Dg9WAwm','C2v0','B25bDxrOu3rHDgvdAgfUz2u','y29TBw9U','z2v0u3rHDgu','l2zPBgvZ','shr0CenSAwvUDa','rMfPBgvKihrVignYzwf0zsbIDwnRzxq','l2z1BMn0Aw9UCY92ms8','zxjYB3i','rMfPBgvKihrVigXPC3qGzNvUy3rPB25Z','C29JA2v0qwrHChrLCG','l2LUzM8','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','y29UBMvJDa','C3rVCMfNzq','Aw1WB3j0twfW','rNvUy3rPB24GAw52B2nHDgLVBIbMywLSzwq','ChjLzMvY','vw5RBM93BIbLCNjVCG','BhrL','z2XVyMfS','Aw5PDgLHBgL6zq','yNvJA2v0','AgfUzgXLqxv0AevYCM9Y','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','l3nKAY92ms8','zgf0yq','AgvHCNrIzwf0','B25qB3n0z3jLC0nOyw5Nzxm','zxzLBNrZ','l2XVz3m','l2f1DgGVDJeVC2rRl3nPz25PBG','l2zPBgvZl21VDMu','y29UDgvUDfr5Cgu','DgvZDenVBM5Ly3rPB24','Aw52B2TL','yxbPs2v5','D29YA3nWywnLswq','DMfSDwvZ','DMfSDwu','C29JA2v0lMLVlwnSAwvUDa','y3jLyxrLqNvJA2v0','Bwv0ywrHDge','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSig5LC3rLigfTyMLLBNrLlIbqyxjHihvZyxiGzNvUy2LVBMfSAwrHzgvZigrLihjLywX0Aw1LlcbPBNn0ywXLoIbUCg0GAw5ZDgfSBcbZB2nRzxqUAw8Ty2XPzw50','z2v0q2HHBM5LBhm','rMfPBgvKihrVignVBM5Ly3qGywz0zxiG','AM9PBMLUzW','zgf0yufYCMf5','Bg9N','y29UBMvJDgLVBLn0yxrL','uMvXDwvZDcbMywLSzwq','zxHLy3v0zvf1zxj5','y29UzMLN','C3rHDhvZvgv4Da','nda0nZy3r1n2DNLb','DxnL','zNjVBq','Dw5KzwzPBMvK','BwvZC2fNzq','C2LUz2XL','B3bLCMf0B3i','AgvHzgvYCW','B3b0Aw9UCW','l2zPBgvZlW','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','Dgv4Dc9WBgfPBG','C3rYAw5N','Dg9vChbLCKnHC2u','ChvIBgLJ','u1vcu0nssujfra','q3vZDg9Trgf0ywjHC2vnyw5Hz2vY','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','l3n0B3jHz2uVyNvJA2v0CY8','CMvTB3zLq3vZDg9Trgf0ywjHC2u','u3rVCMfNzunSAwvUDa','l2f1DgGVDJeVDxnLCG','zMLSDgvYCW','AM9PBMvKt25Jzq','AgfUzgXLrxjYB3i','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','DxbSB2fK','C3vIC2nYAxb0Aw9UCW','DxnLCG','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbTzxrYAwnZ','C2vHCMnO','Bg9HzfnLC3nPB24','l2zPBgvZl2nVChK','zxHLy3v0zq','DgfIBgu','AxndB25Uzwn0zwq','z2v0','BMvX','AM9PBMvK','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','AM9PBG','DxbKyxrLvxnLCG','zgLZy29UBMvJDa','icHtDgf0Dxm6ia','Dg9tDhjPBMC','uMvHy3royxrPDMu','y2XLyxi','l2f1DgGVDJeVCMvMCMvZAa','mZyYmZz5EuHYB0W','BM9Kzq','BgvHDMu','CMvHy3qTBMf0AxzL','DxbZzxj0','A2v5CW','C2v0qxv0AfrVA2vU','C2v0DxbizwfYDgjLyxq','zgv0zwn0zwrdB25MAwC','CMvTB3zLqwXStgLZDgvUzxjZ','y29UBMvJDgvK','CMvTB3zLtgLZDgvUzxi','zw52','C2L6zq','ndmYodvQrwLjyxe','x2PVAw4','Cg9ZDgDYzxnFy2HHBMDLCW','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbSB2DZ','rMfPBgvKihrVihrLC3qGy29UBMvJDgLVBG','y29UBMvJDf9LCNjVCG','Chv0','C3vIC2nYAwjL','Bgv2zwW','Cg9ZDgDYzxnFy2HHBMDLCZO','AgfZ','x3nLDfn0yxrL','C3vIC3rYAw5N','C2v0u2vZC2LVBKLUDgvYBMfS','zgLZy29UBMvJDgvK','DxjS','DxbKyxrLqNvJA2v0','Cg9ZDgDYzxneyxrHyMfZzq','y2XVC2vK','rujHyvndBgLLBNq','C29YDej5','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','ms4WlJa','C2v0u2vZC2LVBG','rMfPBgvKihrVihvWzgf0zsbMDw5JDgLVBIbLBNzPCM9UBwvUDa','Ec10B3rHBc1JB3vUDa','C3bSAxq','z2v0rgv0zwn0zwrdB25MAwC','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','zw1PDa','C29JA2v0','y29SDw1U','C29JA2v0t3b0Aw9UCW','nNrMtK1xAa','z2v0twf4tgLZDgvUzxjZ','CMvZB2X2zq','y2XPzw50','yNjVywrJyxn0oG','CMv0DxjUpxjLChjLC2vUDgf0Aw9U','y2fJAgvdB250CM9S','C2v0DxbjBNrLCMnLChrVCNm','ChjLC2vUy2u','B3bLCMf0Aw9U','zgv0ywLSCW','C3rYAw5NAwz5','AgfZq3vZDg9Trgf0ywjHC2u','ChjLC2vUy2u6','BgLTAxq','yM9KEq','zgvSzxrL','D2fYBG','sfruucbYzxf1zxn0igzHAwXLza','CMvTB3zLqwXSq2HHBM5LBhm','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','y2HHBM5LBhm','C3rHDhvZ','yNjVD3nLCG','C2nOzw1H','C2vSzwn0','l2rLCgXVEq','Dg9ku09o','y3vYCMvUDfnJAgvTyq','mZa1ndrhrNzdBhu','z2v0v29YA3nWywnLswq','ChjLCgvUzeXPC3rLBMvY','BMfTzq','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','y2HHBM5LBa','rMfPBgvKihrVihvWBg9HzcbMAwXL','mtaWnZa2D2n3qMf0','CMvXDwvZDa','CMvTB3zL','ywrK','x3jLAM9PBG','y2XLyxjtzxnZAw9U','DxbKyxrLrgf0yq','l21LDhjPy3m','BgLRzq','CMvQzwn0','DxbKyxrLt3b0Aw9UCW','C29JA2v0lMLVlwnSAwvUDcbUB3qGyxzHAwXHyMXL','DxbKyxrLrMLSzu1LDgfKyxrH','y29UDgfPBNm','DhjHy2S','uhjLzMvY','rMfPBgvKihrVigXPC3qGzMLSzxm','Dw5ZDwjZy3jPyMu','z2v0u3rHDhvZ','CMf3tgLZDgvUzxjZ','yNjVywrJyxn0','C2v0v29YA3nWywnLswq','BgLZDgvUzxjZ','yxbWzw5K','ChvZAa','yMfZzvvsta','CxvLCNK','Bwf4tgLZDgvUzxjZ','nJG5nJeYv0HNB2z6','DxbKyxrL','Aw5Zzxj0','z2v0u2vZC2LVBG','mtvmDuv5Dgq','CMvZCg9UC2u','Cg9ZDa','mJG4uLjStgf6'];_0x2a45=function(){return _0x2f2c53;};return _0x2a45();}var axios=require('axios');class EBaaSError extends Error{constructor(_0x290047,status=0x0,_0xec9896){super(_0x290047),this['name']='EBaaSError',this['status']=status,this['details']=_0xec9896;function _0x4065cd(_0x48c799,_0x119176){return _0xe923(_0x119176- -0x1c7,_0x48c799);}Error['captureStackTrace']&&Error[_0x4065cd(0x118,0xa6)](this,EBaaSError);}[_0x36b514(0x34b,0x372)](){function _0x47f223(_0x231596,_0x345508){return _0xe923(_0x345508-0x3da,_0x231596);}return{'name':this[_0x47f223(0x64f,0x5fe)],'message':this['message'],'status':this['status'],'details':this[_0x47f223(0x56b,0x5e8)],'stack':this['stack']};}['toString'](){function _0x294ed1(_0xca613d,_0x2cabcc){return _0xe923(_0xca613d-0x33e,_0x2cabcc);}return this['name']+':\x20'+this[_0x294ed1(0x4e7,0x4ac)]+_0x294ed1(0x50e,0x56c)+this['status']+')';}}class HttpClient{constructor(config){this[_0x416a33(-0x177,-0x125)]=config[_0x416a33(-0x1c6,-0x227)];function _0x416a33(_0x44cff6,_0x2ed0cc){return _0xe923(_0x44cff6- -0x3b8,_0x2ed0cc);}this['apiKey']=config['apiKey'],this['client']=axios['create']({'baseURL':this[_0x416a33(-0x177,-0x1f7)],'timeout':config['timeout']||0x2710,'headers':{'Content-Type':'application/json','apikey':this['apiKey'],...config['headers']}}),this['setupInterceptors']();}[_0x36b514(0x337,0x3a3)](){function _0xcb5fa(_0x237854,_0x19d8a6){return _0xe923(_0x19d8a6-0x228,_0x237854);}this['client']['interceptors'][_0xcb5fa(0x416,0x451)]['use'](config=>{return config;},_0x355414=>{function _0x1e037e(_0x2782d7,_0x1d2dcc){return _0xe923(_0x2782d7- -0x342,_0x1d2dcc);}return Promise[_0x1e037e(-0x111,-0x11d)](new EBaaSError(_0x1e037e(-0x1a1,-0x148),0x0,_0x355414));}),this[_0xcb5fa(0x3f2,0x42f)]['interceptors']['response'][_0xcb5fa(0x38c,0x3ce)](response=>{return response;},_0x169c1b=>{const status=_0x169c1b['response']?.['status']||0x0,_0x2977ba=_0x169c1b[_0x263f43(-0xcb,-0x138)]?.[_0x263f43(-0x18b,-0x1d1)]?.['message']||_0x169c1b[_0x263f43(-0x16b,-0xe1)]||_0x263f43(-0x7c,-0xc2),_0xab59a6=_0x169c1b[_0x263f43(-0xcb,-0x134)]?.['data']||_0x169c1b;function _0x263f43(_0x52e7ed,_0x511e57){return _0xe923(_0x52e7ed- -0x314,_0x511e57);}return Promise[_0x263f43(-0xe3,-0x109)](new EBaaSError(_0x2977ba,status,_0xab59a6));});}async[_0x36b514(0x2f5,0x26b)](_0x521466,config){function _0x1b22b5(_0x5d90fd,_0x22d53f){return _0xe923(_0x5d90fd- -0x343,_0x22d53f);}try{const response=await this['client'][_0x1b22b5(-0x17a,-0x1d2)](_0x521466,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x1b22b5(-0x19f,-0x134)],'headers':response[_0x1b22b5(-0x197,-0x13c)]};}catch(_0x38a619){throw this[_0x1b22b5(-0x186,-0x1cd)](_0x38a619);}}async['post'](_0xb51031,data,config){function _0x7af927(_0x5a0a0f,_0x57a54d){return _0xe923(_0x57a54d-0x283,_0x5a0a0f);}try{const response=await this[_0x7af927(0x4a9,0x48a)]['post'](_0xb51031,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response[_0x7af927(0x44a,0x42f)]};}catch(_0x5a5170){throw this['handleError'](_0x5a5170);}}async[_0x36b514(0x315,0x333)](_0x42a582,data,config){function _0x1e7c16(_0x46a5d5,_0x2124cd){return _0xe923(_0x46a5d5- -0x102,_0x2124cd);}try{const response=await this[_0x1e7c16(0x105,0x12c)][_0x1e7c16(0xe7,0xfa)](_0x42a582,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x234d95){throw this[_0x1e7c16(0xbb,0x117)](_0x234d95);}}async['patch'](_0x1cc8e8,data,config){function _0xb09ae6(_0x241832,_0x30a9ac){return _0xe923(_0x241832-0x3b6,_0x30a9ac);}try{const response=await this[_0xb09ae6(0x5bd,0x5e4)][_0xb09ae6(0x620,0x60e)](_0x1cc8e8,data,config);return{'data':response[_0xb09ae6(0x53f,0x525)],'status':response[_0xb09ae6(0x5d0,0x56b)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x14f2c7){throw this['handleError'](_0x14f2c7);}}async['delete'](_0x1c017b,config){function _0x30088d(_0x4ecd85,_0x1b338d){return _0xe923(_0x4ecd85-0x116,_0x1b338d);}try{const response=await this['client'][_0x30088d(0x32a,0x300)](_0x1c017b,config);return{'data':response[_0x30088d(0x29f,0x306)],'status':response[_0x30088d(0x330,0x3a4)],'statusText':response[_0x30088d(0x2ba,0x319)],'headers':response['headers']};}catch(_0x1d09ca){throw this['handleError'](_0x1d09ca);}}['setAuthToken'](_0x8c6dda){function _0x29c43a(_0x363d49,_0x3faf27){return _0xe923(_0x363d49-0x239,_0x3faf27);}this[_0x29c43a(0x440,0x3d5)][_0x29c43a(0x4a0,0x44e)]['headers']['common']['Authorization']='Bearer\x20'+_0x8c6dda;}['removeAuthToken'](){delete this[_0x5a5c52(0x3e9,0x36e)][_0x5a5c52(0x449,0x3e1)]['headers'][_0x5a5c52(0x46a,0x474)]['Authorization'];function _0x5a5c52(_0x206f98,_0x3b4650){return _0xe923(_0x206f98-0x1e2,_0x3b4650);}this['client']['defaults']['headers'][_0x5a5c52(0x46a,0x429)]['Authorization']='Bearer\x20'+this['apiKey'];}[_0x36b514(0x2e9,0x331)](_0x3f25de){function _0x180671(_0x5c01ee,_0x1154af){return _0xe923(_0x1154af-0x88,_0x5c01ee);}if(_0x3f25de instanceof EBaaSError)return _0x3f25de;return new EBaaSError(_0x3f25de[_0x180671(0x2b8,0x231)]||_0x180671(0x256,0x29e),_0x3f25de[_0x180671(0x324,0x2a2)]||0x0,_0x3f25de);}}class AuthClient{constructor(_0x22c1c2,_0x5100f1){this['currentSession']=null,this['httpClient']=_0x22c1c2,this[_0x1e6913(-0x96,-0xab)]=_0x5100f1;function _0x1e6913(_0x3ab32f,_0x129279){return _0xe923(_0x129279- -0x23f,_0x3ab32f);}this[_0x1e6913(0x10,-0x7b)]();}async[_0x36b514(0x3a5,0x3e2)](data){function _0x13d11b(_0xfc9fcf,_0x131021){return _0xe923(_0xfc9fcf-0x21d,_0x131021);}try{const response=await this[_0x13d11b(0x495,0x4bb)][_0x13d11b(0x467,0x4bc)]('/auth/v1/signup',data);return response['data']['session']&&this['setSessionInternal'](response['data']['session']),response['data'];}catch(_0x4b5b7d){throw this[_0x13d11b(0x4ba,0x52e)](_0x4b5b7d);}}async['signIn'](data){function _0x280301(_0x3e4908,_0x3bb55f){return _0xe923(_0x3bb55f-0x139,_0x3e4908);}try{const headers={};this[_0x280301(0x24c,0x2cd)]&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this['httpClient'][_0x280301(0x31e,0x383)](_0x280301(0x31c,0x2c7),data,{'headers':headers});return response[_0x280301(0x2d5,0x2c2)][_0x280301(0x42c,0x3ab)]&&this[_0x280301(0x321,0x329)](response[_0x280301(0x28b,0x2c2)][_0x280301(0x3c2,0x3ab)]),response['data'];}catch(_0x55a0f1){throw this['handleAuthError'](_0x55a0f1);}}async['signOut'](){function _0x2a88f9(_0x440461,_0x3818bf){return _0xe923(_0x3818bf-0x1ba,_0x440461);}try{await this['httpClient'][_0x2a88f9(0x3d9,0x404)]('/auth/v1/signout'),this['clearSession']();}catch(_0x27e542){this[_0x2a88f9(0x38a,0x3e7)]();throw this['handleAuthError'](_0x27e542);}}async[_0x36b514(0x3a3,0x3e6)](){function _0x1c8430(_0x20c724,_0xe8b3ca){return _0xe923(_0x20c724-0x3a,_0xe8b3ca);}if(!this[_0x1c8430(0x2aa,0x23b)]?.['access_token'])return null;try{const response=await this['httpClient']['get'](_0x1c8430(0x1f4,0x183));return response[_0x1c8430(0x1c3,0x1fc)][_0x1c8430(0x1fb,0x24e)];}catch(_0x38d117){if(_0x38d117 instanceof EBaaSError&&_0x38d117['status']===0x191)return this['clearSession'](),null;throw this[_0x1c8430(0x2d7,0x32f)](_0x38d117);}}async['refreshSession'](){if(!this['currentSession']?.[_0xdf463c(0x3f7,0x438)])return null;function _0xdf463c(_0xb3c42a,_0x2b2bcf){return _0xe923(_0x2b2bcf-0x1c9,_0xb3c42a);}try{const response=await this['httpClient'][_0xdf463c(0x398,0x413)](_0xdf463c(0x370,0x39d),{'refresh_token':this['currentSession'][_0xdf463c(0x4b0,0x438)]});if(response[_0xdf463c(0x36e,0x352)][_0xdf463c(0x426,0x43b)])return this['setSession'](response['data'][_0xdf463c(0x3e9,0x43b)]),response['data']['session'];return null;}catch(_0x267050){this[_0xdf463c(0x454,0x3f6)]();throw this[_0xdf463c(0x4d1,0x466)](_0x267050);}}async['resetPassword'](_0x1ad7ac){function _0x2464b8(_0x2b8254,_0x280a75){return _0xe923(_0x2b8254-0x2bb,_0x280a75);}try{await this[_0x2464b8(0x533,0x508)]['post']('/auth/v1/reset-password',{'email':_0x1ad7ac});}catch(_0x14c42c){throw this[_0x2464b8(0x558,0x5c3)](_0x14c42c);}}async[_0x36b514(0x2fa,0x2b6)](data){function _0x2e3116(_0x16b807,_0x2e626c){return _0xe923(_0x16b807- -0x289,_0x2e626c);}try{const response=await this['httpClient']['put']('/auth/v1/user',data);return response[_0x2e3116(-0x100,-0x7b)][_0x2e3116(-0xc8,-0x65)];}catch(_0xdfd56c){throw this['handleAuthError'](_0xdfd56c);}}[_0x36b514(0x373,0x340)](){function _0x1973ec(_0x261488,_0x399df7){return _0xe923(_0x261488-0x309,_0x399df7);}return this[_0x1973ec(0x579,0x569)];}[_0x36b514(0x326,0x2fc)](_0x2f57c3){this[_0x5acf4a(0x573,0x4fb)]=_0x2f57c3;function _0x5acf4a(_0x4d4696,_0x173a76){return _0xe923(_0x4d4696-0x303,_0x173a76);}this['httpClient'][_0x5acf4a(0x4de,0x563)](_0x2f57c3['access_token']),typeof localStorage!=='undefined'&&localStorage['setItem']('ebaas.auth.session',JSON['stringify'](_0x2f57c3));}[_0x36b514(0x3b3,0x40c)](_0x5cf30b){return()=>{};}[_0x36b514(0x369,0x306)](_0x4822ce){function _0x3bc1d3(_0x2293e5,_0x512a01){return _0xe923(_0x2293e5- -0x284,_0x512a01);}this[_0x3bc1d3(-0xf0,-0x145)]=_0x4822ce;}['setSessionInternal'](_0x1ede4b){function _0x342b15(_0x5262e9,_0x18a87c){return _0xe923(_0x5262e9- -0x15e,_0x18a87c);}this['currentSession']=_0x1ede4b,this['httpClient'][_0x342b15(0x7d,0x9c)](_0x1ede4b['access_token']),typeof localStorage!=='undefined'&&localStorage['setItem']('ebaas.auth.session',JSON[_0x342b15(0xb1,0x118)](_0x1ede4b));}['clearSession'](){function _0x4ce73f(_0x167cd2,_0x441f8c){return _0xe923(_0x441f8c-0x91,_0x167cd2);}this[_0x4ce73f(0x35b,0x301)]=null,this['httpClient']['removeAuthToken'](),typeof localStorage!=='undefined'&&localStorage['removeItem']('ebaas.auth.session');}['loadSession'](){function _0x4b4d43(_0x162a53,_0x3db5f9){return _0xe923(_0x3db5f9- -0x116,_0x162a53);}if(typeof localStorage!=='undefined'){const _0x2e0804=localStorage['getItem']('ebaas.auth.session');if(_0x2e0804)try{const _0x2651db=JSON['parse'](_0x2e0804);this[_0x4b4d43(0xb9,0xda)](_0x2651db);}catch(_0x4c2ccf){this[_0x4b4d43(0xdc,0x117)]();}}}[_0x36b514(0x3c9,0x3f3)](_0x626c90){if(_0x626c90 instanceof EBaaSError)return _0x626c90;function _0x59d1df(_0x812348,_0x2db34f){return _0xe923(_0x812348- -0xc0,_0x2db34f);}return new EBaaSError(_0x626c90['message']||'Authentication\x20failed',_0x626c90[_0x59d1df(0x15a,0x1cf)]||0x0,_0x626c90);}}class QueryBuilder{constructor(_0x14d125,_0xcc275e,_0x1b555c,_0x376e54){this[_0x35ad3b(0x30f,0x379)]=_0x14d125,this['table']=_0xcc275e,this[_0x35ad3b(0x2e5,0x31d)]=_0x1b555c;function _0x35ad3b(_0x106890,_0x559230){return _0xe923(_0x559230-0x101,_0x106890);}this[_0x35ad3b(0x26f,0x295)]=_0x376e54,this['query']={'filters':[]};}[_0x36b514(0x349,0x2fc)](_0x5cf9fd='*',_0x1c3d82){this['query'][_0x5b5de2(0x196,0x162)]=_0x5cf9fd;function _0x5b5de2(_0x1f09fe,_0xae4080){return _0xe923(_0xae4080- -0xbb,_0x1f09fe);}return this;}[_0x36b514(0x372,0x317)](data,_0x4ad0e4){function _0x266643(_0x302c9c,_0x2795e7){return _0xe923(_0x2795e7-0x374,_0x302c9c);}return this['executeQuery']('POST',_0x266643(0x4a4,0x4fc)+this[_0x266643(0x4cd,0x53b)]+'?operation=insert',{'data':data,'options':_0x4ad0e4});}[_0x36b514(0x371,0x35f)](data,_0x456cde){this['query'][_0x7d5247(0x2ad,0x2d0)]=data,this[_0x7d5247(0x2c1,0x2b7)][_0x7d5247(0x2b1,0x2a4)]=_0x456cde;function _0x7d5247(_0x128dad,_0x59e2d0){return _0xe923(_0x128dad-0x7f,_0x59e2d0);}return this;}[_0x36b514(0x305,0x335)](data,_0x18731c){function _0x50ca4e(_0x4a4443,_0x2361e2){return _0xe923(_0x4a4443-0x2ab,_0x2361e2);}return this[_0x50ca4e(0x44d,0x3cf)]('POST',_0x50ca4e(0x433,0x3fb)+this['table']+'?operation=upsert',{'data':data,'options':{..._0x18731c,'upsert':!![]}});}['delete'](_0x40a09a){return this['query']['deleteOptions']=_0x40a09a,this['query']['isDelete']=!![],this;}['eq'](_0x52f6e2,_0x41b997){function _0x27ce0f(_0x24a709,_0x47234e){return _0xe923(_0x47234e-0x22d,_0x24a709);}return this['query']['filters'][_0x27ce0f(0x4b8,0x46d)]({'column':_0x52f6e2,'operator':'eq','value':_0x41b997}),this;}[_0x36b514(0x2f6,0x364)](_0x2139cd,_0x5a4f3a){function _0x23e696(_0x2f64cb,_0x5e437a){return _0xe923(_0x2f64cb- -0x303,_0x5e437a);}return this[_0x23e696(-0xc1,-0x116)][_0x23e696(-0x148,-0xe8)][_0x23e696(-0xc3,-0xd3)]({'column':_0x2139cd,'operator':_0x23e696(-0x139,-0x101),'value':_0x5a4f3a}),this;}['gt'](_0x5f1a41,_0x2a2c80){this[_0xd5f793(0x5d9,0x603)][_0xd5f793(0x56a,0x57c)]['push']({'column':_0x5f1a41,'operator':'gt','value':_0x2a2c80});function _0xd5f793(_0x3034ee,_0x562dde){return _0xe923(_0x562dde-0x3c1,_0x3034ee);}return this;}['gte'](_0x3edf20,_0x3b917f){function _0x53c02b(_0x25b1ee,_0x182ed8){return _0xe923(_0x25b1ee-0x253,_0x182ed8);}return this[_0x53c02b(0x495,0x4cf)][_0x53c02b(0x40e,0x483)][_0x53c02b(0x493,0x480)]({'column':_0x3edf20,'operator':'gte','value':_0x3b917f}),this;}['lt'](_0x1f86d6,_0x3b32d3){function _0x57265e(_0x20140d,_0x3a7cea){return _0xe923(_0x3a7cea- -0x39c,_0x20140d);}return this[_0x57265e(-0xf6,-0x15a)]['filters']['push']({'column':_0x1f86d6,'operator':'lt','value':_0x3b32d3}),this;}[_0x36b514(0x3c5,0x3a4)](_0x3a2101,_0x18cf31){function _0x36af83(_0x214426,_0x4cf88f){return _0xe923(_0x4cf88f-0x28d,_0x214426);}return this[_0x36af83(0x46e,0x4cf)]['filters'][_0x36af83(0x4aa,0x4cd)]({'column':_0x3a2101,'operator':_0x36af83(0x57a,0x526),'value':_0x18cf31}),this;}['like'](_0x5a8107,_0x3d3d8e){function _0x4ff736(_0x355121,_0x2139c6){return _0xe923(_0x355121- -0x62,_0x2139c6);}return this[_0x4ff736(0x1e0,0x1c1)]['filters']['push']({'column':_0x5a8107,'operator':_0x4ff736(0x1ce,0x155),'value':_0x3d3d8e}),this;}['ilike'](_0x416975,_0xb4c6cd){function _0x317943(_0x11eeab,_0x4453e4){return _0xe923(_0x11eeab- -0x160,_0x4453e4);}return this['query'][_0x317943(0x5b,-0x2c)]['push']({'column':_0x416975,'operator':'ilike','value':_0xb4c6cd}),this;}['is'](_0x42ca7c,_0x28b37e){function _0x56047e(_0x132b08,_0x27224d){return _0xe923(_0x132b08-0x1ce,_0x27224d);}return this['query'][_0x56047e(0x389,0x3ee)][_0x56047e(0x40e,0x479)]({'column':_0x42ca7c,'operator':'is','value':_0x28b37e}),this;}['in'](_0x2c79e5,_0x2e5926){this[_0x167e81(0x4b3,0x4cf)][_0x167e81(0x446,0x448)]['push']({'column':_0x2c79e5,'operator':'in','value':_0x2e5926});function _0x167e81(_0x4b875e,_0xabe877){return _0xe923(_0xabe877-0x28d,_0x4b875e);}return this;}[_0x36b514(0x361,0x372)](_0x1627c9,_0x50ea2b){function _0x660627(_0x49485e,_0x3bb539){return _0xe923(_0x49485e-0xdb,_0x3bb539);}return this['query'][_0x660627(0x296,0x275)]['push']({'column':_0x1627c9,'operator':_0x660627(0x310,0x36c),'value':_0x50ea2b}),this;}['match'](_0x30f715){function _0x5f53a9(_0x289bbe,_0x368ee4){return _0xe923(_0x289bbe- -0x145,_0x368ee4);}return Object['entries'](_0x30f715)[_0x5f53a9(0x135,0x16a)](([_0x183dac,_0xe2b0b9])=>{this['eq'](_0x183dac,_0xe2b0b9);}),this;}[_0x36b514(0x3ad,0x3ab)](_0x4f9daf,_0x5a6fc5){!this['query'][_0x5e4d8a(0x64e,0x629)]&&(this['query']['order']=[]);this[_0x5e4d8a(0x60f,0x681)][_0x5e4d8a(0x64e,0x5d6)][_0x5e4d8a(0x60d,0x68e)]({'column':_0x4f9daf,'ascending':_0x5a6fc5?.['ascending']!==![]});function _0x5e4d8a(_0xbcc470,_0x2bb343){return _0xe923(_0xbcc470-0x3cd,_0x2bb343);}return this;}[_0x36b514(0x33e,0x36c)](count){this[_0x47bd48(0x20,-0x55)][_0x47bd48(-0x70,-0x85)]=count;function _0x47bd48(_0x2cbe90,_0x407b28){return _0xe923(_0x407b28- -0x297,_0x2cbe90);}return this;}['range'](from,_0x3b86da){return this['query']['range']={'from':from,'to':_0x3b86da},this;}async[_0x36b514(0x2f2,0x2b3)](){function _0x15f9e9(_0x339fca,_0x1e9f1d){return _0xe923(_0x339fca-0x1b2,_0x1e9f1d);}if(this['query']['updateData'])return this['executeQuery']('PATCH','/sdk/v1/'+this['table'],{'data':this['query']['updateData'],'options':this[_0x15f9e9(0x3f4,0x434)][_0x15f9e9(0x3e4,0x36a)],'filters':this['query']['filters']});else return this[_0x15f9e9(0x3f4,0x42f)][_0x15f9e9(0x412,0x49c)]?this['executeQuery']('DELETE',_0x15f9e9(0x33a,0x2eb)+this['table']+_0x15f9e9(0x41d,0x48a),{'options':this[_0x15f9e9(0x3f4,0x46a)]['deleteOptions'],'filters':this['query'][_0x15f9e9(0x36d,0x32c)]}):this[_0x15f9e9(0x354,0x365)]('GET',_0x15f9e9(0x33a,0x398)+this['table']+'?operation=select',{'select':this['query'][_0x15f9e9(0x3cf,0x372)],'filters':this['query']['filters'],'order':this['query']['order'],'limit':this[_0x15f9e9(0x3f4,0x395)][_0x15f9e9(0x3c4,0x44a)],'range':this['query']['range']});}async[_0x36b514(0x2d6,0x2e9)](){this['limit'](0x1);const result=await this['execute']();function _0x49a730(_0x14f1ac,_0x256420){return _0xe923(_0x14f1ac-0x88,_0x256420);}return{'data':result[_0x49a730(0x211,0x23f)]?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x124215,_0x17760b,_0x148558){function _0x1fac90(_0x59ae38,_0x492a98){return _0xe923(_0x492a98-0x1b0,_0x59ae38);}try{let response;const headers={};this[_0x1fac90(0x347,0x344)]&&(headers['x-workspace-id']=this['workspaceId']);if(_0x124215==='GET'){const _0xaffbd=_0x17760b[_0x1fac90(0x3dd,0x3ad)]('?'),_0x40b8af=_0xaffbd[0x0],existingParams=new URLSearchParams(_0xaffbd[0x1]||'');if(_0x148558[_0x1fac90(0x440,0x3cd)])existingParams[_0x1fac90(0x3e5,0x3ef)](_0x1fac90(0x456,0x3cd),_0x148558[_0x1fac90(0x3e2,0x3cd)]);_0x148558[_0x1fac90(0x333,0x36b)]?.['length']&&_0x148558[_0x1fac90(0x383,0x36b)]['forEach'](filter=>{function _0xd0623d(_0x264a40,_0x448951){return _0xe923(_0x264a40-0x2ab,_0x448951);}existingParams['append'](filter[_0xd0623d(0x4ad,0x4a5)],filter['operator']+'.'+filter['value']);});if(_0x148558[_0x1fac90(0x41a,0x431)]?.[_0x1fac90(0x42c,0x407)]){const orderStr=_0x148558['order'][_0x1fac90(0x475,0x423)](_0xd35d5a=>''+_0xd35d5a[_0x1fac90(0x416,0x3b2)]+(_0xd35d5a[_0x1fac90(0x418,0x40d)]?_0x1fac90(0x4ba,0x432):'.desc'))[_0x1fac90(0x319,0x37d)](',');existingParams[_0x1fac90(0x3e4,0x3ef)](_0x1fac90(0x435,0x431),orderStr);}if(_0x148558['limit'])existingParams['append']('limit',_0x148558['limit']['toString']());_0x148558['range']&&(existingParams[_0x1fac90(0x3de,0x3ef)](_0x1fac90(0x395,0x421),_0x148558['range']['from'][_0x1fac90(0x409,0x381)]()),existingParams['append'](_0x1fac90(0x42a,0x3c2),(_0x148558['range']['to']-_0x148558['range']['from']+0x1)['toString']())),response=await this['httpClient'][_0x1fac90(0x335,0x379)](_0x40b8af+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x124215==='DELETE'){const _0x252211=_0x17760b[_0x1fac90(0x428,0x3ad)]('?'),_0x4766b8=_0x252211[0x0],existingParams=new URLSearchParams(_0x252211[0x1]||'');!existingParams['has'](_0x1fac90(0x434,0x3bd))&&existingParams['append'](_0x1fac90(0x36a,0x3bd),'delete');_0x148558['filters']?.[_0x1fac90(0x454,0x407)]&&_0x148558[_0x1fac90(0x354,0x36b)][_0x1fac90(0x46f,0x42a)](filter=>{function _0x4bb101(_0xf67743,_0x1aa2e6){return _0xe923(_0x1aa2e6-0x339,_0xf67743);}existingParams[_0x4bb101(0x505,0x578)](filter['column'],filter[_0x4bb101(0x4de,0x4e4)]+'.'+filter[_0x4bb101(0x515,0x4cf)]);});const deleteUrl=_0x4766b8+'?'+existingParams['toString']();console[_0x1fac90(0x358,0x34f)]('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console['log']('\uD83D\uDD27 DELETE headers:',headers),console['log']('\uD83D\uDD27 DELETE filtros originais:',_0x148558[_0x1fac90(0x31e,0x36b)]),response=await this[_0x1fac90(0x3d0,0x428)][_0x1fac90(0x43d,0x3c4)](deleteUrl,{'headers':headers});}else{if(_0x124215==='PATCH'){const _0x4797cc=_0x17760b[_0x1fac90(0x42f,0x3ad)]('?'),_0x23ed8f=_0x4797cc[0x0],existingParams=new URLSearchParams(_0x4797cc[0x1]||'');!existingParams[_0x1fac90(0x420,0x39d)]('operation')&&existingParams['append'](_0x1fac90(0x431,0x3bd),_0x1fac90(0x429,0x3f5));_0x148558['filters']?.[_0x1fac90(0x479,0x407)]&&_0x148558[_0x1fac90(0x3c3,0x36b)]['forEach'](filter=>{function _0x5322c1(_0x3684bd,_0x32ef40){return _0xe923(_0x3684bd-0xe0,_0x32ef40);}existingParams[_0x5322c1(0x31f,0x2b4)](filter[_0x5322c1(0x2e2,0x31b)],filter[_0x5322c1(0x28b,0x2a8)]+'.'+filter[_0x5322c1(0x276,0x302)]);});_0x148558[_0x1fac90(0x3dc,0x35d)]?.[_0x1fac90(0x435,0x447)]&&(headers[_0x1fac90(0x445,0x3e7)]=_0x148558[_0x1fac90(0x32a,0x35d)]['prefer']);const updateUrl=_0x23ed8f+'?'+existingParams['toString']();response=await this[_0x1fac90(0x4af,0x428)][_0x1fac90(0x491,0x41a)](updateUrl,_0x148558[_0x1fac90(0x36a,0x339)],{'headers':headers});}else{let _0x2cb0e1=_0x148558['data'];!headers[_0x1fac90(0x3fc,0x3e7)]&&(headers['Prefer']=_0x1fac90(0x408,0x3b9)),_0x148558[_0x1fac90(0x36b,0x35d)]?.['upsert']&&(headers[_0x1fac90(0x42c,0x3e7)]=_0x1fac90(0x44e,0x426)),_0x148558[_0x1fac90(0x339,0x34e)]&&(_0x2cb0e1=_0x148558[_0x1fac90(0x2ce,0x34e)]),response=await this[_0x1fac90(0x3c0,0x428)]['post'](_0x17760b,_0x2cb0e1,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response['headers']?.[_0x1fac90(0x3f4,0x3ac)]?parseInt(response['headers'][_0x1fac90(0x3a3,0x3ac)]):undefined};}catch(_0x2dac9c){return{'data':null,'error':_0x2dac9c instanceof EBaaSError?_0x2dac9c:new EBaaSError(_0x2dac9c instanceof Error?_0x2dac9c[_0x1fac90(0x3d6,0x359)]:'Database\x20operation\x20failed',0x0,_0x2dac9c)};}}}class CustomDatabaseManager{constructor(_0xbb91f8,_0x2973e7){this['httpClient']=_0xbb91f8;function _0x2d4e07(_0x1954ee,_0x146a1d){return _0xe923(_0x1954ee-0x92,_0x146a1d);}this[_0x2d4e07(0x226,0x1f6)]=_0x2973e7;}async[_0x36b514(0x3a0,0x387)](){if(!this['workspaceId'])return{'hasCustomDatabase':![]};try{const response=await this[_0x4d6e99(0x485,0x442)][_0x4d6e99(0x3d6,0x3e7)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this[_0x4d6e99(0x3a1,0x3ec)]}});if(response['status']===0xc8&&response[_0x4d6e99(0x396,0x413)]?.[_0x4d6e99(0x3b0,0x390)]){const config=response['data'][_0x4d6e99(0x3b0,0x391)],_0xd7040c={'host':config['postgresHost'],'port':config[_0x4d6e99(0x459,0x48e)],'database':config[_0x4d6e99(0x401,0x439)],'username':config['postgresUsername'],'password':'','schema':config['postgresSchema'],'sslEnabled':config['sslEnabled']};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0xd7040c},this[_0x4d6e99(0x3ea,0x39a)];}}catch(_0x4eaa73){if(_0x4eaa73?.[_0x4d6e99(0x427,0x40e)]===0x194)return this[_0x4d6e99(0x3ea,0x3e3)]={'hasCustomDatabase':![]},this['detectedConfig'];console[_0x4d6e99(0x422,0x3f5)]('Failed to detect custom database configuration:',_0x4eaa73);}function _0x4d6e99(_0x1da699,_0x484e08){return _0xe923(_0x1da699-0x20d,_0x484e08);}return this[_0x4d6e99(0x3ea,0x3a9)]={'hasCustomDatabase':![]},this[_0x4d6e99(0x3ea,0x43e)];}async['testConnection'](_0x30238a){function _0x1e422f(_0x3afdba,_0x4b22d9){return _0xe923(_0x3afdba-0x348,_0x4b22d9);}try{const response=await this[_0x1e422f(0x5c0,0x5f1)]['post']('/admin/v1/workspace/custom-database/test-connection',_0x30238a,{'headers':this[_0x1e422f(0x4dc,0x462)]?{'X-Workspace-ID':this[_0x1e422f(0x4dc,0x54a)]}:{}});return response['data'];}catch(_0x3217f7){return{'success':![],'message':_0x3217f7?.[_0x1e422f(0x4f1,0x4fb)]||_0x1e422f(0x52f,0x4a9)};}}async[_0x36b514(0x324,0x309)](_0x3f855d){if(!this['workspaceId'])throw new Error('Workspace ID is required to configure custom database');const response=await this['httpClient'][_0x25db6e(0x5b,0x58)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x3f855d},{'headers':{'X-Workspace-ID':this[_0x25db6e(-0xbc,-0x5e)]}});function _0x25db6e(_0x3c43c9,_0x26e2c7){return _0xe923(_0x26e2c7- -0x1f2,_0x3c43c9);}const config=response['data']['config'];return this[_0x25db6e(-0x9a,-0x15)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x3f855d},config;}async['removeCustomDatabase'](){if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');await this[_0x540ddd(0xd6,0x11a)]['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this['workspaceId']}});function _0x540ddd(_0x64fcce,_0xa7ab33){return _0xe923(_0xa7ab33- -0x15e,_0x64fcce);}this['detectedConfig']={'hasCustomDatabase':![]};}[_0x36b514(0x32a,0x33b)](){return this['detectedConfig'];}[_0x36b514(0x33c,0x2f6)](){function _0x28af18(_0x5d45d1,_0x13a31c){return _0xe923(_0x5d45d1-0x168,_0x13a31c);}return this['detectedConfig']?.[_0x28af18(0x378,0x3fe)]??![];}['getCustomCredentials'](){function _0x40bd80(_0x7aa6ec,_0x15ecfd){return _0xe923(_0x15ecfd-0x2b0,_0x7aa6ec);}return this['detectedConfig']?.[_0x40bd80(0x4e2,0x50f)];}['setWorkspaceId'](_0x4f1cc3){function _0x5db98b(_0x480111,_0x335012){return _0xe923(_0x480111-0x3d7,_0x335012);}this[_0x5db98b(0x56b,0x4fa)]=_0x4f1cc3,this[_0x5db98b(0x5b4,0x62a)]=undefined;}[_0x36b514(0x34e,0x351)](){function _0x340f0e(_0x49bdfb,_0x5d3197){return _0xe923(_0x49bdfb-0x213,_0x5d3197);}return this[_0x340f0e(0x3a7,0x3d3)];}['getStatus'](){function _0x4d83c7(_0x5d4c72,_0xd9599b){return _0xe923(_0x5d4c72-0x146,_0xd9599b);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x4d83c7(0x356,0x2e5)](),'configDetails':this[_0x4d83c7(0x323,0x385)]?.[_0x4d83c7(0x3a5,0x396)]?{'host':this[_0x4d83c7(0x323,0x2ee)][_0x4d83c7(0x3a5,0x3b6)]['host'],'port':this['detectedConfig'][_0x4d83c7(0x3a5,0x3e7)]['port'],'database':this['detectedConfig']['credentials'][_0x4d83c7(0x3c3,0x37a)],'schema':this[_0x4d83c7(0x323,0x2e2)][_0x4d83c7(0x3a5,0x3f1)][_0x4d83c7(0x362,0x326)]||_0x4d83c7(0x2f9,0x360),'sslEnabled':this[_0x4d83c7(0x323,0x2c3)][_0x4d83c7(0x3a5,0x428)]['sslEnabled']||![]}:undefined};}}class DatabaseClient{constructor(_0x2c87ab,_0x59e07d){function _0x40a393(_0x5153fa,_0x1ad411){return _0xe923(_0x5153fa-0x398,_0x1ad411);}this['httpClient']=_0x2c87ab,this[_0x40a393(0x61b,0x659)]=new CustomDatabaseManager(_0x2c87ab,_0x59e07d);}['from'](_0x1c9562){function _0x45d1e3(_0x195870,_0x34ab79){return _0xe923(_0x34ab79- -0xec,_0x195870);}return new QueryBuilder(this['httpClient'],_0x1c9562,this[_0x45d1e3(0x1a1,0x134)],this[_0x45d1e3(0x1e0,0x197)]['getWorkspaceId']());}[_0x36b514(0x387,0x33a)](_0x2b7236,_0x4120c0){function _0xd692c0(_0x31716c,_0x15dce6){return _0xe923(_0x15dce6- -0x2e2,_0x31716c);}return this['httpClient'][_0xd692c0(-0x102,-0x98)]('/rpc/'+_0x2b7236,_0x4120c0);}['schema'](_0x69b3ff){const _0x1b40bf=new DatabaseClient(this['httpClient'],this[_0x18426e(0x10f,0x12e)][_0x18426e(0xea,0xcd)]());_0x1b40bf['currentSchema']=_0x69b3ff;function _0x18426e(_0x15a66c,_0x1314f9){return _0xe923(_0x1314f9- -0x155,_0x15a66c);}return _0x1b40bf['customDatabaseManager']=this[_0x18426e(0x19b,0x12e)],_0x1b40bf;}async[_0x36b514(0x3a0,0x349)](){return this['customDatabaseManager']['detectCustomDatabase']();}async['testCustomConnection'](_0x511c53){function _0x148743(_0x1f00fc,_0x377ef0){return _0xe923(_0x377ef0-0x3a0,_0x1f00fc);}return this['customDatabaseManager'][_0x148743(0x53b,0x531)](_0x511c53);}async[_0x36b514(0x324,0x39c)](_0x523e52){function _0x57c730(_0x22e886,_0x575419){return _0xe923(_0x575419-0x17d,_0x22e886);}return this[_0x57c730(0x38a,0x400)]['configureCustomDatabase'](_0x523e52);}async[_0x36b514(0x2e4,0x315)](){return this['customDatabaseManager']['removeCustomDatabase']();}['isUsingCustomDatabase'](){function _0x1b5582(_0x1438c6,_0x2474ea){return _0xe923(_0x2474ea- -0x33f,_0x1438c6);}return this['customDatabaseManager'][_0x1b5582(-0x1b1,-0x12f)]();}['getCustomDatabaseStatus'](){function _0x1cb923(_0x472d59,_0x45d3db){return _0xe923(_0x45d3db-0x2ae,_0x472d59);}return this['customDatabaseManager'][_0x1cb923(0x4fd,0x4e8)]();}[_0x36b514(0x369,0x3f0)](_0x9a6fbf){function _0x310530(_0x533314,_0x25e93a){return _0xe923(_0x25e93a-0x321,_0x533314);}this[_0x310530(0x564,0x5a4)][_0x310530(0x5dd,0x55e)](_0x9a6fbf);}async[_0x36b514(0x3c7,0x40b)](){function _0xce17f(_0x435e8a,_0x220a62){return _0xe923(_0x220a62- -0x1bc,_0x435e8a);}try{await this[_0xce17f(0xee,0xc7)][_0xce17f(0xbf,0xb8)]();}catch(_0x160b5b){console[_0xce17f(0xaa,0x59)]('Failed to initialize custom database detection:',_0x160b5b);}}}class StorageBucket{constructor(_0x5ce212,bucketId){this['httpClient']=_0x5ce212,this['bucketId']=bucketId;}async[_0x36b514(0x2eb,0x2fa)](_0xff46,_0x1f6d08,_0x3a79cc){function _0xa54fac(_0x948908,_0x49aa12){return _0xe923(_0x948908-0x179,_0x49aa12);}try{const _0x2b9bf9=new FormData();if(_0x1f6d08 instanceof File)_0x2b9bf9[_0xa54fac(0x3b8,0x32e)](_0xa54fac(0x3c6,0x42a),_0x1f6d08);else{if(_0x1f6d08 instanceof Blob)_0x2b9bf9[_0xa54fac(0x3b8,0x378)](_0xa54fac(0x3c6,0x43f),_0x1f6d08,_0xff46);else{if(_0x1f6d08 instanceof ArrayBuffer)_0x2b9bf9[_0xa54fac(0x3b8,0x3b4)](_0xa54fac(0x3c6,0x367),new Blob([_0x1f6d08]),_0xff46);else typeof _0x1f6d08===_0xa54fac(0x32a,0x37f)&&_0x2b9bf9[_0xa54fac(0x3b8,0x443)]('file',new Blob([_0x1f6d08],{'type':_0xa54fac(0x329,0x2e6)}),_0xff46);}}_0x2b9bf9[_0xa54fac(0x3b8,0x41e)]('path',_0xff46);_0x3a79cc?.[_0xa54fac(0x383,0x3e1)]&&_0x2b9bf9[_0xa54fac(0x3b8,0x38e)](_0xa54fac(0x383,0x338),_0x3a79cc[_0xa54fac(0x383,0x328)]);_0x3a79cc?.[_0xa54fac(0x309,0x304)]&&_0x2b9bf9['append'](_0xa54fac(0x309,0x30c),_0x3a79cc['contentType']);_0x3a79cc?.[_0xa54fac(0x312,0x2cf)]&&_0x2b9bf9['append'](_0xa54fac(0x312,0x305),JSON[_0xa54fac(0x388,0x38e)](_0x3a79cc[_0xa54fac(0x312,0x356)]));const _0x3d3893='/storage/buckets/'+this['bucketId']+_0xa54fac(0x403,0x3f1)+(_0x3a79cc?.['upsert']?_0xa54fac(0x3f9,0x413):''),response=await this['httpClient'][_0xa54fac(0x3c3,0x381)](_0x3d3893,_0x2b9bf9,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response[_0xa54fac(0x302,0x293)],'error':null};}catch(_0x1dc2c9){return{'data':null,'error':_0x1dc2c9 instanceof EBaaSError?_0x1dc2c9:new EBaaSError(_0x1dc2c9 instanceof Error?_0x1dc2c9[_0xa54fac(0x322,0x344)]:_0xa54fac(0x3a0,0x41b),0x0,_0x1dc2c9)};}}async['download'](_0x9be22f,_0x590f3c){function _0x24acf7(_0x29f2fb,_0x28d821){return _0xe923(_0x29f2fb-0x29a,_0x28d821);}try{const _0x48643d=new URLSearchParams();_0x590f3c?.['transform']&&Object['entries'](_0x590f3c['transform'])['forEach'](([_0x40fabf,_0x4cba04])=>{_0x4cba04!==undefined&&_0x48643d['append'](_0x40fabf,String(_0x4cba04));});const _0x36253c=_0x24acf7(0x451,0x43f)+this['bucketId']+'/files/'+_0x9be22f+(_0x48643d[_0x24acf7(0x46b,0x4c3)]()?'?'+_0x48643d[_0x24acf7(0x46b,0x43d)]():''),response=await this['httpClient']['get'](_0x36253c,{'responseType':'blob'});return{'data':response[_0x24acf7(0x423,0x3fd)],'error':null};}catch(_0x48db1a){return{'data':null,'error':_0x48db1a instanceof EBaaSError?_0x48db1a:new EBaaSError(_0x48db1a instanceof Error?_0x48db1a['message']:'Failed\x20to\x20download\x20file',0x0,_0x48db1a)};}}async[_0x36b514(0x381,0x310)](_0x59b301,_0x5c64e3){function _0x1b58e0(_0x2cc9df,_0x49449f){return _0xe923(_0x2cc9df-0x2bb,_0x49449f);}try{const _0xe7e9b7=new URLSearchParams();_0x59b301&&_0xe7e9b7['append']('prefix',_0x59b301);_0x5c64e3?.['limit']&&_0xe7e9b7['append']('limit',String(_0x5c64e3[_0x1b58e0(0x4cd,0x512)]));_0x5c64e3?.['offset']&&_0xe7e9b7['append'](_0x1b58e0(0x52c,0x51d),String(_0x5c64e3['offset']));_0x5c64e3?.[_0x1b58e0(0x4b2,0x4a0)]&&_0xe7e9b7[_0x1b58e0(0x4fa,0x4b8)]('sortBy',JSON[_0x1b58e0(0x4ca,0x47d)](_0x5c64e3[_0x1b58e0(0x4b2,0x529)]));_0x5c64e3?.[_0x1b58e0(0x47e,0x439)]&&_0xe7e9b7['append'](_0x1b58e0(0x47e,0x42f),_0x5c64e3[_0x1b58e0(0x47e,0x4ae)]);const _0x2a77a4='/storage/buckets/'+this[_0x1b58e0(0x51c,0x49f)]+'/files'+(_0xe7e9b7[_0x1b58e0(0x48c,0x490)]()?'?'+_0xe7e9b7['toString']():''),response=await this['httpClient'][_0x1b58e0(0x484,0x460)](_0x2a77a4);return{'data':response[_0x1b58e0(0x444,0x3db)],'error':null};}catch(_0x642010){return{'data':null,'error':_0x642010 instanceof EBaaSError?_0x642010:new EBaaSError(_0x642010 instanceof Error?_0x642010[_0x1b58e0(0x464,0x46d)]:_0x1b58e0(0x4f3,0x503),0x0,_0x642010)};}}async[_0x36b514(0x356,0x397)](_0xda55d5){function _0x186d3e(_0x4b9155,_0x6ac542){return _0xe923(_0x4b9155-0x83,_0x6ac542);}try{const response=await this['httpClient']['delete'](_0x186d3e(0x23a,0x1e7)+this[_0x186d3e(0x2e4,0x268)]+'/files',{'data':{'paths':_0xda55d5}});return{'data':response[_0x186d3e(0x20c,0x28a)],'error':null};}catch(_0x2ebebb){return{'data':null,'error':_0x2ebebb instanceof EBaaSError?_0x2ebebb:new EBaaSError(_0x2ebebb instanceof Error?_0x2ebebb['message']:_0x186d3e(0x2e9,0x268),0x0,_0x2ebebb)};}}async['move'](fromPath,_0x1846ff){function _0x12a3f6(_0x3b9f53,_0x59ee09){return _0xe923(_0x59ee09-0x330,_0x3b9f53);}try{const response=await this['httpClient']['post'](_0x12a3f6(0x470,0x4e7)+this['bucketId']+_0x12a3f6(0x44d,0x4bf),{'sourceKey':fromPath,'destinationKey':_0x1846ff});return{'data':response['data'],'error':null};}catch(_0x10764c){return{'data':null,'error':_0x10764c instanceof EBaaSError?_0x10764c:new EBaaSError(_0x10764c instanceof Error?_0x10764c[_0x12a3f6(0x4bf,0x4d9)]:'Failed\x20to\x20move\x20file',0x0,_0x10764c)};}}async['copy'](fromPath,_0x323a67){function _0x4b85a6(_0x4321a5,_0x2fb74c){return _0xe923(_0x4321a5- -0x2d1,_0x2fb74c);}try{const response=await this[_0x4b85a6(-0x59,-0xa7)]['post'](_0x4b85a6(-0x11a,-0x18f)+this[_0x4b85a6(-0x70,-0xb5)]+_0x4b85a6(-0x10c,-0xb4),{'sourceKey':fromPath,'destinationKey':_0x323a67});return{'data':response['data'],'error':null};}catch(_0x5d44e6){return{'data':null,'error':_0x5d44e6 instanceof EBaaSError?_0x5d44e6:new EBaaSError(_0x5d44e6 instanceof Error?_0x5d44e6[_0x4b85a6(-0x128,-0x19a)]:'Failed\x20to\x20copy\x20file',0x0,_0x5d44e6)};}}async['createSignedUrl'](_0x3135b2,_0x510e35,_0x28a248){function _0x4d1e45(_0x2741b3,_0xe22a0b){return _0xe923(_0xe22a0b- -0x19d,_0x2741b3);}try{const response=await this['httpClient'][_0x4d1e45(0xff,0xad)]('/storage/buckets/'+this['bucketId']+'/files/'+_0x3135b2+'/sign',{'expiresIn':_0x510e35,..._0x28a248});return{'data':response['data'],'error':null};}catch(_0x58d4d0){return{'data':null,'error':_0x58d4d0 instanceof EBaaSError?_0x58d4d0:new EBaaSError(_0x58d4d0 instanceof Error?_0x58d4d0['message']:_0x4d1e45(0x120,0xf5),0x0,_0x58d4d0)};}}['getPublicUrl'](_0x4c047f,_0x2fcaa1){const _0x4d88af=new URLSearchParams();_0x2fcaa1?.['transform']&&Object['entries'](_0x2fcaa1['transform'])[_0x328720(0x14,0x12)](([_0x186812,_0x183a96])=>{function _0x71ba85(_0x316c40,_0x5f4242){return _0xe923(_0x316c40-0xa2,_0x5f4242);}_0x183a96!==undefined&&_0x4d88af[_0x71ba85(0x2e1,0x351)](_0x186812,String(_0x183a96));});const _0x17c20b=this['httpClient']['baseURL']||'';function _0x328720(_0x3ed65e,_0x387e1c){return _0xe923(_0x387e1c- -0x268,_0x3ed65e);}const _0x32b88e=_0x17c20b+_0x328720(-0x6a,-0xb1)+this['bucketId']+'/files/'+_0x4c047f+(_0x4d88af[_0x328720(-0xdc,-0x97)]()?'?'+_0x4d88af['toString']():'');return{'data':{'publicUrl':_0x32b88e}};}async['getFileInfo'](_0x446a76){function _0xa8b160(_0x15d591,_0x342f50){return _0xe923(_0x342f50-0x129,_0x15d591);}try{const response=await this[_0xa8b160(0x317,0x3a1)]['get'](_0xa8b160(0x349,0x2e0)+this['bucketId']+'/files/'+_0x446a76+'/info');return{'data':response['data'],'error':null};}catch(_0x146424){return{'data':null,'error':_0x146424 instanceof EBaaSError?_0x146424:new EBaaSError(_0x146424 instanceof Error?_0x146424[_0xa8b160(0x2bc,0x2d2)]:_0xa8b160(0x2f7,0x34e),0x0,_0x146424)};}}async[_0x36b514(0x360,0x2f2)](_0x593865,metadata){function _0x59c296(_0x2e0812,_0x3f782d){return _0xe923(_0x2e0812- -0x211,_0x3f782d);}try{const response=await this[_0x59c296(0x67,0xc9)][_0x59c296(-0x28,-0x1e)](_0x59c296(-0x5a,-0x6c)+this[_0x59c296(0x50,0x60)]+_0x59c296(-0x63,0x0)+_0x593865+'/metadata',{'metadata':metadata});return{'data':response[_0x59c296(-0x88,-0x7)],'error':null};}catch(_0x491c2e){return{'data':null,'error':_0x491c2e instanceof EBaaSError?_0x491c2e:new EBaaSError(_0x491c2e instanceof Error?_0x491c2e['message']:_0x59c296(-0x45,-0x2),0x0,_0x491c2e)};}}}class StorageClient{constructor(_0x4c4445){function _0x142959(_0x2639ff,_0x78d580){return _0xe923(_0x2639ff-0xa1,_0x78d580);}this[_0x142959(0x319,0x388)]=_0x4c4445;}[_0x36b514(0x2d3,0x34b)](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async[_0x36b514(0x2c4,0x2d1)](_0xd9d662,_0x249e26){function _0x2c97e0(_0x26a303,_0x505d96){return _0xe923(_0x505d96- -0x6c,_0x26a303);}try{const response=await this[_0x2c97e0(0x293,0x20c)]['post']('/storage/buckets',{'id':_0xd9d662,..._0x249e26});return{'data':response['data'],'error':null};}catch(_0x1a22e7){return{'data':null,'error':_0x1a22e7 instanceof EBaaSError?_0x1a22e7:new EBaaSError(_0x1a22e7 instanceof Error?_0x1a22e7[_0x2c97e0(0x117,0x13d)]:_0x2c97e0(0x20e,0x220),0x0,_0x1a22e7)};}}async['getBucket'](_0x58dbda){function _0x56b6a6(_0x12ff6e,_0x3e0d85){return _0xe923(_0x12ff6e-0x18b,_0x3e0d85);}try{const response=await this[_0x56b6a6(0x403,0x46c)]['get'](_0x56b6a6(0x342,0x324)+_0x58dbda);return{'data':response[_0x56b6a6(0x314,0x349)],'error':null};}catch(_0x2d93b7){return{'data':null,'error':_0x2d93b7 instanceof EBaaSError?_0x2d93b7:new EBaaSError(_0x2d93b7 instanceof Error?_0x2d93b7[_0x56b6a6(0x334,0x2f2)]:_0x56b6a6(0x3dd,0x3ad),0x0,_0x2d93b7)};}}async[_0x36b514(0x382,0x3a5)](){function _0x3144bb(_0x2439db,_0x5a9e21){return _0xe923(_0x5a9e21-0x29f,_0x2439db);}try{const response=await this[_0x3144bb(0x557,0x517)][_0x3144bb(0x413,0x468)]('/storage/buckets');return{'data':response[_0x3144bb(0x40b,0x428)],'error':null};}catch(_0x418fe1){return{'data':null,'error':_0x418fe1 instanceof EBaaSError?_0x418fe1:new EBaaSError(_0x418fe1 instanceof Error?_0x418fe1[_0x3144bb(0x3bd,0x448)]:_0x3144bb(0x41f,0x49e),0x0,_0x418fe1)};}}async[_0x36b514(0x31f,0x299)](_0x5ba0f7,_0x14d7cb){function _0x1e9c75(_0x3a1a9e,_0x177246){return _0xe923(_0x177246-0x264,_0x3a1a9e);}try{const response=await this['httpClient'][_0x1e9c75(0x3ff,0x44d)]('/storage/buckets/'+_0x5ba0f7,_0x14d7cb);return{'data':response[_0x1e9c75(0x479,0x3ed)],'error':null};}catch(_0x233b06){return{'data':null,'error':_0x233b06 instanceof EBaaSError?_0x233b06:new EBaaSError(_0x233b06 instanceof Error?_0x233b06[_0x1e9c75(0x3b1,0x40d)]:_0x1e9c75(0x412,0x41a),0x0,_0x233b06)};}}async[_0x36b514(0x38f,0x368)](_0x4d0dbd){function _0x4de15f(_0x1c1561,_0x16a7f7){return _0xe923(_0x1c1561-0x1e,_0x16a7f7);}try{const response=await this['httpClient'][_0x4de15f(0x232,0x2a4)](_0x4de15f(0x1d5,0x216)+_0x4d0dbd);return{'data':response[_0x4de15f(0x1a7,0x167)],'error':null};}catch(_0xe29323){return{'data':null,'error':_0xe29323 instanceof EBaaSError?_0xe29323:new EBaaSError(_0xe29323 instanceof Error?_0xe29323['message']:'Failed\x20to\x20delete\x20bucket',0x0,_0xe29323)};}}async['getUsage'](){function _0x3399b6(_0x5db662,_0x149186){return _0xe923(_0x149186-0xb4,_0x5db662);}try{const response=await this['httpClient'][_0x3399b6(0x243,0x27d)]('/storage/usage');return{'data':response['data'],'error':null};}catch(_0x4eb2ad){return{'data':null,'error':_0x4eb2ad instanceof EBaaSError?_0x4eb2ad:new EBaaSError(_0x4eb2ad instanceof Error?_0x4eb2ad[_0x3399b6(0x2cc,0x25d)]:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x4eb2ad)};}}}class EventManager{constructor(){function _0x4baad0(_0x3d1b23,_0xff713){return _0xe923(_0xff713- -0x38,_0x3d1b23);}this[_0x4baad0(0x163,0x154)]=new Map(),this['maxListeners']=0xa;}['on'](_0x46fd4f,_0x209e91){function _0x4f59ae(_0x2f81b9,_0x189954){return _0xe923(_0x2f81b9-0x3af,_0x189954);}!this[_0x4f59ae(0x53b,0x57f)]['has'](_0x46fd4f)&&this['events'][_0x4f59ae(0x635,0x605)](_0x46fd4f,new Set()),this['events']['get'](_0x46fd4f)[_0x4f59ae(0x5da,0x64a)](_0x209e91);}['off'](_0x5becb2,_0x4ea3bf){if(!this[_0x2d3d27(0x6a,0x54)][_0x2d3d27(0xcb,0x122)](_0x5becb2))return;function _0x2d3d27(_0x1b4580,_0x23ae74){return _0xe923(_0x1b4580- -0x122,_0x23ae74);}const _0x5bc2e9=this[_0x2d3d27(0x6a,0x46)][_0x2d3d27(0xa7,0x9c)](_0x5becb2);_0x4ea3bf?_0x5bc2e9['delete'](_0x4ea3bf):_0x5bc2e9['clear'](),_0x5bc2e9[_0x2d3d27(0xc0,0x5d)]===0x0&&this['events']['delete'](_0x5becb2);}['emit'](_0xb57c82,..._0x3b1344){if(!this['events']['has'](_0xb57c82))return![];const _0x43d79e=this[_0x205888(0x266,0x2b8)][_0x205888(0x2a3,0x2a0)](_0xb57c82);for(const _0x584894 of _0x43d79e){try{_0x584894(..._0x3b1344);}catch(_0x112530){console['error']('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0xb57c82+'\x22:',_0x112530);}}function _0x205888(_0x5599dd,_0x52cf4b){return _0xe923(_0x5599dd-0xda,_0x52cf4b);}return _0x43d79e['size']>0x0;}['removeAllListeners'](_0x507a98){function _0xa1d737(_0x3db0cd,_0xddc048){return _0xe923(_0x3db0cd- -0x29f,_0xddc048);}_0x507a98?this[_0xa1d737(-0x113,-0x128)][_0xa1d737(-0x8b,-0x2)](_0x507a98):this[_0xa1d737(-0x113,-0x10f)]['clear']();}['listenerCount'](_0x46a6a0){function _0x359561(_0x22995b,_0x1bd48c){return _0xe923(_0x22995b-0x1f2,_0x1bd48c);}return this['events'][_0x359561(0x3bb,0x359)](_0x46a6a0)?.['size']??0x0;}['eventNames'](){function _0x3c09c1(_0x1ea5ef,_0x221fc8){return _0xe923(_0x221fc8-0x149,_0x1ea5ef);}return Array['from'](this[_0x3c09c1(0x2e9,0x2d5)][_0x3c09c1(0x30d,0x323)]());}[_0x36b514(0x36a,0x3cb)](_0x30bd66){function _0x46225e(_0x3a0fdf,_0x4fb7e4){return _0xe923(_0x3a0fdf- -0x13,_0x4fb7e4);}return Array['from'](this[_0x46225e(0x179,0x144)]['get'](_0x30bd66)??[]);}['addListener'](_0x57fd18,_0x433885){this['on'](_0x57fd18,_0x433885);}[_0x36b514(0x30c,0x2a0)](_0x477794,_0x568a81){this['off'](_0x477794,_0x568a81);}[_0x36b514(0x385,0x303)](_0x597db6,_0x5d82d9){const _0x479e4e=(..._0x316684)=>{this[_0x4e65b3(0x46d,0x443)](_0x597db6,_0x479e4e);function _0x4e65b3(_0x5e6f22,_0x4b4b3a){return _0xe923(_0x5e6f22-0x21d,_0x4b4b3a);}_0x5d82d9(..._0x316684);};this['on'](_0x597db6,_0x479e4e);}[_0x36b514(0x34f,0x3d5)](_0x239199,_0x5e6523){this['on'](_0x239199,_0x5e6523);}['prependOnceListener'](_0x1b8dda,_0x524886){const _0x32b404=(..._0x5276a4)=>{this[_0xc28575(-0x4e,-0x14)](_0x1b8dda,_0x32b404);function _0xc28575(_0xeb7b60,_0x5c3ac4){return _0xe923(_0x5c3ac4- -0x264,_0xeb7b60);}_0x524886(..._0x5276a4);};this['on'](_0x1b8dda,_0x32b404);}['setMaxListeners'](_0x1c9886){this[_0xdb374a(0x4ca,0x4f6)]=_0x1c9886;function _0xdb374a(_0x3832e1,_0x23ad1e){return _0xe923(_0x3832e1-0x287,_0x23ad1e);}return this;}[_0x36b514(0x331,0x374)](){function _0x1fad00(_0x1529ac,_0x3f4523){return _0xe923(_0x3f4523- -0x38e,_0x1529ac);}return this[_0x1fad00(-0xdb,-0x14b)];}[_0x36b514(0x367,0x34b)](_0x8f71c0){return this['listeners'](_0x8f71c0);}}class RealtimeChannel extends EventManager{constructor(_0x341dae,_0xe48b04){super();function _0x1c8c62(_0x2eef00,_0x5bf002){return _0xe923(_0x5bf002- -0x27f,_0x2eef00);}this['joinedOnce']=![],this['state']=_0x1c8c62(-0xd6,-0x8a),this['subscriptions']=new Map(),this[_0x1c8c62(0x35,0x6)]=_0x341dae,this[_0x1c8c62(-0x19,-0x7e)]=_0xe48b04;}[_0x36b514(0x316,0x368)](_0x5ace00){!this[_0x247aaa(-0x5a,-0x70)]&&(this[_0x247aaa(-0x9b,-0x70)]=!![],this[_0x247aaa(-0xc4,-0x48)]());function _0x247aaa(_0x3eb02f,_0x12609b){return _0xe923(_0x12609b- -0x22c,_0x3eb02f);}return _0x5ace00&&this['on'](_0x247aaa(0x5d,-0x12),_0x5ace00),this;}[_0x36b514(0x2b7,0x325)](filter,_0x4e8fa2){function _0x15656f(_0x98c9eb,_0x50ce1f){return _0xe923(_0x50ce1f- -0x1bc,_0x98c9eb);}const _0x4a0427='postgres_changes:'+JSON[_0x15656f(0xb8,0x53)](filter);this['on'](_0x4a0427,_0x4e8fa2);const _0x5514b9={'unsubscribe':()=>{this[_0x471c60(-0x103,-0x131)](_0x4a0427,_0x4e8fa2);function _0x471c60(_0x413072,_0x27c87e){return _0xe923(_0x413072- -0x353,_0x27c87e);}this[_0x471c60(-0x193,-0x185)][_0x471c60(-0x13f,-0x118)](_0x4a0427);}};return this['subscriptions']['set'](_0x4a0427,_0x5514b9),this['socket']?.['connected']&&this['state']===_0x15656f(0x29,0xf)&&this['socket']['emit'](_0x15656f(0x7c,0xe2),{'topic':this[_0x15656f(0xa9,0xc9)],'filter':filter,'ref':this['makeRef']()}),_0x5514b9;}['onBroadcast'](filter,_0x5c659b){const _0x2b7a89='broadcast:'+JSON[_0x15af22(0x191,0x182)](filter);this['on'](_0x2b7a89,_0x5c659b);function _0x15af22(_0x40b8c5,_0x128307){return _0xe923(_0x40b8c5- -0x7e,_0x128307);}const _0x530e60={'unsubscribe':()=>{this[_0x537093(0x241,0x249)](_0x2b7a89,_0x5c659b);function _0x537093(_0x3fe5f5,_0x5c7e32){return _0xe923(_0x5c7e32- -0x7,_0x3fe5f5);}this[_0x537093(0x195,0x1b9)]['delete'](_0x2b7a89);}};return this['subscriptions']['set'](_0x2b7a89,_0x530e60),_0x530e60;}['onPresence'](filter,_0x395f56){const _0x230b79='presence:'+JSON['stringify'](filter);this['on'](_0x230b79,_0x395f56);const _0x4a8a08={'unsubscribe':()=>{this['off'](_0x230b79,_0x395f56),this['subscriptions']['delete'](_0x230b79);}};function _0x2bbf77(_0x51112d,_0x24f0c8){return _0xe923(_0x51112d-0x24b,_0x24f0c8);}return this[_0x2bbf77(0x40b,0x3d4)][_0x2bbf77(0x4d1,0x540)](_0x230b79,_0x4a8a08),_0x4a8a08;}['send'](_0x4ce823){return new Promise(_0xd7c9c9=>{function _0x433d69(_0x577973,_0x5546b1){return _0xe923(_0x577973- -0x6d,_0x5546b1);}this[_0x433d69(0x194,0x17d)]?.['connected']&&this['state']===_0x433d69(0x15e,0x1ad)?(this['socket'][_0x433d69(0x193,0x194)](_0x433d69(0x1cf,0x19e),{'topic':this[_0x433d69(0x218,0x292)],'event':_0x4ce823['event'],'payload':_0x4ce823,'ref':this[_0x433d69(0x1fc,0x21c)]()}),_0xd7c9c9('ok')):_0xd7c9c9('error');});}[_0x36b514(0x362,0x31d)](_0xf13dc2){return new Promise(_0x11f3d0=>{function _0x49fefa(_0x50522f,_0x298f7f){return _0xe923(_0x298f7f-0x15e,_0x50522f);}this['socket']?.[_0x49fefa(0x382,0x33d)]&&this[_0x49fefa(0x335,0x3b8)]===_0x49fefa(0x347,0x329)?(this[_0x49fefa(0x312,0x35f)][_0x49fefa(0x3c6,0x35e)]('presence',{'topic':this[_0x49fefa(0x3d6,0x3e3)],'event':'track','payload':_0xf13dc2,'ref':this['makeRef']()}),_0x11f3d0('ok')):_0x11f3d0(_0x49fefa(0x443,0x3ec));});}['untrack'](){return new Promise(_0x7a8ce5=>{function _0x557842(_0x23069c,_0x48da5b){return _0xe923(_0x23069c- -0x9b,_0x48da5b);}this[_0x557842(0x166,0x134)]?.['connected']&&this['state']===_0x557842(0x130,0x1b5)?(this['socket'][_0x557842(0x165,0x142)](_0x557842(0x171,0x1f2),{'topic':this[_0x557842(0x1ea,0x1d0)],'event':'untrack','ref':this[_0x557842(0x1ce,0x157)]()}),_0x7a8ce5('ok')):_0x7a8ce5(_0x557842(0x1f3,0x20f));});}[_0x36b514(0x365,0x3f0)](){return new Promise(_0x5d9978=>{this[_0xfdeebd(0x210,0x1be)]='leaving',this[_0xfdeebd(0x176,0x1e0)][_0xfdeebd(0x230,0x22e)](_0x5a6f51=>{function _0x1e6ae0(_0x773c52,_0x231f61){return _0xe923(_0x773c52-0x3a0,_0x231f61);}_0x5a6f51[_0x1e6ae0(0x5d9,0x62b)]();}),this['subscriptions']['clear']();this['socket']?.['connected']&&this[_0xfdeebd(0x1b7,0x209)][_0xfdeebd(0x1b6,0x1c2)](_0xfdeebd(0x18d,0x1f7),{'topic':this[_0xfdeebd(0x23b,0x212)],'ref':this[_0xfdeebd(0x21f,0x1b3)]()});this['state']='closed',this[_0xfdeebd(0x194,0x1e6)]();function _0xfdeebd(_0x522feb,_0x2e1839){return _0xe923(_0x522feb- -0x4a,_0x2e1839);}_0x5d9978('ok');});}[_0x36b514(0x310,0x293)](){if(this['state']===_0x594a92(0x4e7,0x485))return;this[_0x594a92(0x4e5,0x4db)]=_0x594a92(0x428,0x468);function _0x594a92(_0x43c01,_0x25cb61){return _0xe923(_0x43c01-0x28b,_0x25cb61);}this[_0x594a92(0x48c,0x423)]?.['connected']&&(this['socket'][_0x594a92(0x48b,0x421)]('join',{'topic':this[_0x594a92(0x510,0x526)],'ref':this['makeRef']()}),setTimeout(()=>{function _0x4ecb92(_0x318c8d,_0x5abfbd){return _0xe923(_0x318c8d- -0x279,_0x5abfbd);}this['state']===_0x4ecb92(-0xdc,-0x89)&&(this['state']=_0x4ecb92(-0xae,-0x94),this['emit'](_0x4ecb92(-0x5f,-0xcf),_0x4ecb92(-0xc5,-0xe5)));},0x64));}['_rejoin'](){function _0x2d841b(_0x23ae02,_0x1f3e75){return _0xe923(_0x1f3e75-0x274,_0x23ae02);}this[_0x2d841b(0x46c,0x430)]&&(this[_0x2d841b(0x474,0x458)](),this[_0x2d841b(0x3c1,0x434)][_0x2d841b(0x4c2,0x4ee)]((_0x1c739a,_0x218d2b)=>{function _0x281763(_0x3b3462,_0x1792c5){return _0xe923(_0x1792c5- -0x11f,_0x3b3462);}if(_0x218d2b['startsWith'](_0x281763(0xa0,0xcd))){const filter=JSON['parse'](_0x218d2b['replace']('postgres_changes:',''));this[_0x281763(0xea,0xe2)]?.[_0x281763(0x119,0xe1)]('subscribe_postgres_changes',{'topic':this[_0x281763(0x147,0x166)],'filter':filter,'ref':this[_0x281763(0xef,0x14a)]()});}}));}[_0x36b514(0x3ab,0x3dd)](_0x23256f,_0x277718){function _0x4f4109(_0x51abf4,_0xcd718){return _0xe923(_0xcd718- -0x2ee,_0x51abf4);}if(_0x23256f==='postgres_changes'){const _0x402617=_0x4f4109(-0x164,-0x102)+JSON['stringify'](_0x277718['filter']||{});this[_0x4f4109(-0x10a,-0xee)](_0x402617,_0x277718);}else{if(_0x23256f===_0x4f4109(-0x55,-0xb2)){const _0x4a7a2e=_0x4f4109(-0x82,-0xe6)+JSON[_0x4f4109(-0x11f,-0xdf)]({'event':_0x277718[_0x4f4109(-0xfc,-0x90)]});this[_0x4f4109(-0xe3,-0xee)](_0x4a7a2e,_0x277718);}else{if(_0x23256f==='presence'){const _0x286fab=_0x4f4109(-0x9a,-0xdd)+JSON[_0x4f4109(-0x87,-0xdf)]({'event':_0x277718['event']});this[_0x4f4109(-0xd6,-0xee)](_0x286fab,_0x277718);}}}this['emit'](_0x23256f,_0x277718);}[_0x36b514(0x31a,0x356)](_0x29aa81){this[_0x3ac0fe(-0x120,-0xd9)]=_0x29aa81;function _0x3ac0fe(_0x2b711b,_0x3ffba5){return _0xe923(_0x3ffba5- -0x333,_0x2b711b);}let status;switch(_0x29aa81){case'joined':status=_0x3ac0fe(-0x1f4,-0x17f);break;case _0x3ac0fe(-0x140,-0xe4):status='CHANNEL_ERROR';break;case _0x3ac0fe(-0x155,-0x13e):status='CLOSED';break;default:return;}this['emit'](_0x3ac0fe(-0x106,-0x119),status);}[_0x36b514(0x395,0x330)](){function _0x51eaab(_0x16f294,_0x74cd69){return _0xe923(_0x74cd69- -0xd8,_0x16f294);}return Math['random']()[_0x51eaab(0x123,0xf9)](0x24)[_0x51eaab(0x117,0x117)](0x2,0xf);}[_0x36b514(0x3b5,0x343)](){function _0x30de50(_0x17ad83,_0x2c28eb){return _0xe923(_0x2c28eb- -0x13,_0x17ad83);}return this[_0x30de50(0x26f,0x247)];}}function _0xe923(_0x3b36e8,_0x5ae0ae){const _0x2a4557=_0x2a45();return _0xe923=function(_0xe92310,_0x4686b4){_0xe92310=_0xe92310-0x188;let _0x568701=_0x2a4557[_0xe92310];if(_0xe923['ZFRFny']===undefined){var _0x1569d5=function(_0x290047){const _0xec9896='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x355414='',_0x169c1b='';for(let _0x2977ba=0x0,_0xab59a6,_0x521466,_0x38a619=0x0;_0x521466=_0x290047['charAt'](_0x38a619++);~_0x521466&&(_0xab59a6=_0x2977ba%0x4?_0xab59a6*0x40+_0x521466:_0x521466,_0x2977ba++%0x4)?_0x355414+=String['fromCharCode'](0xff&_0xab59a6>>(-0x2*_0x2977ba&0x6)):0x0){_0x521466=_0xec9896['indexOf'](_0x521466);}for(let _0xb51031=0x0,_0x5a5170=_0x355414['length'];_0xb51031<_0x5a5170;_0xb51031++){_0x169c1b+='%'+('00'+_0x355414['charCodeAt'](_0xb51031)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x169c1b);};_0xe923['WkSneg']=_0x1569d5,_0x3b36e8=arguments,_0xe923['ZFRFny']=!![];}const _0x34d51d=_0x2a4557[0x0],_0x56b172=_0xe92310+_0x34d51d,_0x394c6f=_0x3b36e8[_0x56b172];return!_0x394c6f?(_0x568701=_0xe923['WkSneg'](_0x568701),_0x3b36e8[_0x56b172]=_0x568701):_0x568701=_0x394c6f,_0x568701;},_0xe923(_0x3b36e8,_0x5ae0ae);}function getEnvironment(){function _0x33c04a(_0xfdee1b,_0x1d3849){return _0xe923(_0xfdee1b- -0x385,_0x1d3849);}if(typeof navigator!==_0x33c04a(-0x1dd,-0x1cc)&&navigator[_0x33c04a(-0x131,-0x189)]===_0x33c04a(-0x1b3,-0x12b))return _0x33c04a(-0x1ad,-0x207);if(typeof window!==_0x33c04a(-0x1dd,-0x200)&&typeof document!=='undefined')return'browser';if(typeof global!=='undefined'&&typeof process!==_0x33c04a(-0x1dd,-0x201)&&process['versions']?.[_0x33c04a(-0x1af,-0x172)])return _0x33c04a(-0x1af,-0x238);return'browser';}function isSocketIOAvailable(){function _0x239034(_0x4f2808,_0x53164e){return _0xe923(_0x4f2808- -0x4f,_0x53164e);}try{const _0x3d4494=getEnvironment();switch(_0x3d4494){case'node':return typeof require!==_0x239034(0x159,0x1a8)&&require['resolve']&&!!require['resolve']('socket.io-client');case _0x239034(0x1cc,0x23c):if(typeof globalThis!==_0x239034(0x159,0x1e5)&&'io'in globalThis)return!![];return typeof require!=='undefined'&&require[_0x239034(0x1b7,0x12d)]&&!!require[_0x239034(0x1b7,0x1eb)](_0x239034(0x148,0x15c));case'react-native':try{return typeof require!=='undefined'&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x48388d(_0x73aa49,_0x407fce){return _0xe923(_0x407fce-0x20a,_0x73aa49);}try{if(typeof require!==_0x48388d(0x3d6,0x3b2))return require(_0x48388d(0x40d,0x3a1));if(typeof globalThis!==_0x48388d(0x3a8,0x3b2)&&'io'in globalThis)return{'io':globalThis['io']};throw new Error(_0x48388d(0x411,0x43d));}catch(_0x20d9a3){throw new Error(_0x48388d(0x343,0x3a4));}}class WebSocketAdapter{constructor(){function _0x4ee158(_0x306b05,_0x59553){return _0xe923(_0x306b05-0x143,_0x59553);}this[_0x4ee158(0x344,0x30a)]=null;}async['connect'](_0x271738,_0x5cd836){if(!isSocketIOAvailable())throw new Error('Socket.io-client não está disponível. Para usar funcionalidades de realtime, instale: npm install socket.io-client');const {io:_0x20950a}=getSocketIO();return new Promise((_0x43f769,_0x18bfe2)=>{this[_0x5d4138(0x159,0x165)]=_0x20950a(_0x271738,_0x5cd836);function _0x5d4138(_0x16df0c,_0x5e83da){return _0xe923(_0x16df0c- -0xa8,_0x5e83da);}this[_0x5d4138(0x159,0x12c)]['on'](_0x5d4138(0x1eb,0x1db),()=>_0x43f769()),this['socket']['on'](_0x5d4138(0x140,0x15c),_0x34734a=>_0x18bfe2(_0x34734a));});}[_0x36b514(0x2fb,0x297)](){function _0x591c3a(_0xf8f2fb,_0x1d35ef){return _0xe923(_0xf8f2fb-0x371,_0x1d35ef);}this[_0x591c3a(0x572,0x5be)]&&(this[_0x591c3a(0x572,0x4fe)]['disconnect'](),this['socket']=null);}['emit'](_0x259e6f,data){function _0x2d92f5(_0x18f11a,_0x2e8618){return _0xe923(_0x2e8618- -0x390,_0x18f11a);}this['socket']?.[_0x2d92f5(-0x123,-0x190)](_0x259e6f,data);}['on'](_0x1e2b5d,_0x1826a6){function _0x487f9b(_0x5d17c4,_0x5964e5){return _0xe923(_0x5d17c4- -0x262,_0x5964e5);}this[_0x487f9b(-0x61,-0xe4)]?.['on'](_0x1e2b5d,_0x1826a6);}[_0x36b514(0x37c,0x359)](_0x2cd80f,_0x517230){function _0x1bacdd(_0x29d12f,_0x3814e8){return _0xe923(_0x29d12f- -0x14e,_0x3814e8);}_0x517230?this['socket']?.[_0x1bacdd(0x102,0x101)](_0x2cd80f,_0x517230):this['socket']?.[_0x1bacdd(0x102,0xd0)](_0x2cd80f);}get[_0x36b514(0x30b,0x38b)](){function _0x4878b9(_0x5f1065,_0x30f574){return _0xe923(_0x5f1065-0x144,_0x30f574);}return this[_0x4878b9(0x345,0x39e)]?.[_0x4878b9(0x323,0x323)]??![];}}class ReactNativeSocketAdapter{constructor(){function _0x50057f(_0x2f41dc,_0xf2e04f){return _0xe923(_0xf2e04f-0x2c1,_0x2f41dc);}this[_0x50057f(0x4f8,0x4c2)]=null;}async['connect'](_0x5bc5f4,_0x5bcade){if(!isSocketIOAvailable())throw new Error('Socket.io-client\x20não\x20está\x20disponível.\x20Para\x20React\x20Native,\x20instale:\x20npm\x20install\x20socket.io-client');const {io:_0x443a6e}=getSocketIO();return new Promise((_0x363ede,_0x5589a3)=>{this[_0xf489f4(-0x59,-0xab)]=_0x443a6e(_0x5bc5f4,{..._0x5bcade,'transports':['websocket'],'upgrade':![],'autoConnect':!![]});function _0xf489f4(_0x2193a4,_0x53b5f6){return _0xe923(_0x53b5f6- -0x2ac,_0x2193a4);}this[_0xf489f4(-0x39,-0xab)]['on']('connect',()=>_0x363ede()),this[_0xf489f4(-0xd7,-0xab)]['on']('connect_error',_0x245c18=>_0x5589a3(_0x245c18));});}[_0x36b514(0x2fb,0x2b4)](){this['socket']&&(this['socket']['disconnect'](),this['socket']=null);}[_0x36b514(0x32c,0x361)](_0x1df851,data){function _0x2c15ff(_0x2f522b,_0xf46781){return _0xe923(_0x2f522b- -0x16c,_0xf46781);}this[_0x2c15ff(0x95,0x11b)]?.[_0x2c15ff(0x94,0xba)](_0x1df851,data);}['on'](_0x4ce6ba,_0x686048){this['socket']?.['on'](_0x4ce6ba,_0x686048);}['off'](_0x47f203,_0x2458e1){function _0x174c4f(_0xe23380,_0x3fd856){return _0xe923(_0x3fd856- -0x17d,_0xe23380);}_0x2458e1?this['socket']?.['off'](_0x47f203,_0x2458e1):this[_0x174c4f(0x74,0x84)]?.[_0x174c4f(0xc8,0xd3)](_0x47f203);}get[_0x36b514(0x30b,0x2d4)](){function _0x2753db(_0x3576ac,_0x1247eb){return _0xe923(_0x1247eb- -0x2b4,_0x3576ac);}return this['socket']?.[_0x2753db(-0x112,-0xd5)]??![];}}function createSocketAdapter(){function _0xa10c1d(_0x26885a,_0x251c09){return _0xe923(_0x251c09- -0x178,_0x26885a);}const _0x169004=getEnvironment();switch(_0x169004){case _0xa10c1d(0x78,0x60):return new ReactNativeSocketAdapter();case'browser':case _0xa10c1d(0x32,0x5e):default:return new WebSocketAdapter();}}function _0x36b514(_0x451bec,_0x34ddc8){return _0xe923(_0x451bec-0x12c,_0x34ddc8);}class RealtimeClient{constructor(_0x10f371,_0x498cc9,_0x2bc78d={}){this[_0x3b2919(0x167,0x1a8)]=null,this['channels']=new Map(),this[_0x3b2919(0x148,0x147)]='disconnected',this[_0x3b2919(0x19c,0x20c)]=0x0,this[_0x3b2919(0xd5,0x156)]=0x5;function _0x3b2919(_0x5c3a3e,_0x36ee5c){return _0xe923(_0x36ee5c- -0x59,_0x5c3a3e);}this['url']=_0x10f371,this[_0x3b2919(0x168,0x13a)]=_0x498cc9,this[_0x3b2919(0x13d,0x154)]={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x2bc78d},this[_0x3b2919(0x1f3,0x237)]=createSocketAdapter();}[_0x36b514(0x3bf,0x387)](){return new Promise(async(_0x21d84e,_0xbc1464)=>{if(this['socketAdapter']['connected']){_0x21d84e();return;}function _0x383152(_0x59a3f0,_0x1ea0bb){return _0xe923(_0x1ea0bb- -0x248,_0x59a3f0);}this['connectionState']='connecting';try{await this['socketAdapter']['connect'](this['url'],{'auth':{'apikey':this[_0x383152(-0x70,-0xb5)]},'transports':['websocket'],'reconnection':!![],'reconnectionDelay':this[_0x383152(-0x8b,-0x9b)][_0x383152(0xa8,0x2d)],'reconnectionAttempts':this[_0x383152(-0x84,-0x9b)][_0x383152(-0xd6,-0x99)],...this['options'][_0x383152(-0xa5,-0x45)]}),this['socket']=this['socketAdapter']['socket'],this[_0x383152(-0x2b,0x48)]['on']('connect',()=>{function _0x25dd81(_0x39fd8b,_0x1f8218){return _0xe923(_0x39fd8b-0x2a7,_0x1f8218);}this['connectionState']='connected',this[_0x25dd81(0x50c,0x4e4)]=0x0,this['setupHeartbeat'](),_0x21d84e();}),this[_0x383152(0x54,0x48)]['on']('disconnect',()=>{this[_0x5f34aa(0x3f3,0x3cc)]='disconnected';function _0x5f34aa(_0x2a7116,_0xb384fe){return _0xe923(_0x2a7116-0x253,_0xb384fe);}this['channels'][_0x5f34aa(0x4cd,0x4d5)](channel=>{function _0x4de6d0(_0x3d9671,_0x394731){return _0xe923(_0x3d9671- -0x248,_0x394731);}channel['_setState'](_0x4de6d0(-0x53,-0x4e));});}),this['socketAdapter']['on']('connect_error',_0x2cac56=>{this['connectionState']='error';function _0x1150b6(_0x3f9760,_0x4f5acf){return _0xe923(_0x3f9760- -0x2bc,_0x4f5acf);}this[_0x1150b6(-0x57,-0xd6)]++,this['reconnectAttempts']>=this[_0x1150b6(-0x10d,-0x100)]&&_0xbc1464(new Error(_0x1150b6(-0x120,-0xa4)+this['maxReconnectAttempts']+'\x20attempts:\x20'+_0x2cac56[_0x1150b6(-0x113,-0x145)]));}),this['socketAdapter']['on']('reconnect',()=>{this['connectionState']='connected';function _0x580fdf(_0x409d65,_0x441957){return _0xe923(_0x409d65-0x1d5,_0x441957);}this['reconnectAttempts']=0x0,this[_0x580fdf(0x3ee,0x390)][_0x580fdf(0x44f,0x452)](channel=>{function _0x26f614(_0x24db66,_0x339b7f){return _0xe923(_0x339b7f-0x14d,_0x24db66);}channel[_0x26f614(0x36a,0x379)]();});}),this['socketAdapter']['on'](_0x383152(-0x90,-0x63),_0x3ba1f5=>{function _0xd73d8e(_0x55e383,_0x3470d2){return _0xe923(_0x3470d2-0x2d5,_0x55e383);}const channel=this['channels'][_0xd73d8e(0x487,0x49e)](_0x3ba1f5['topic']);channel&&channel[_0xd73d8e(0x546,0x554)](_0xd73d8e(0x4fd,0x4ba),_0x3ba1f5);}),this[_0x383152(-0x6,0x48)]['on'](_0x383152(-0x91,-0xc),_0x258f59=>{function _0x4ac03b(_0x2f3ce1,_0x5a77f7){return _0xe923(_0x5a77f7-0x139,_0x2f3ce1);}const channel=this['channels'][_0x4ac03b(0x298,0x302)](_0x258f59[_0x4ac03b(0x421,0x3be)]);channel&&channel[_0x4ac03b(0x3e1,0x3b8)](_0x4ac03b(0x35c,0x375),_0x258f59);}),this['socketAdapter']['on']('presence',_0x521f54=>{const channel=this['channels']['get'](_0x521f54['topic']);channel&&channel['_trigger']('presence',_0x521f54);});}catch(_0xeabfe0){this[_0x383152(-0x82,-0xa8)]=_0x383152(0x5e,0x46),_0xbc1464(_0xeabfe0);}});}[_0x36b514(0x2fb,0x31b)](){this[_0xd7ee14(0x214,0x1f4)]&&(this[_0xd7ee14(0x214,0x1c8)]['disconnect'](),this[_0xd7ee14(0x185,0x11c)]=null);function _0xd7ee14(_0x44d6d1,_0x56921d){return _0xe923(_0x44d6d1- -0x7c,_0x56921d);}this['connectionState']='disconnected',this['channels'][_0xd7ee14(0x157,0x1e0)]();}['channel'](_0x2fb12c){if(this[_0x31f218(0x333,0x393)]['has'](_0x2fb12c))return this[_0x31f218(0x381,0x393)][_0x31f218(0x2f8,0x343)](_0x2fb12c);const channel=new RealtimeChannel(_0x2fb12c,this['socket']);this['channels'][_0x31f218(0x3c5,0x400)](_0x2fb12c,channel);function _0x31f218(_0x3519a6,_0x5613e7){return _0xe923(_0x5613e7-0x17a,_0x3519a6);}return this['connectionState']==='connected'&&channel[_0x31f218(0x390,0x35e)](),channel;}['removeChannel'](channel){const _0x2564cd=channel[_0x2333f5(0x171,0x1e5)];function _0x2333f5(_0x897e04,_0x5070fc){return _0xe923(_0x5070fc- -0xa0,_0x897e04);}this['channels']['has'](_0x2564cd)&&(this[_0x2333f5(0x12d,0x179)][_0x2333f5(0x11f,0x174)](_0x2564cd),channel[_0x2333f5(0x14c,0x199)]());}[_0x36b514(0x343,0x314)](){function _0x76bee1(_0x5a2a1e,_0x3807d5){return _0xe923(_0x5a2a1e-0x159,_0x3807d5);}this['channels'][_0x76bee1(0x3d3,0x43d)](channel=>{function _0x26715b(_0x4add61,_0x4a80f2){return _0xe923(_0x4add61- -0x11d,_0x4a80f2);}channel[_0x26715b(0x11c,0xfc)]();}),this['channels'][_0x76bee1(0x32c,0x32f)]();}[_0x36b514(0x2c7,0x2ba)](){function _0x5ba1e5(_0x57e3a5,_0x20c002){return _0xe923(_0x57e3a5-0x123,_0x20c002);}return Array['from'](this[_0x5ba1e5(0x33c,0x33c)][_0x5ba1e5(0x2b8,0x2f1)]());}[_0x36b514(0x2f4,0x2ee)](){function _0x4acceb(_0x2c276d,_0x1dad6b){return _0xe923(_0x1dad6b-0x133,_0x2c276d);}return this['connectionState']===_0x4acceb(0x31a,0x312)&&this['socketAdapter'][_0x4acceb(0x329,0x312)];}['getConnectionState'](){function _0x387f3e(_0x340708,_0x3f21fb){return _0xe923(_0x3f21fb- -0x35a,_0x340708);}return this[_0x387f3e(-0x18e,-0x1ba)];}['onConnectionStateChange'](_0x187355){function _0x346d6c(_0x5aae57,_0x2026d6){return _0xe923(_0x2026d6- -0xc2,_0x5aae57);}const _0x2c8a25=()=>_0x187355(this['connectionState']);return this['socketAdapter']&&(this['socketAdapter']['on']('connect',()=>{this[_0x40ca40(0x4e3,0x533)]='connected';function _0x40ca40(_0xcc3c9e,_0x5277e7){return _0xe923(_0xcc3c9e-0x343,_0x5277e7);}_0x2c8a25();}),this[_0x346d6c(0x1d5,0x1ce)]['on']('disconnect',()=>{this['connectionState']=_0x96ba3b(0x406,0x3b6);function _0x96ba3b(_0xe11d42,_0x4086ff){return _0xe923(_0x4086ff-0x1c5,_0xe11d42);}_0x2c8a25();}),this[_0x346d6c(0x1d0,0x1ce)]['on']('connect_error',()=>{this['connectionState']=_0x4710f5(0x539,0x5b3);function _0x4710f5(_0x57d2ae,_0x1a7db2){return _0xe923(_0x1a7db2-0x325,_0x57d2ae);}_0x2c8a25();})),()=>{function _0x33a0c3(_0x41bc10,_0x44c758){return _0xe923(_0x41bc10- -0x322,_0x44c758);}this[_0x33a0c3(-0x92,-0x10)]&&(this['socketAdapter'][_0x33a0c3(-0xd2,-0xc5)]('connect',_0x2c8a25),this[_0x33a0c3(-0x92,-0xfa)]['off'](_0x33a0c3(-0x153,-0x154),_0x2c8a25),this['socketAdapter'][_0x33a0c3(-0xd2,-0x117)](_0x33a0c3(-0x13a,-0xf1),_0x2c8a25));};}[_0x36b514(0x308,0x36c)](){function _0x213ad0(_0x13a79c,_0xa95a4d){return _0xe923(_0x13a79c- -0x185,_0xa95a4d);}if(!this[_0x213ad0(0x28,0xa9)]['heartbeatInterval']||!this['socketAdapter'])return;const interval=setInterval(()=>{function _0x1b79ce(_0x30e85e,_0xf39123){return _0xe923(_0x30e85e-0x1d4,_0xf39123);}this[_0x1b79ce(0x464,0x4ad)]?.[_0x1b79ce(0x3b3,0x350)]?this[_0x1b79ce(0x464,0x46f)]['emit'](_0x1b79ce(0x35e,0x344),{'timestamp':Date['now']()}):clearInterval(interval);},this['options'][_0x213ad0(0xe9,0xae)]);}[_0x36b514(0x398,0x32e)](){function _0x23e98f(_0x5053fe,_0x47a914){return _0xe923(_0x47a914- -0x323,_0x5053fe);}return this[_0x23e98f(-0x117,-0x122)];}}class FunctionsClient{constructor(_0x110b9f){this['httpClient']=_0x110b9f;}async['invoke'](_0x4ea5fa,_0x8ef268){function _0x3bcdaa(_0x4842ee,_0x17c67b){return _0xe923(_0x17c67b- -0x3b0,_0x4842ee);}try{const _0x476d9a=_0x8ef268?.[_0x3bcdaa(-0x1bd,-0x158)]||'POST',headers={'Content-Type':'application/json',..._0x8ef268?.[_0x3bcdaa(-0x225,-0x204)]};let response;const _0x5d1d70=_0x3bcdaa(-0x109,-0x123)+_0x4ea5fa;switch(_0x476d9a[_0x3bcdaa(-0x17e,-0x1fe)]()){case'GET':response=await this[_0x3bcdaa(-0x12e,-0x138)]['get'](_0x5d1d70,{'headers':headers,'params':_0x8ef268?.[_0x3bcdaa(-0x1f2,-0x19d)]});break;case'POST':response=await this['httpClient'][_0x3bcdaa(-0x16d,-0x166)](_0x5d1d70,_0x8ef268?.[_0x3bcdaa(-0x1a1,-0x19d)],{'headers':headers});break;case'PUT':response=await this['httpClient'][_0x3bcdaa(-0x16e,-0x1c7)](_0x5d1d70,_0x8ef268?.['body'],{'headers':headers});break;case'PATCH':response=await this[_0x3bcdaa(-0xac,-0x138)]['patch'](_0x5d1d70,_0x8ef268?.['body'],{'headers':headers});break;case'DELETE':response=await this[_0x3bcdaa(-0x15d,-0x138)][_0x3bcdaa(-0x124,-0x19c)](_0x5d1d70,{'headers':headers,'data':_0x8ef268?.[_0x3bcdaa(-0x1d9,-0x19d)]});break;default:throw new EBaaSError('Unsupported\x20HTTP\x20method:\x20'+_0x476d9a,0x190);}return{'data':response['data'],'error':null};}catch(_0x104243){return{'data':null,'error':_0x104243 instanceof EBaaSError?_0x104243:new EBaaSError(_0x104243 instanceof Error?_0x104243['message']:_0x3bcdaa(-0x11d,-0x11a),0x0,_0x104243)};}}async[_0x36b514(0x381,0x39b)](){function _0x3d2e5e(_0x3316d3,_0xd62096){return _0xe923(_0x3316d3- -0x3b3,_0xd62096);}try{const response=await this[_0x3d2e5e(-0x13b,-0x102)][_0x3d2e5e(-0x1ea,-0x1d2)]('/functions/v1');return{'data':response[_0x3d2e5e(-0x22a,-0x25b)],'error':null};}catch(_0x3afaa6){return{'data':null,'error':_0x3afaa6 instanceof EBaaSError?_0x3afaa6:new EBaaSError(_0x3afaa6 instanceof Error?_0x3afaa6['message']:_0x3d2e5e(-0x124,-0x172),0x0,_0x3afaa6)};}}async[_0x36b514(0x2f5,0x34e)](_0x5c3559){function _0x54b8ea(_0x299a15,_0xcd1a87){return _0xe923(_0xcd1a87-0x2f4,_0x299a15);}try{const response=await this[_0x54b8ea(0x53e,0x56c)]['get']('/functions/v1/'+_0x5c3559+_0x54b8ea(0x571,0x585));return{'data':response[_0x54b8ea(0x4b4,0x47d)],'error':null};}catch(_0x310e23){return{'data':null,'error':_0x310e23 instanceof EBaaSError?_0x310e23:new EBaaSError(_0x310e23 instanceof Error?_0x310e23['message']:'Failed\x20to\x20get\x20function',0x0,_0x310e23)};}}async[_0x36b514(0x3a7,0x400)](_0x5d6b26,_0x3adf11){function _0x47a002(_0x2f3401,_0xe0a142){return _0xe923(_0xe0a142-0x1ae,_0x2f3401);}try{const _0x526ab9=new FormData();if(_0x3adf11['code']instanceof File)_0x526ab9[_0x47a002(0x41f,0x3ed)]('code',_0x3adf11['code']);else typeof _0x3adf11['code']===_0x47a002(0x323,0x35f)&&_0x526ab9[_0x47a002(0x466,0x3ed)]('code',new Blob([_0x3adf11[_0x47a002(0x45c,0x416)]],{'type':'text/plain'}),'index.ts');_0x3adf11['entrypoint']&&_0x526ab9['append']('entrypoint',_0x3adf11[_0x47a002(0x3dc,0x401)]);_0x3adf11[_0x47a002(0x372,0x38f)]&&_0x526ab9['append'](_0x47a002(0x3ff,0x38f),JSON[_0x47a002(0x351,0x3bd)](_0x3adf11[_0x47a002(0x333,0x38f)]));_0x3adf11[_0x47a002(0x3d2,0x443)]&&_0x526ab9['append'](_0x47a002(0x465,0x443),JSON['stringify'](_0x3adf11[_0x47a002(0x4c7,0x443)]));_0x3adf11['verify']!==undefined&&_0x526ab9['append']('verify',String(_0x3adf11[_0x47a002(0x4aa,0x42c)]));const response=await this[_0x47a002(0x46b,0x426)][_0x47a002(0x384,0x3f8)](_0x47a002(0x438,0x43b)+_0x5d6b26+_0x47a002(0x454,0x3cc),_0x526ab9,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response['data'],'error':null};}catch(_0x394bb9){return{'data':null,'error':_0x394bb9 instanceof EBaaSError?_0x394bb9:new EBaaSError(_0x394bb9 instanceof Error?_0x394bb9[_0x47a002(0x363,0x357)]:'Failed\x20to\x20deploy\x20function',0x0,_0x394bb9)};}}async['delete'](_0x5592fb){function _0x42c87e(_0x4aade2,_0x42750b){return _0xe923(_0x42750b-0x2f,_0x4aade2);}try{const response=await this['httpClient'][_0x42c87e(0x204,0x243)](_0x42c87e(0x2f9,0x2bc)+_0x5592fb);return{'data':response[_0x42c87e(0x160,0x1b8)],'error':null};}catch(_0x31a0af){return{'data':null,'error':_0x31a0af instanceof EBaaSError?_0x31a0af:new EBaaSError(_0x31a0af instanceof Error?_0x31a0af['message']:_0x42c87e(0x1e3,0x247),0x0,_0x31a0af)};}}async['updateEnv'](_0x5317b0,_0x57174d){function _0x5147f3(_0x3a1edb,_0xdcf44c){return _0xe923(_0xdcf44c- -0x265,_0x3a1edb);}try{const response=await this[_0x5147f3(0x1c,0x13)]['put']('/functions/v1/'+_0x5317b0+'/env',{'env':_0x57174d});return{'data':response['data'],'error':null};}catch(_0x4cef77){return{'data':null,'error':_0x4cef77 instanceof EBaaSError?_0x4cef77:new EBaaSError(_0x4cef77 instanceof Error?_0x4cef77['message']:_0x5147f3(-0xf5,-0x6a),0x0,_0x4cef77)};}}async['getLogs'](_0x30e0ed,_0x2ad1c8){function _0x29e9b3(_0x51c215,_0x943bc7){return _0xe923(_0x943bc7- -0x31b,_0x51c215);}try{const _0x3d2942=new URLSearchParams();_0x2ad1c8?.[_0x29e9b3(-0x106,-0x109)]&&_0x3d2942[_0x29e9b3(-0x12c,-0xdc)]('limit',String(_0x2ad1c8[_0x29e9b3(-0xfb,-0x109)]));_0x2ad1c8?.[_0x29e9b3(-0x8a,-0xaa)]&&_0x3d2942['append'](_0x29e9b3(-0x11d,-0xaa),String(_0x2ad1c8[_0x29e9b3(-0xd8,-0xaa)]));_0x2ad1c8?.['level']&&_0x3d2942[_0x29e9b3(-0xf3,-0xdc)]('level',_0x2ad1c8[_0x29e9b3(-0x148,-0x130)]);const _0x38ca27=_0x29e9b3(-0x99,-0x8e)+_0x30e0ed+_0x29e9b3(-0x1e3,-0x18e)+(_0x3d2942[_0x29e9b3(-0xeb,-0x14a)]()?'?'+_0x3d2942[_0x29e9b3(-0x18f,-0x14a)]():''),response=await this['httpClient'][_0x29e9b3(-0x1ba,-0x152)](_0x38ca27);return{'data':response[_0x29e9b3(-0x15a,-0x192)],'error':null};}catch(_0x2e9bfb){return{'data':null,'error':_0x2e9bfb instanceof EBaaSError?_0x2e9bfb:new EBaaSError(_0x2e9bfb instanceof Error?_0x2e9bfb['message']:_0x29e9b3(-0x1b4,-0x135),0x0,_0x2e9bfb)};}}async['getMetrics'](_0x788087,_0xf4cdd4){function _0x2faeb9(_0x1f7501,_0x57ea5c){return _0xe923(_0x57ea5c- -0x1f3,_0x1f7501);}try{const _0x164350=new URLSearchParams();_0xf4cdd4?.[_0x2faeb9(0xc3,0x6f)]&&_0x164350[_0x2faeb9(0xb3,0x4c)]('period',_0xf4cdd4['period']);const _0x46d165=_0x2faeb9(0x44,0x9a)+_0x788087+_0x2faeb9(0xc1,0x3c)+(_0x164350[_0x2faeb9(-0xa9,-0x22)]()?'?'+_0x164350[_0x2faeb9(-0x55,-0x22)]():''),response=await this[_0x2faeb9(0x3d,0x85)]['get'](_0x46d165);return{'data':response[_0x2faeb9(-0xc3,-0x6a)],'error':null};}catch(_0x274e59){return{'data':null,'error':_0x274e59 instanceof EBaaSError?_0x274e59:new EBaaSError(_0x274e59 instanceof Error?_0x274e59['message']:_0x2faeb9(-0x9,-0x31),0x0,_0x274e59)};}}}class EBaaSClient{constructor(_0x3f9fd6,_0x18213c,_0x35fb89){this[_0x3cd155(-0x10a,-0x174)]=_0x35fb89,this[_0x3cd155(-0x78,-0xa9)]=new HttpClient({'url':_0x3f9fd6,'apiKey':_0x18213c,'timeout':0x7530,'headers':_0x35fb89?.[_0x3cd155(-0xf9,-0x87)]?.[_0x3cd155(-0x1eb,-0x175)]}),this['auth']=new AuthClient(this[_0x3cd155(-0x10a,-0xa9)],_0x35fb89?.[_0x3cd155(-0x8b,-0xa4)]?.[_0x3cd155(-0x161,-0x18d)]);function _0x3cd155(_0x2ed95a,_0x4d46b1){return _0xe923(_0x4d46b1- -0x321,_0x2ed95a);}this['database']=new DatabaseClient(this[_0x3cd155(-0x7d,-0xa9)],_0x35fb89?.[_0x3cd155(-0x12e,-0xa4)]?.[_0x3cd155(-0x154,-0x18d)]),this['storage']=new StorageClient(this[_0x3cd155(-0x87,-0xa9)]),this[_0x3cd155(-0xab,-0xa5)]=new RealtimeClient(_0x3f9fd6,_0x18213c,_0x35fb89?.[_0x3cd155(-0xc8,-0xa5)]),this['functions']=new FunctionsClient(this['httpClient']),this['initializeCustomDatabase']();}[_0x36b514(0x2d3,0x2d5)](_0xe8c080){return this['database']['from'](_0xe8c080);}[_0x36b514(0x387,0x32c)](_0x1bc956,_0x194f85){function _0x4644ef(_0x789f83,_0x570b98){return _0xe923(_0x789f83- -0x17b,_0x570b98);}return this['database'][_0x4644ef(0xe0,0x154)](_0x1bc956,_0x194f85);}[_0x36b514(0x3c8,0x3bb)](_0x16d7b9){function _0x50fcad(_0x323d6f,_0x130bfd){return _0xe923(_0x323d6f-0x194,_0x130bfd);}return this[_0x50fcad(0x428,0x3e4)]['from'](_0x16d7b9);}[_0x36b514(0x352,0x383)](_0x445336){return this['realtime']['channel'](_0x445336);}['invoke'](_0x1ec717,_0x96c2df){function _0x44ec31(_0x35f456,_0x93be23){return _0xe923(_0x93be23-0x366,_0x35f456);}return this['functions'][_0x44ec31(0x578,0x4f8)](_0x1ec717,_0x96c2df);}async['initializeCustomDatabase'](){function _0x5870c0(_0xd884e9,_0x5e3999){return _0xe923(_0xd884e9-0x37e,_0x5e3999);}if(this[_0x5870c0(0x52b,0x52a)]?.['database']?.['autoDetectCustomDatabase'])try{await this[_0x5870c0(0x5fb,0x650)][_0x5870c0(0x619,0x69b)]();}catch(_0x55d507){console[_0x5870c0(0x593,0x581)]('Failed to initialize custom database detection:',_0x55d507);}}async['setWorkspaceId'](_0x33ed04){function _0x33a28d(_0x3251a4,_0x90d81f){return _0xe923(_0x90d81f- -0x20c,_0x3251a4);}this['auth']['setWorkspaceId'](_0x33ed04),this['database'][_0x33a28d(0x9c,0x31)](_0x33ed04),this[_0x33a28d(-0x1,-0x5f)]?.[_0x33a28d(0x78,0x71)]?.['autoDetectCustomDatabase']&&await this[_0x33a28d(0xe3,0x71)]['initialize']();}async['configureCustomDatabase'](_0x330091){await this['database']['configureCustomDatabase'](_0x330091);}[_0x36b514(0x2ea,0x296)](){function _0x5be215(_0x59a663,_0xa04b37){return _0xe923(_0x59a663-0x24c,_0xa04b37);}return this[_0x5be215(0x4c9,0x512)][_0x5be215(0x40a,0x3b0)]();}}function createClient(_0x1738fc,_0xa107e,_0x3dffb5){return new EBaaSClient(_0x1738fc,_0xa107e,_0x3dffb5);}const version=_0x36b514(0x325,0x2ae);exports[_0x36b514(0x37d,0x380)]=AuthClient,exports[_0x36b514(0x2e1,0x361)]=CustomDatabaseManager,exports['DatabaseClient']=DatabaseClient,exports[_0x36b514(0x322,0x29a)]=EBaaSClient,exports['EBaaSError']=EBaaSError,exports['FunctionsClient']=FunctionsClient,exports[_0x36b514(0x3b7,0x41d)]=HttpClient,exports['QueryBuilder']=QueryBuilder,exports[_0x36b514(0x3b0,0x429)]=RealtimeChannel,exports['RealtimeClient']=RealtimeClient,exports['StorageBucket']=StorageBucket,exports[_0x36b514(0x2e5,0x274)]=StorageClient,exports['createClient']=createClient,exports['version']=version;
1
+ 'use strict';(function(stringArrayFunction,comparisonValue){function _0xdaaff6(_0x25c8b3,_0x279c24){return _0x1cc1(_0x25c8b3- -0x18b,_0x279c24);}const stringArray=stringArrayFunction();while(!![]){try{const _0x44f560=parseInt(_0xdaaff6(-0x34,-0xaa))/0x1+parseInt(_0xdaaff6(-0x4c,-0xbf))/0x2*(-parseInt(_0xdaaff6(0x62,0xd1))/0x3)+-parseInt(_0xdaaff6(0xa3,0xe9))/0x4+parseInt(_0xdaaff6(0xb3,0x95))/0x5*(parseInt(_0xdaaff6(0x6,0x26))/0x6)+-parseInt(_0xdaaff6(0xb,-0x55))/0x7*(parseInt(_0xdaaff6(0x72,0xa1))/0x8)+parseInt(_0xdaaff6(0x61,0xd3))/0x9+-parseInt(_0xdaaff6(0x2e,0x52))/0xa*(-parseInt(_0xdaaff6(0x2a,-0x2b))/0xb);if(_0x44f560===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x89e0b){stringArray['push'](stringArray['shift']());}}}(_0x5014,0xd0420));var axios=require('axios');class EBaaSError extends Error{constructor(_0x1f1e26,status=0x0,_0x57daed){super(_0x1f1e26),this[_0x2c3f67(0x10a,0x146)]='EBaaSError';function _0x2c3f67(_0x5bd21d,_0x4e4db5){return _0x1cc1(_0x5bd21d- -0x34,_0x4e4db5);}this['status']=status,this['details']=_0x57daed,Error[_0x2c3f67(0x12a,0x18f)]&&Error[_0x2c3f67(0x12a,0x197)](this,EBaaSError);}['toJSON'](){function _0x36455f(_0x190aab,_0x1c635e){return _0x1cc1(_0x1c635e-0x8e,_0x190aab);}return{'name':this[_0x36455f(0x148,0x1cc)],'message':this[_0x36455f(0x224,0x1c5)],'status':this[_0x36455f(0x1d2,0x201)],'details':this[_0x36455f(0x16d,0x1c7)],'stack':this['stack']};}[_0x2d9ed0(0x36c,0x382)](){function _0x13846c(_0x48f1d6,_0x5f1277){return _0x1cc1(_0x48f1d6- -0x354,_0x5f1277);}return this['name']+':\x20'+this[_0x13846c(-0x21d,-0x1c4)]+_0x13846c(-0x1ae,-0x147)+this[_0x13846c(-0x1e1,-0x1d0)]+')';}}class HttpClient{constructor(config){this['baseURL']=config['url'];function _0x5f0db6(_0x265f75,_0x4a9d96){return _0x1cc1(_0x4a9d96- -0x22c,_0x265f75);}this[_0x5f0db6(0x1e,-0x52)]=config[_0x5f0db6(-0x5a,-0x52)],this['client']=axios[_0x5f0db6(-0xce,-0xac)]({'baseURL':this[_0x5f0db6(0x34,-0x39)],'timeout':config['timeout']||0x2710,'headers':{'Content-Type':'application/json','apikey':this[_0x5f0db6(0x1,-0x52)],...config[_0x5f0db6(0x6a,-0xc)]}}),this['setupInterceptors']();}['setupInterceptors'](){function _0x671af6(_0x1739d6,_0x2528b0){return _0x1cc1(_0x1739d6-0x10d,_0x2528b0);}this[_0x671af6(0x2f7,0x2f4)][_0x671af6(0x331,0x2fb)]['request']['use'](config=>{return config;},_0x1a928c=>{function _0x3e9fe9(_0x5a6b3d,_0x3a3569){return _0x1cc1(_0x3a3569- -0x2ea,_0x5a6b3d);}return Promise[_0x3e9fe9(-0xbc,-0xe8)](new EBaaSError('Request\x20failed',0x0,_0x1a928c));}),this[_0x671af6(0x2f7,0x301)][_0x671af6(0x331,0x2b6)][_0x671af6(0x318,0x290)][_0x671af6(0x2cc,0x277)](response=>{return response;},_0x401160=>{const status=_0x401160[_0x1556b1(-0xd6,-0x140)]?.[_0x1556b1(-0x16e,-0x1dc)]||0x0,_0x1e82aa=_0x401160[_0x1556b1(-0xd6,-0xed)]?.['data']?.[_0x1556b1(-0x1aa,-0x194)]||_0x401160[_0x1556b1(-0x1aa,-0x14a)]||_0x1556b1(-0x191,-0x1b5),_0x18823a=_0x401160[_0x1556b1(-0xd6,-0x109)]?.['data']||_0x401160;function _0x1556b1(_0xebbe49,_0x3b9b19){return _0x1cc1(_0xebbe49- -0x2e1,_0x3b9b19);}return Promise[_0x1556b1(-0xdf,-0x138)](new EBaaSError(_0x1e82aa,status,_0x18823a));});}async[_0x2d9ed0(0x3e9,0x37b)](_0xb0f5cb,config){function _0x5186b4(_0x23e571,_0x458f93){return _0x1cc1(_0x23e571-0x2d3,_0x458f93);}try{const response=await this[_0x5186b4(0x4bd,0x43e)]['get'](_0xb0f5cb,config);return{'data':response['data'],'status':response[_0x5186b4(0x446,0x47e)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x27c418){throw this['handleError'](_0x27c418);}}async[_0x2d9ed0(0x3b1,0x39a)](_0x67ef13,data,config){function _0x4918dc(_0x5262d5,_0x399f26){return _0x1cc1(_0x399f26-0x239,_0x5262d5);}try{const response=await this[_0x4918dc(0x44c,0x423)][_0x4918dc(0x3f3,0x3d9)](_0x67ef13,data,config);return{'data':response[_0x4918dc(0x481,0x440)],'status':response[_0x4918dc(0x369,0x3ac)],'statusText':response[_0x4918dc(0x346,0x380)],'headers':response[_0x4918dc(0x46b,0x459)]};}catch(_0x4707ea){throw this['handleError'](_0x4707ea);}}async['put'](_0x158647,data,config){function _0x5fb055(_0x4c78f0,_0x1919ee){return _0x1cc1(_0x1919ee-0x30c,_0x4c78f0);}try{const response=await this['client']['put'](_0x158647,data,config);return{'data':response[_0x5fb055(0x4bc,0x513)],'status':response[_0x5fb055(0x4e9,0x47f)],'statusText':response[_0x5fb055(0x3ef,0x453)],'headers':response['headers']};}catch(_0x2aed93){throw this[_0x5fb055(0x580,0x508)](_0x2aed93);}}async['patch'](_0x45cd15,data,config){function _0x37e221(_0xbcf1fb,_0x711878){return _0x1cc1(_0x711878- -0x2f,_0xbcf1fb);}try{const response=await this['client']['patch'](_0x45cd15,data,config);return{'data':response[_0x37e221(0x1ab,0x1d8)],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x34c81b){throw this['handleError'](_0x34c81b);}}async['delete'](_0x3f1a92,config){function _0x447ab1(_0x39dc53,_0x5a4d66){return _0x1cc1(_0x5a4d66- -0x2bd,_0x39dc53);}try{const response=await this['client']['delete'](_0x3f1a92,config);return{'data':response[_0x447ab1(-0xed,-0xb6)],'status':response[_0x447ab1(-0xf3,-0x14a)],'statusText':response['statusText'],'headers':response[_0x447ab1(-0x1c,-0x9d)]};}catch(_0x27395a){throw this[_0x447ab1(-0x144,-0xc1)](_0x27395a);}}['setAuthToken'](_0x3bcb5c){this['client']['defaults']['headers']['common']['Authorization']='Bearer\x20'+_0x3bcb5c;}['removeAuthToken'](){delete this[_0x2dd987(0x5f6,0x5a9)]['defaults']['headers'][_0x2dd987(0x569,0x5f1)]['Authorization'];function _0x2dd987(_0x384e86,_0x523afc){return _0x1cc1(_0x523afc-0x3bf,_0x384e86);}this[_0x2dd987(0x52e,0x5a9)]['defaults']['headers'][_0x2dd987(0x5e2,0x5f1)]['Authorization']=_0x2dd987(0x61a,0x59d)+this['apiKey'];}[_0x2d9ed0(0x40d,0x417)](_0x5f5484){function _0x31b7bf(_0x53859e,_0x1ffa7e){return _0x1cc1(_0x1ffa7e- -0x32,_0x53859e);}if(_0x5f5484 instanceof EBaaSError)return _0x5f5484;return new EBaaSError(_0x5f5484[_0x31b7bf(0xc4,0x105)]||'HTTP\x20request\x20failed',_0x5f5484['status']||0x0,_0x5f5484);}}class AuthClient{constructor(_0x2a5e2d,_0x4f536c){this[_0x2c0741(0x40,0x7c)]=null,this['httpClient']=_0x2a5e2d;function _0x2c0741(_0x20b923,_0x1a4df2){return _0x1cc1(_0x20b923- -0x115,_0x1a4df2);}this['workspaceId']=_0x4f536c,this['loadSession']();}async['signUp'](data){function _0x4ffcf2(_0x396021,_0x3abe3e){return _0x1cc1(_0x396021-0x1f5,_0x3abe3e);}try{const response=await this['httpClient'][_0x4ffcf2(0x395,0x31b)]('/auth/v1/signup',data);return response['data'][_0x4ffcf2(0x380,0x3f9)]&&this['setSessionInternal'](response[_0x4ffcf2(0x3fc,0x47f)]['session']),response[_0x4ffcf2(0x3fc,0x3cb)];}catch(_0x23f628){throw this[_0x4ffcf2(0x349,0x334)](_0x23f628);}}async[_0x2d9ed0(0x416,0x476)](data){function _0x28fa23(_0xafa13a,_0x44f812){return _0x1cc1(_0x44f812- -0x3a8,_0xafa13a);}try{const headers={};this['workspaceId']&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this['httpClient']['post']('/auth/v1/sdk/signin',data,{'headers':headers});return response[_0x28fa23(-0x17e,-0x1a1)][_0x28fa23(-0x247,-0x21d)]&&this[_0x28fa23(-0x28b,-0x242)](response['data'][_0x28fa23(-0x285,-0x21d)]),response['data'];}catch(_0x44811b){throw this['handleAuthError'](_0x44811b);}}async[_0x2d9ed0(0x42d,0x3f6)](){function _0x43be53(_0x1c815a,_0xb3153b){return _0x1cc1(_0x1c815a-0x2c8,_0xb3153b);}try{await this['httpClient']['post']('/auth/v1/signout'),this[_0x43be53(0x4fd,0x500)]();}catch(_0x1eab0f){this[_0x43be53(0x4fd,0x4a4)]();throw this[_0x43be53(0x41c,0x432)](_0x1eab0f);}}async[_0x2d9ed0(0x36b,0x344)](){if(!this[_0x2c5b14(0x2a3,0x2d3)]?.[_0x2c5b14(0x2ff,0x37d)])return null;function _0x2c5b14(_0x557bba,_0x22f3ce){return _0x1cc1(_0x557bba-0x14e,_0x22f3ce);}try{const response=await this[_0x2c5b14(0x2f1,0x372)][_0x2c5b14(0x326,0x304)](_0x2c5b14(0x335,0x3af));return response['data'][_0x2c5b14(0x2be,0x2b1)];}catch(_0x1ecb09){if(_0x1ecb09 instanceof EBaaSError&&_0x1ecb09[_0x2c5b14(0x2c1,0x330)]===0x191)return this[_0x2c5b14(0x383,0x408)](),null;throw this['handleAuthError'](_0x1ecb09);}}async[_0x2d9ed0(0x390,0x310)](){function _0x5c62a8(_0x19ec1c,_0x5d055a){return _0x1cc1(_0x5d055a-0x7,_0x19ec1c);}if(!this['currentSession']?.['refresh_token'])return null;try{const response=await this['httpClient']['post']('/auth/v1/refresh',{'refresh_token':this['currentSession']['refresh_token']});if(response['data'][_0x5c62a8(0x16c,0x192)])return this['setSession'](response['data'][_0x5c62a8(0x1f7,0x192)]),response[_0x5c62a8(0x1e0,0x20e)]['session'];return null;}catch(_0x1b6ccf){this[_0x5c62a8(0x233,0x23c)]();throw this['handleAuthError'](_0x1b6ccf);}}async[_0x2d9ed0(0x3f5,0x45d)](_0x2e8607){function _0x491f07(_0x34de8b,_0x394240){return _0x1cc1(_0x34de8b- -0x50,_0x394240);}try{await this['httpClient']['post']('/auth/v1/reset-password',{'email':_0x2e8607});}catch(_0x255428){throw this[_0x491f07(0x104,0x16f)](_0x255428);}}async['updateUser'](data){function _0x48bdab(_0x1e08c3,_0x321fe8){return _0x1cc1(_0x1e08c3-0x6c,_0x321fe8);}try{const response=await this['httpClient'][_0x48bdab(0x28a,0x2a0)]('/auth/v1/user',data);return response[_0x48bdab(0x273,0x2dd)][_0x48bdab(0x1dc,0x1d1)];}catch(_0x26f253){throw this[_0x48bdab(0x1c0,0x1cb)](_0x26f253);}}[_0x2d9ed0(0x35d,0x3e1)](){function _0x1727bd(_0x4266c2,_0x219175){return _0x1cc1(_0x219175-0x77,_0x4266c2);}return this[_0x1727bd(0x1d3,0x1cc)];}[_0x2d9ed0(0x41d,0x3ee)](_0x5046fb){this['currentSession']=_0x5046fb;function _0x4e45df(_0x7d7906,_0x4af624){return _0x1cc1(_0x7d7906-0x32,_0x4af624);}this[_0x4e45df(0x1d5,0x1a2)]['setAuthToken'](_0x5046fb[_0x4e45df(0x1e3,0x17d)]),typeof localStorage!==_0x4e45df(0x1b4,0x217)&&localStorage[_0x4e45df(0x21a,0x231)](_0x4e45df(0x1e8,0x163),JSON['stringify'](_0x5046fb));}['onAuthStateChange'](_0x177cce){return()=>{};}[_0x2d9ed0(0x419,0x453)](_0x42dd60){this['workspaceId']=_0x42dd60;}['setSessionInternal'](_0x2c634e){function _0x2b82aa(_0x134eb2,_0xf593fc){return _0x1cc1(_0xf593fc-0x7d,_0x134eb2);}this['currentSession']=_0x2c634e,this[_0x2b82aa(0x268,0x220)]['setAuthToken'](_0x2c634e['access_token']),typeof localStorage!==_0x2b82aa(0x1a7,0x1ff)&&localStorage['setItem']('ebaas.auth.session',JSON[_0x2b82aa(0x1ed,0x1be)](_0x2c634e));}[_0x2d9ed0(0x446,0x494)](){function _0x4a30eb(_0x3bc185,_0x4364e9){return _0x1cc1(_0x4364e9-0x3c6,_0x3bc185);}this['currentSession']=null,this['httpClient']['removeAuthToken'](),typeof localStorage!==_0x4a30eb(0x59c,0x548)&&localStorage['removeItem'](_0x4a30eb(0x558,0x57c));}['loadSession'](){function _0x4d688a(_0x5084ae,_0x2ee56b){return _0x1cc1(_0x5084ae- -0x3b9,_0x2ee56b);}if(typeof localStorage!==_0x4d688a(-0x237,-0x24f)){const _0x487909=localStorage['getItem'](_0x4d688a(-0x203,-0x225));if(_0x487909)try{const _0x1d058d=JSON['parse'](_0x487909);this['setSessionInternal'](_0x1d058d);}catch(_0x398a2c){this[_0x4d688a(-0x184,-0x160)]();}}}[_0x2d9ed0(0x365,0x33b)](_0x39d41a){if(_0x39d41a instanceof EBaaSError)return _0x39d41a;function _0x588f55(_0x548a5b,_0x2720c0){return _0x1cc1(_0x548a5b-0x236,_0x2720c0);}return new EBaaSError(_0x39d41a['message']||_0x588f55(0x413,0x46e),_0x39d41a['status']||0x0,_0x39d41a);}}class QueryBuilder{constructor(_0x557821,_0xfb5267,_0x5531b5,_0x5330d5){this[_0x34c433(-0x16b,-0x17e)]=_0x557821;function _0x34c433(_0x15a5bd,_0x3ff152){return _0x1cc1(_0x3ff152- -0x321,_0x15a5bd);}this[_0x34c433(-0x111,-0x178)]=_0xfb5267,this['schema']=_0x5531b5,this['workspaceId']=_0x5330d5,this['query']={'filters':[]};}['select'](_0xe39d8e='*',_0x5d6296){function _0x29cf52(_0x2810c1,_0x27d54d){return _0x1cc1(_0x2810c1-0x3e2,_0x27d54d);}return this[_0x29cf52(0x5e0,0x596)]['select']=_0xe39d8e,this;}[_0x2d9ed0(0x3c1,0x33f)](data,_0x3ddf8a){function _0x46b168(_0x4b0c96,_0x1bbe13){return _0x1cc1(_0x1bbe13-0x10d,_0x4b0c96);}return this['executeQuery']('POST',_0x46b168(0x28a,0x2c8)+this['table']+'?operation=insert',{'data':data,'options':_0x3ddf8a});}[_0x2d9ed0(0x3cb,0x37b)](data,_0x47e7f4){function _0x2ec773(_0x2a3a2c,_0x1c6e03){return _0x1cc1(_0x2a3a2c- -0x2c,_0x1c6e03);}return this['query'][_0x2ec773(0x16b,0xfd)]=data,this['query'][_0x2ec773(0x12c,0x115)]=_0x47e7f4,this;}['upsert'](data,_0x1bc05c){return this['executeQuery']('POST','/sdk/v1/'+this['table']+'?operation=upsert',{'data':data,'options':{..._0x1bc05c,'upsert':!![]}});}['delete'](_0x258a4f){this['query']['deleteOptions']=_0x258a4f;function _0x31581e(_0x22a440,_0x957d45){return _0x1cc1(_0x957d45-0x71,_0x22a440);}return this[_0x31581e(0x21a,0x26f)]['isDelete']=!![],this;}['eq'](_0x4b2289,_0x16f199){function _0x38e2af(_0x425082,_0x1ab011){return _0x1cc1(_0x1ab011-0x1f6,_0x425082);}return this[_0x38e2af(0x3bd,0x3f4)][_0x38e2af(0x2f1,0x340)]['push']({'column':_0x4b2289,'operator':'eq','value':_0x16f199}),this;}[_0x2d9ed0(0x38e,0x408)](_0x305547,_0x321aaa){function _0x552fa9(_0x3a35c7,_0x12a9f4){return _0x1cc1(_0x3a35c7-0x2e,_0x12a9f4);}return this[_0x552fa9(0x22c,0x1a8)]['filters'][_0x552fa9(0x170,0x183)]({'column':_0x305547,'operator':_0x552fa9(0x1ab,0x1bc),'value':_0x321aaa}),this;}['gt'](_0xdc734d,_0x20c06d){this[_0x22ccf2(-0x14,-0x85)]['filters']['push']({'column':_0xdc734d,'operator':'gt','value':_0x20c06d});function _0x22ccf2(_0x10ba40,_0x392fba){return _0x1cc1(_0x10ba40- -0x212,_0x392fba);}return this;}[_0x2d9ed0(0x373,0x3b1)](_0x4d00ac,_0x3a4205){function _0x21e348(_0x4129d4,_0x3e4764){return _0x1cc1(_0x4129d4- -0x263,_0x3e4764);}return this['query'][_0x21e348(-0x119,-0x159)]['push']({'column':_0x4d00ac,'operator':_0x21e348(-0x101,-0xa8),'value':_0x3a4205}),this;}['lt'](_0x45c6c1,_0x78cb3b){return this['query']['filters']['push']({'column':_0x45c6c1,'operator':'lt','value':_0x78cb3b}),this;}[_0x2d9ed0(0x39d,0x389)](_0x5a71da,_0x46ffcb){function _0x1f1943(_0x1701dc,_0x5b7001){return _0x1cc1(_0x5b7001-0xeb,_0x1701dc);}return this['query']['filters']['push']({'column':_0x5a71da,'operator':_0x1f1943(0x231,0x277),'value':_0x46ffcb}),this;}[_0x2d9ed0(0x414,0x3e9)](_0x39826a,_0x29cbd6){return this['query']['filters']['push']({'column':_0x39826a,'operator':'like','value':_0x29cbd6}),this;}[_0x2d9ed0(0x436,0x3ca)](_0x3bc5e4,_0x14ff70){function _0x4c06dc(_0x1214aa,_0x3a0770){return _0x1cc1(_0x1214aa-0x3bf,_0x3a0770);}return this[_0x4c06dc(0x5bd,0x616)][_0x4c06dc(0x509,0x49f)][_0x4c06dc(0x501,0x568)]({'column':_0x3bc5e4,'operator':_0x4c06dc(0x5e4,0x56a),'value':_0x14ff70}),this;}['is'](_0x35b156,_0x21ff9e){function _0x3914e0(_0xb745d4,_0x15df31){return _0x1cc1(_0x15df31- -0x13b,_0xb745d4);}return this[_0x3914e0(0x66,0xc3)]['filters']['push']({'column':_0x35b156,'operator':'is','value':_0x21ff9e}),this;}['in'](_0x2707f8,_0x5e5263){function _0xaad54e(_0x1b6e57,_0x18b8c1){return _0x1cc1(_0x18b8c1-0xdc,_0x1b6e57);}return this[_0xaad54e(0x2a8,0x2da)]['filters'][_0xaad54e(0x216,0x21e)]({'column':_0x2707f8,'operator':'in','value':_0x5e5263}),this;}['contains'](_0x527673,_0x41ec5f){function _0x199097(_0x493b15,_0x399712){return _0x1cc1(_0x399712-0xf0,_0x493b15);}return this[_0x199097(0x27d,0x2ee)]['filters'][_0x199097(0x1c5,0x232)]({'column':_0x527673,'operator':'contains','value':_0x41ec5f}),this;}[_0x2d9ed0(0x432,0x422)](_0x56a2e3){Object['entries'](_0x56a2e3)[_0x5bf32b(0x1fd,0x273)](([_0x12af96,_0x455042])=>{this['eq'](_0x12af96,_0x455042);});function _0x5bf32b(_0x23d8f0,_0x4b2f25){return _0x1cc1(_0x4b2f25-0x10f,_0x23d8f0);}return this;}[_0x2d9ed0(0x41f,0x428)](_0x53b542,_0x10ce8d){function _0x4f610a(_0x2025b7,_0x53239d){return _0x1cc1(_0x2025b7- -0x4c,_0x53239d);}return!this['query'][_0x4f610a(0x1c2,0x1fe)]&&(this[_0x4f610a(0x1b2,0x21d)][_0x4f610a(0x1c2,0x1cf)]=[]),this[_0x4f610a(0x1b2,0x19f)]['order']['push']({'column':_0x53b542,'ascending':_0x10ce8d?.[_0x4f610a(0x186,0x16a)]!==![]}),this;}[_0x2d9ed0(0x349,0x3c9)](count){return this['query']['limit']=count,this;}['range'](from,_0x3766ec){function _0x2dea41(_0x1dfdcd,_0x1211e7){return _0x1cc1(_0x1dfdcd-0x1ad,_0x1211e7);}return this['query'][_0x2dea41(0x3d6,0x3d0)]={'from':from,'to':_0x3766ec},this;}async[_0x2d9ed0(0x39a,0x39e)](){function _0xf4767c(_0x1fff8b,_0x35aa86){return _0x1cc1(_0x35aa86- -0x1ef,_0x1fff8b);}if(this['query']['updateData'])return this[_0xf4767c(0x5d,-0x6)]('PATCH',_0xf4767c(0x3c,-0x34)+this['table'],{'data':this['query']['updateData'],'options':this['query']['updateOptions'],'filters':this[_0xf4767c(-0x63,0xf)][_0xf4767c(-0x99,-0xa5)]});else return this[_0xf4767c(-0xd,0xf)]['isDelete']?this[_0xf4767c(-0x5a,-0x6)]('DELETE',_0xf4767c(0x4c,-0x34)+this[_0xf4767c(-0x37,-0x46)]+'?operation=delete',{'options':this[_0xf4767c(-0x11,0xf)][_0xf4767c(-0xb8,-0x32)],'filters':this['query'][_0xf4767c(-0x8d,-0xa5)]}):this[_0xf4767c(0x7b,-0x6)]('GET',_0xf4767c(-0x13,-0x34)+this['table']+'?operation=select',{'select':this[_0xf4767c(0x3e,0xf)]['select'],'filters':this['query']['filters'],'order':this['query'][_0xf4767c(0x58,0x1f)],'limit':this['query']['limit'],'range':this['query'][_0xf4767c(0x21,0x3a)]});}async['single'](){this[_0x589e13(-0x83,-0x5e)](0x1);function _0x589e13(_0x5ed4f8,_0x13d447){return _0x1cc1(_0x5ed4f8- -0x1bb,_0x13d447);}const result=await this[_0x589e13(-0x32,-0xf)]();return{'data':result[_0x589e13(0x4c,0x97)]?.[0x0]||null,'error':result[_0x589e13(-0x2b,-0x17)]};}async[_0x2d9ed0(0x3fa,0x47c)](_0x4b6732,_0x48a9fe,_0x18ba05){function _0x1c0892(_0x3dd93f,_0x5cde45){return _0x1cc1(_0x5cde45-0x236,_0x3dd93f);}try{let response;const headers={};this[_0x1c0892(0x3cd,0x3e2)]&&(headers['x-workspace-id']=this['workspaceId']);if(_0x4b6732==='GET'){const _0x5578c0=_0x48a9fe['split']('?'),_0x5119ff=_0x5578c0[0x0],existingParams=new URLSearchParams(_0x5578c0[0x1]||'');if(_0x18ba05[_0x1c0892(0x398,0x37f)])existingParams[_0x1c0892(0x3d2,0x42b)](_0x1c0892(0x3ce,0x37f),_0x18ba05['select']);_0x18ba05['filters']?.['length']&&_0x18ba05['filters']['forEach'](filter=>{function _0x1762f8(_0x3bb321,_0x5d4d01){return _0x1cc1(_0x5d4d01- -0x34c,_0x3bb321);}existingParams[_0x1762f8(-0x13e,-0x157)](filter[_0x1762f8(-0x1c3,-0x184)],filter['operator']+'.'+filter['value']);});if(_0x18ba05['order']?.['length']){const orderStr=_0x18ba05[_0x1c0892(0x497,0x444)]['map'](_0x35946c=>''+_0x35946c['column']+(_0x35946c[_0x1c0892(0x3f1,0x408)]?'.asc':_0x1c0892(0x39e,0x405)))[_0x1c0892(0x417,0x38f)](',');existingParams[_0x1c0892(0x3e6,0x42b)]('order',orderStr);}if(_0x18ba05[_0x1c0892(0x309,0x36e)])existingParams['append'](_0x1c0892(0x325,0x36e),_0x18ba05['limit']['toString']());_0x18ba05[_0x1c0892(0x4e0,0x45f)]&&(existingParams['append']('offset',_0x18ba05['range'][_0x1c0892(0x435,0x450)]['toString']()),existingParams['append'](_0x1c0892(0x31b,0x36e),(_0x18ba05['range']['to']-_0x18ba05[_0x1c0892(0x439,0x45f)][_0x1c0892(0x3ce,0x450)]+0x1)[_0x1c0892(0x3a1,0x391)]())),response=await this['httpClient'][_0x1c0892(0x394,0x40e)](_0x5119ff+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x4b6732==='DELETE'){const _0x1c24cd=_0x48a9fe['split']('?'),_0x4c6e91=_0x1c24cd[0x0],existingParams=new URLSearchParams(_0x1c24cd[0x1]||'');!existingParams[_0x1c0892(0x3a0,0x3a8)](_0x1c0892(0x44e,0x40c))&&existingParams['append']('operation',_0x1c0892(0x387,0x400));_0x18ba05['filters']?.['length']&&_0x18ba05[_0x1c0892(0x388,0x380)]['forEach'](filter=>{function _0x25d054(_0x3a8d8b,_0x37c200){return _0x1cc1(_0x3a8d8b- -0x3a9,_0x37c200);}existingParams[_0x25d054(-0x1b4,-0x150)](filter[_0x25d054(-0x1e1,-0x256)],filter[_0x25d054(-0x25a,-0x229)]+'.'+filter[_0x25d054(-0x1eb,-0x202)]);});const deleteUrl=_0x4c6e91+'?'+existingParams[_0x1c0892(0x321,0x391)]();console[_0x1c0892(0x4b2,0x455)]('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console['log']('\uD83D\uDD27 DELETE headers:',headers),console[_0x1c0892(0x3eb,0x455)]('\uD83D\uDD27 DELETE filtros originais:',_0x18ba05[_0x1c0892(0x3c4,0x380)]),response=await this['httpClient']['delete'](deleteUrl,{'headers':headers});}else{if(_0x4b6732==='PATCH'){const _0x568901=_0x48a9fe[_0x1c0892(0x493,0x41b)]('?'),_0x4f6429=_0x568901[0x0],existingParams=new URLSearchParams(_0x568901[0x1]||'');!existingParams['has']('operation')&&existingParams[_0x1c0892(0x461,0x42b)]('operation','update');_0x18ba05['filters']?.[_0x1c0892(0x4be,0x470)]&&_0x18ba05[_0x1c0892(0x30d,0x380)][_0x1c0892(0x31d,0x39a)](filter=>{function _0x5daf2(_0x45e6fd,_0x35ed0b){return _0x1cc1(_0x45e6fd- -0x19c,_0x35ed0b);}existingParams['append'](filter[_0x5daf2(0x2c,-0x4d)],filter[_0x5daf2(-0x4d,-0xaf)]+'.'+filter['value']);});_0x18ba05[_0x1c0892(0x3bf,0x41c)]?.[_0x1c0892(0x427,0x44c)]&&(headers['Prefer']=_0x18ba05['options']['prefer']);const updateUrl=_0x4f6429+'?'+existingParams[_0x1c0892(0x343,0x391)]();response=await this['httpClient']['patch'](updateUrl,_0x18ba05[_0x1c0892(0x498,0x43d)],{'headers':headers});}else{let _0x429e45=_0x18ba05[_0x1c0892(0x484,0x43d)];!headers['Prefer']&&(headers[_0x1c0892(0x350,0x3cb)]='return=representation'),_0x18ba05[_0x1c0892(0x414,0x41c)]?.[_0x1c0892(0x3b7,0x3c0)]&&(headers[_0x1c0892(0x42e,0x3cb)]=_0x1c0892(0x43a,0x44f)),_0x18ba05['dataArray']&&(_0x429e45=_0x18ba05['dataArray']),response=await this[_0x1c0892(0x447,0x3d9)]['post'](_0x48a9fe,_0x429e45,{'headers':headers});}}}return{'data':response[_0x1c0892(0x462,0x43d)],'error':null,'count':response[_0x1c0892(0x42b,0x456)]?.[_0x1c0892(0x459,0x3f7)]?parseInt(response[_0x1c0892(0x483,0x456)][_0x1c0892(0x3f8,0x3f7)]):undefined};}catch(_0x1a2cfb){return{'data':null,'error':_0x1a2cfb instanceof EBaaSError?_0x1a2cfb:new EBaaSError(_0x1a2cfb instanceof Error?_0x1a2cfb['message']:_0x1c0892(0x418,0x448),0x0,_0x1a2cfb)};}}}class CustomDatabaseManager{constructor(_0x4ebea5,_0x3c1dbd){this['httpClient']=_0x4ebea5,this['workspaceId']=_0x3c1dbd;}async[_0x2d9ed0(0x38a,0x346)](){function _0x378e1e(_0x3cd74e,_0x1358ab){return _0x1cc1(_0x3cd74e- -0x242,_0x1358ab);}if(!this[_0x378e1e(-0x96,-0x15)])return{'hasCustomDatabase':![]};try{const response=await this['httpClient'][_0x378e1e(-0x6a,0x11)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this['workspaceId']}});if(response[_0x378e1e(-0xcf,-0xa8)]===0xc8&&response['data']?.[_0x378e1e(-0xc8,-0x11d)]){const config=response[_0x378e1e(-0x3b,-0xc0)]['config'],_0x2be8c9={'host':config['postgresHost'],'port':config['postgresPort'],'database':config[_0x378e1e(-0xf5,-0x10f)],'username':config['postgresUsername'],'password':'','schema':config['postgresSchema'],'sslEnabled':config['sslEnabled']};return this[_0x378e1e(-0xb4,-0xb8)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x2be8c9},this['detectedConfig'];}}catch(_0x2cfd03){if(_0x2cfd03?.['status']===0x194)return this['detectedConfig']={'hasCustomDatabase':![]},this['detectedConfig'];console['warn']('Failed to detect custom database configuration:',_0x2cfd03);}return this['detectedConfig']={'hasCustomDatabase':![]},this[_0x378e1e(-0xb4,-0xeb)];}async[_0x2d9ed0(0x3d5,0x36d)](_0x42baff){function _0x4f9ad7(_0xfeb35,_0x13dc80){return _0x1cc1(_0xfeb35-0x128,_0x13dc80);}try{const response=await this['httpClient'][_0x4f9ad7(0x2c8,0x283)]('/admin/v1/workspace/custom-database/test-connection',_0x42baff,{'headers':this[_0x4f9ad7(0x2d4,0x2c5)]?{'X-Workspace-ID':this[_0x4f9ad7(0x2d4,0x2f2)]}:{}});return response[_0x4f9ad7(0x32f,0x3b3)];}catch(_0x3c6348){return{'success':![],'message':_0x3c6348?.['message']||_0x4f9ad7(0x360,0x370)};}}async[_0x2d9ed0(0x385,0x32b)](_0x2a385e){if(!this[_0x4393f0(0xdf,0x13e)])throw new Error('Workspace ID is required to configure custom database');const response=await this[_0x4393f0(0x1b1,0x135)][_0x4393f0(0x134,0x132)]('/admin/v1/workspace/custom-database',{'workspaceId':this[_0x4393f0(0x128,0x13e)],..._0x2a385e},{'headers':{'X-Workspace-ID':this['workspaceId']}}),config=response['data']['config'];function _0x4393f0(_0x5acd09,_0x254582){return _0x1cc1(_0x254582- -0x6e,_0x5acd09);}return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x2a385e},config;}async['removeCustomDatabase'](){if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');await this['httpClient']['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this['workspaceId']}}),this['detectedConfig']={'hasCustomDatabase':![]};}[_0x2d9ed0(0x3b8,0x3f4)](){return this['detectedConfig'];}[_0x2d9ed0(0x392,0x37a)](){return this['detectedConfig']?.['hasCustomDatabase']??![];}[_0x2d9ed0(0x420,0x449)](){function _0x473745(_0x348e84,_0x5a5767){return _0x1cc1(_0x5a5767- -0x1f2,_0x348e84);}return this['detectedConfig']?.[_0x473745(0xa,0x18)];}['setWorkspaceId'](_0xda1eb){function _0x122587(_0x1aa1aa,_0x213c16){return _0x1cc1(_0x213c16-0x1bd,_0x1aa1aa);}this['workspaceId']=_0xda1eb,this[_0x122587(0x2de,0x34b)]=undefined;}[_0x2d9ed0(0x3b9,0x335)](){function _0x62e7e3(_0x401528,_0x453b78){return _0x1cc1(_0x453b78-0xb4,_0x401528);}return this[_0x62e7e3(0x2a8,0x260)];}[_0x2d9ed0(0x38d,0x335)](){function _0x20fffa(_0x427792,_0x175990){return _0x1cc1(_0x427792- -0x25,_0x175990);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x20fffa(0x15c,0x149)](),'configDetails':this[_0x20fffa(0x169,0x127)]?.['credentials']?{'host':this['detectedConfig'][_0x20fffa(0x1e5,0x232)][_0x20fffa(0x117,0xed)],'port':this['detectedConfig']['credentials'][_0x20fffa(0x12d,0x1a3)],'database':this['detectedConfig'][_0x20fffa(0x1e5,0x1a9)][_0x20fffa(0x1a7,0x13c)],'schema':this['detectedConfig']['credentials'][_0x20fffa(0x1a4,0x175)]||'public','sslEnabled':this['detectedConfig'][_0x20fffa(0x1e5,0x1dd)][_0x20fffa(0x20e,0x232)]||![]}:undefined};}}class DatabaseClient{constructor(_0x83f18f,_0x1103bd){this['httpClient']=_0x83f18f,this['customDatabaseManager']=new CustomDatabaseManager(_0x83f18f,_0x1103bd);}[_0x2d9ed0(0x42b,0x424)](_0x3dd9e0){function _0x54e761(_0x4aa470,_0xa0942d){return _0x1cc1(_0x4aa470-0x293,_0xa0942d);}return new QueryBuilder(this[_0x54e761(0x436,0x4b7)],_0x3dd9e0,this['currentSchema'],this[_0x54e761(0x494,0x4ff)][_0x54e761(0x43b,0x479)]());}['rpc'](_0x2fa189,_0x28e7d3){function _0x2cbdb5(_0x448463,_0x11081f){return _0x1cc1(_0x448463-0x356,_0x11081f);}return this[_0x2cbdb5(0x4f9,0x4e7)][_0x2cbdb5(0x4f6,0x4cf)]('/rpc/'+_0x2fa189,_0x28e7d3);}[_0x2d9ed0(0x3da,0x43b)](_0x38e738){function _0x176f48(_0x42d677,_0x2ff6f5){return _0x1cc1(_0x2ff6f5- -0xf2,_0x42d677);}const _0x314f80=new DatabaseClient(this[_0x176f48(0x48,0xb1)],this['customDatabaseManager'][_0x176f48(0xf5,0xb6)]());return _0x314f80[_0x176f48(0x44,0x7a)]=_0x38e738,_0x314f80['customDatabaseManager']=this['customDatabaseManager'],_0x314f80;}async['detectCustomDatabase'](){function _0xb4a1d7(_0x2bf064,_0x578e90){return _0x1cc1(_0x578e90-0x275,_0x2bf064);}return this[_0xb4a1d7(0x44a,0x476)][_0xb4a1d7(0x44b,0x3ee)]();}async[_0x2d9ed0(0x346,0x2da)](_0x52d75b){return this['customDatabaseManager']['testConnection'](_0x52d75b);}async[_0x2d9ed0(0x385,0x332)](_0x2d2d24){function _0x477438(_0x47bcac,_0x59ebf1){return _0x1cc1(_0x47bcac-0x105,_0x59ebf1);}return this[_0x477438(0x306,0x282)]['configureCustomDatabase'](_0x2d2d24);}async['removeCustomDatabase'](){function _0x34548c(_0x491872,_0x4c5cb7){return _0x1cc1(_0x491872- -0x3ad,_0x4c5cb7);}return this[_0x34548c(-0x1ac,-0x187)]['removeCustomDatabase']();}['isUsingCustomDatabase'](){function _0x1f125c(_0x189792,_0x5a4055){return _0x1cc1(_0x189792-0x318,_0x5a4055);}return this['customDatabaseManager'][_0x1f125c(0x499,0x4db)]();}['getCustomDatabaseStatus'](){return this['customDatabaseManager']['getStatus']();}[_0x2d9ed0(0x419,0x496)](_0x31205b){this['customDatabaseManager']['setWorkspaceId'](_0x31205b);}async[_0x2d9ed0(0x434,0x4a1)](){function _0x1b3238(_0x908072,_0xb1935c){return _0x1cc1(_0x908072-0x42,_0xb1935c);}try{await this[_0x1b3238(0x243,0x22c)]['detectCustomDatabase']();}catch(_0x5ec993){console[_0x1b3238(0x25d,0x295)]('Failed to initialize custom database detection:',_0x5ec993);}}}class StorageBucket{constructor(_0x4629a6,bucketId){this['httpClient']=_0x4629a6;function _0x48b0a2(_0x4c7ffb,_0x33b3a2){return _0x1cc1(_0x33b3a2-0xc6,_0x4c7ffb);}this[_0x48b0a2(0x289,0x203)]=bucketId;}async['upload'](_0x4e6008,_0x17686e,_0x3dc09a){function _0x3a77d5(_0x2aa567,_0x3561b8){return _0x1cc1(_0x3561b8- -0x1e3,_0x2aa567);}try{const _0x21959e=new FormData();if(_0x17686e instanceof File)_0x21959e['append']('file',_0x17686e);else{if(_0x17686e instanceof Blob)_0x21959e[_0x3a77d5(0x5a,0x12)](_0x3a77d5(-0xe3,-0x5f),_0x17686e,_0x4e6008);else{if(_0x17686e instanceof ArrayBuffer)_0x21959e['append']('file',new Blob([_0x17686e]),_0x4e6008);else typeof _0x17686e==='string'&&_0x21959e[_0x3a77d5(-0x43,0x12)]('file',new Blob([_0x17686e],{'type':_0x3a77d5(0xc6,0x4c)}),_0x4e6008);}}_0x21959e[_0x3a77d5(0x26,0x12)]('path',_0x4e6008);_0x3dc09a?.['cacheControl']&&_0x21959e['append']('cacheControl',_0x3dc09a[_0x3a77d5(-0xa4,-0x30)]);_0x3dc09a?.[_0x3a77d5(-0x9,0x59)]&&_0x21959e[_0x3a77d5(-0x35,0x12)](_0x3a77d5(-0x4,0x59),_0x3dc09a['contentType']);_0x3dc09a?.['metadata']&&_0x21959e[_0x3a77d5(-0xe,0x12)](_0x3a77d5(-0x1a,-0x7b),JSON['stringify'](_0x3dc09a[_0x3a77d5(-0x19,-0x7b)]));const _0x55fd25=_0x3a77d5(0xc9,0x56)+this['bucketId']+'/files'+(_0x3dc09a?.['upsert']?'?upsert=true':''),response=await this[_0x3a77d5(-0xc2,-0x40)]['post'](_0x55fd25,_0x21959e,{'headers':{'Content-Type':_0x3a77d5(-0x20,-0x23)}});return{'data':response['data'],'error':null};}catch(_0x758307){return{'data':null,'error':_0x758307 instanceof EBaaSError?_0x758307:new EBaaSError(_0x758307 instanceof Error?_0x758307['message']:'Failed\x20to\x20upload\x20file',0x0,_0x758307)};}}async[_0x2d9ed0(0x43d,0x435)](_0x5ec4bc,_0x17ff35){function _0x369f1e(_0x561f00,_0x42eeec){return _0x1cc1(_0x42eeec-0x2fa,_0x561f00);}try{const _0x181e05=new URLSearchParams();_0x17ff35?.[_0x369f1e(0x474,0x481)]&&Object[_0x369f1e(0x453,0x497)](_0x17ff35['transform'])[_0x369f1e(0x41c,0x45e)](([_0x13384d,_0x2c6fad])=>{function _0x51c9c3(_0x1839ae,_0x678587){return _0x1cc1(_0x678587- -0x3c3,_0x1839ae);}_0x2c6fad!==undefined&&_0x181e05[_0x51c9c3(-0x1a1,-0x1ce)](_0x13384d,String(_0x2c6fad));});const _0x5df430=_0x369f1e(0x519,0x533)+this[_0x369f1e(0x440,0x437)]+_0x369f1e(0x482,0x4ca)+_0x5ec4bc+(_0x181e05[_0x369f1e(0x42b,0x455)]()?'?'+_0x181e05[_0x369f1e(0x477,0x455)]():''),response=await this['httpClient']['get'](_0x5df430,{'responseType':'blob'});return{'data':response['data'],'error':null};}catch(_0x1ed4e0){return{'data':null,'error':_0x1ed4e0 instanceof EBaaSError?_0x1ed4e0:new EBaaSError(_0x1ed4e0 instanceof Error?_0x1ed4e0['message']:'Failed\x20to\x20download\x20file',0x0,_0x1ed4e0)};}}async['list'](_0x14618d,_0x2adb55){function _0x4bb1b3(_0x3f0685,_0x2fc584){return _0x1cc1(_0x2fc584-0xb3,_0x3f0685);}try{const _0x2d7327=new URLSearchParams();_0x14618d&&_0x2d7327['append'](_0x4bb1b3(0x1b4,0x239),_0x14618d);_0x2adb55?.['limit']&&_0x2d7327[_0x4bb1b3(0x29f,0x2a8)]('limit',String(_0x2adb55[_0x4bb1b3(0x23e,0x1eb)]));_0x2adb55?.[_0x4bb1b3(0x21e,0x258)]&&_0x2d7327[_0x4bb1b3(0x2a1,0x2a8)]('offset',String(_0x2adb55[_0x4bb1b3(0x24a,0x258)]));_0x2adb55?.[_0x4bb1b3(0x278,0x238)]&&_0x2d7327[_0x4bb1b3(0x32c,0x2a8)](_0x4bb1b3(0x1b2,0x238),JSON['stringify'](_0x2adb55[_0x4bb1b3(0x2b0,0x238)]));_0x2adb55?.['search']&&_0x2d7327[_0x4bb1b3(0x29e,0x2a8)]('search',_0x2adb55[_0x4bb1b3(0x26e,0x27a)]);const _0x1bd955=_0x4bb1b3(0x327,0x2ec)+this[_0x4bb1b3(0x199,0x1f0)]+'/files'+(_0x2d7327[_0x4bb1b3(0x23b,0x20e)]()?'?'+_0x2d7327['toString']():''),response=await this[_0x4bb1b3(0x229,0x256)][_0x4bb1b3(0x259,0x28b)](_0x1bd955);return{'data':response['data'],'error':null};}catch(_0x15f9cf){return{'data':null,'error':_0x15f9cf instanceof EBaaSError?_0x15f9cf:new EBaaSError(_0x15f9cf instanceof Error?_0x15f9cf[_0x4bb1b3(0x1df,0x1ea)]:'Failed\x20to\x20list\x20files',0x0,_0x15f9cf)};}}async['remove'](_0xb2201a){function _0x25c3d5(_0x5cc73c,_0x54f1aa){return _0x1cc1(_0x54f1aa-0x340,_0x5cc73c);}try{const response=await this['httpClient']['delete']('/storage/buckets/'+this[_0x25c3d5(0x462,0x47d)]+_0x25c3d5(0x55c,0x520),{'data':{'paths':_0xb2201a}});return{'data':response['data'],'error':null};}catch(_0x4698a1){return{'data':null,'error':_0x4698a1 instanceof EBaaSError?_0x4698a1:new EBaaSError(_0x4698a1 instanceof Error?_0x4698a1['message']:'Failed\x20to\x20remove\x20files',0x0,_0x4698a1)};}}async['move'](fromPath,_0x19cdfc){function _0x44dcd7(_0xde467,_0x460989){return _0x1cc1(_0x460989- -0x1fd,_0xde467);}try{const response=await this[_0x44dcd7(-0x47,-0x5a)][_0x44dcd7(0x1b,-0x5d)](_0x44dcd7(0x64,0x3c)+this['bucketId']+_0x44dcd7(-0x11b,-0x94),{'sourceKey':fromPath,'destinationKey':_0x19cdfc});return{'data':response['data'],'error':null};}catch(_0x3f83af){return{'data':null,'error':_0x3f83af instanceof EBaaSError?_0x3f83af:new EBaaSError(_0x3f83af instanceof Error?_0x3f83af[_0x44dcd7(-0x66,-0xc6)]:_0x44dcd7(-0xe4,-0x8c),0x0,_0x3f83af)};}}async['copy'](fromPath,_0x1f5ebe){function _0x1640c8(_0x218cca,_0x5d53c6){return _0x1cc1(_0x5d53c6-0x1dd,_0x218cca);}try{const response=await this['httpClient']['post']('/storage/buckets/'+this[_0x1640c8(0x2cb,0x31a)]+_0x1640c8(0x37c,0x395),{'sourceKey':fromPath,'destinationKey':_0x1f5ebe});return{'data':response[_0x1640c8(0x45e,0x3e4)],'error':null};}catch(_0x4c9093){return{'data':null,'error':_0x4c9093 instanceof EBaaSError?_0x4c9093:new EBaaSError(_0x4c9093 instanceof Error?_0x4c9093[_0x1640c8(0x383,0x314)]:'Failed\x20to\x20copy\x20file',0x0,_0x4c9093)};}}async[_0x2d9ed0(0x3e4,0x398)](_0x3eb838,_0x32a2ac,_0x4b8930){function _0x2dcfab(_0x43f931,_0x2f2d9b){return _0x1cc1(_0x2f2d9b-0x2ca,_0x43f931);}try{const response=await this['httpClient']['post']('/storage/buckets/'+this['bucketId']+_0x2dcfab(0x425,0x49a)+_0x3eb838+_0x2dcfab(0x42d,0x41d),{'expiresIn':_0x32a2ac,..._0x4b8930});return{'data':response[_0x2dcfab(0x529,0x4d1)],'error':null};}catch(_0x58d24c){return{'data':null,'error':_0x58d24c instanceof EBaaSError?_0x58d24c:new EBaaSError(_0x58d24c instanceof Error?_0x58d24c[_0x2dcfab(0x3d2,0x401)]:'Failed\x20to\x20create\x20signed\x20URL',0x0,_0x58d24c)};}}[_0x2d9ed0(0x359,0x354)](_0x56c1c1,_0x35e71d){const _0x5562e2=new URLSearchParams();function _0xfc79cf(_0x3d93c3,_0x5cb1d6){return _0x1cc1(_0x3d93c3- -0x30c,_0x5cb1d6);}_0x35e71d?.['transform']&&Object['entries'](_0x35e71d['transform'])[_0xfc79cf(-0x1a8,-0x140)](([_0xdc9650,_0x2e6ea4])=>{function _0x1358ff(_0x565c5d,_0x29881a){return _0x1cc1(_0x565c5d-0x111,_0x29881a);}_0x2e6ea4!==undefined&&_0x5562e2[_0x1358ff(0x306,0x298)](_0xdc9650,String(_0x2e6ea4));});const _0xc4026d=this[_0xfc79cf(-0x169,-0x12b)]['baseURL']||'',_0x28a624=_0xc4026d+_0xfc79cf(-0xd3,-0x60)+this['bucketId']+'/files/'+_0x56c1c1+(_0x5562e2['toString']()?'?'+_0x5562e2['toString']():'');return{'data':{'publicUrl':_0x28a624}};}async['getFileInfo'](_0x4cdf2f){function _0x2a199b(_0x38e755,_0x486253){return _0x1cc1(_0x486253- -0x1fe,_0x38e755);}try{const response=await this['httpClient'][_0x2a199b(0xd,-0x26)](_0x2a199b(0x2d,0x3b)+this['bucketId']+'/files/'+_0x4cdf2f+'/info');return{'data':response[_0x2a199b(0x80,0x9)],'error':null};}catch(_0x3a6ab9){return{'data':null,'error':_0x3a6ab9 instanceof EBaaSError?_0x3a6ab9:new EBaaSError(_0x3a6ab9 instanceof Error?_0x3a6ab9['message']:'Failed\x20to\x20get\x20file\x20info',0x0,_0x3a6ab9)};}}async[_0x2d9ed0(0x367,0x311)](_0xb15f88,metadata){function _0x229dfa(_0x14b1c3,_0x2d1c8c){return _0x1cc1(_0x2d1c8c-0x37a,_0x14b1c3);}try{const response=await this[_0x229dfa(0x4a7,0x51d)]['put'](_0x229dfa(0x547,0x5b3)+this['bucketId']+'/files/'+_0xb15f88+'/metadata',{'metadata':metadata});return{'data':response['data'],'error':null};}catch(_0x12825e){return{'data':null,'error':_0x12825e instanceof EBaaSError?_0x12825e:new EBaaSError(_0x12825e instanceof Error?_0x12825e[_0x229dfa(0x502,0x4b1)]:_0x229dfa(0x5fb,0x583),0x0,_0x12825e)};}}}class StorageClient{constructor(_0xed8117){function _0x10c05c(_0x16f829,_0xa2bdde){return _0x1cc1(_0x16f829- -0x1d,_0xa2bdde);}this[_0x10c05c(0x186,0x177)]=_0xed8117;}[_0x2d9ed0(0x42b,0x3ff)](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async['createBucket'](_0x49e764,_0x5e5188){function _0x5ead8b(_0x3f5995,_0x4359cf){return _0x1cc1(_0x3f5995- -0x1d3,_0x4359cf);}try{const response=await this[_0x5ead8b(-0x30,-0x9c)]['post']('/storage/buckets',{'id':_0x49e764,..._0x5e5188});return{'data':response[_0x5ead8b(0x34,-0x3f)],'error':null};}catch(_0x3a8cb2){return{'data':null,'error':_0x3a8cb2 instanceof EBaaSError?_0x3a8cb2:new EBaaSError(_0x3a8cb2 instanceof Error?_0x3a8cb2['message']:'Failed\x20to\x20create\x20bucket',0x0,_0x3a8cb2)};}}async[_0x2d9ed0(0x342,0x30d)](_0x483b86){function _0x8c09ed(_0x1f55b9,_0x4ac1df){return _0x1cc1(_0x4ac1df- -0x3a,_0x1f55b9);}try{const response=await this['httpClient']['get']('/storage/buckets/'+_0x483b86);return{'data':response[_0x8c09ed(0x1f0,0x1cd)],'error':null};}catch(_0x570b69){return{'data':null,'error':_0x570b69 instanceof EBaaSError?_0x570b69:new EBaaSError(_0x570b69 instanceof Error?_0x570b69['message']:'Failed\x20to\x20get\x20bucket',0x0,_0x570b69)};}}async['listBuckets'](){function _0x7efb1(_0x1e27a2,_0x1b1f20){return _0x1cc1(_0x1e27a2- -0x26e,_0x1b1f20);}try{const response=await this['httpClient']['get'](_0x7efb1(-0x93,-0x20));return{'data':response['data'],'error':null};}catch(_0x430c35){return{'data':null,'error':_0x430c35 instanceof EBaaSError?_0x430c35:new EBaaSError(_0x430c35 instanceof Error?_0x430c35[_0x7efb1(-0x137,-0x1a1)]:'Failed\x20to\x20list\x20buckets',0x0,_0x430c35)};}}async['updateBucket'](_0x2eebe5,_0x5b9353){function _0x369b95(_0x1a3efd,_0xdb4305){return _0x1cc1(_0xdb4305-0x12,_0x1a3efd);}try{const response=await this['httpClient'][_0x369b95(0x228,0x230)]('/storage/buckets/'+_0x2eebe5,_0x5b9353);return{'data':response['data'],'error':null};}catch(_0x328203){return{'data':null,'error':_0x328203 instanceof EBaaSError?_0x328203:new EBaaSError(_0x328203 instanceof Error?_0x328203['message']:'Failed\x20to\x20update\x20bucket',0x0,_0x328203)};}}async['deleteBucket'](_0x31ab27){function _0x4b084f(_0x5c1b96,_0x178dab){return _0x1cc1(_0x5c1b96- -0x132,_0x178dab);}try{const response=await this['httpClient'][_0x4b084f(0x98,0xeb)]('/storage/buckets/'+_0x31ab27);return{'data':response[_0x4b084f(0xd5,0x56)],'error':null};}catch(_0x8716ed){return{'data':null,'error':_0x8716ed instanceof EBaaSError?_0x8716ed:new EBaaSError(_0x8716ed instanceof Error?_0x8716ed[_0x4b084f(0x5,0x67)]:'Failed\x20to\x20delete\x20bucket',0x0,_0x8716ed)};}}async[_0x2d9ed0(0x428,0x490)](){function _0x30e510(_0x3c4e1c,_0xb78e72){return _0x1cc1(_0xb78e72-0x2c7,_0x3c4e1c);}try{const response=await this['httpClient'][_0x30e510(0x4bc,0x49f)](_0x30e510(0x46a,0x468));return{'data':response[_0x30e510(0x457,0x4ce)],'error':null};}catch(_0x4f96c5){return{'data':null,'error':_0x4f96c5 instanceof EBaaSError?_0x4f96c5:new EBaaSError(_0x4f96c5 instanceof Error?_0x4f96c5[_0x30e510(0x444,0x3fe)]:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x4f96c5)};}}}class EventManager{constructor(){this['events']=new Map(),this['maxListeners']=0xa;}['on'](_0x51374f,_0x4d8ccb){function _0x42724c(_0x22a8f7,_0x2702f0){return _0x1cc1(_0x22a8f7- -0x373,_0x2702f0);}!this[_0x42724c(-0x1c4,-0x207)]['has'](_0x51374f)&&this[_0x42724c(-0x1c4,-0x223)]['set'](_0x51374f,new Set()),this['events']['get'](_0x51374f)['add'](_0x4d8ccb);}[_0x2d9ed0(0x389,0x339)](_0x2e98a4,_0x6e7117){if(!this[_0x2730b4(0x515,0x529)]['has'](_0x2e98a4))return;const _0xe9d992=this['events']['get'](_0x2e98a4);_0x6e7117?_0xe9d992[_0x2730b4(0x5aa,0x544)](_0x6e7117):_0xe9d992['clear']();function _0x2730b4(_0x3bdf28,_0x3dc010){return _0x1cc1(_0x3dc010-0x37a,_0x3bdf28);}_0xe9d992[_0x2730b4(0x507,0x53d)]===0x0&&this['events'][_0x2730b4(0x50f,0x544)](_0x2e98a4);}[_0x2d9ed0(0x3bb,0x420)](_0x43e751,..._0x530c23){if(!this[_0x2a61e7(-0x55,0x29)][_0x2a61e7(-0x22,-0x14)](_0x43e751))return![];function _0x2a61e7(_0x2b75e8,_0xe85d38){return _0x1cc1(_0xe85d38- -0x186,_0x2b75e8);}const _0x48edfe=this['events']['get'](_0x43e751);for(const _0xe1dfe1 of _0x48edfe){try{_0xe1dfe1(..._0x530c23);}catch(_0x141f27){console['error']('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0x43e751+'\x22:',_0x141f27);}}return _0x48edfe[_0x2a61e7(-0x16,0x3d)]>0x0;}['removeAllListeners'](_0x5bf537){_0x5bf537?this['events']['delete'](_0x5bf537):this['events']['clear']();}[_0x2d9ed0(0x372,0x34d)](_0x563465){function _0x58a86d(_0x1a0412,_0x51b6e2){return _0x1cc1(_0x51b6e2- -0x17a,_0x1a0412);}return this[_0x58a86d(0x35,0x35)]['get'](_0x563465)?.['size']??0x0;}[_0x2d9ed0(0x386,0x3e9)](){function _0x45f1cb(_0x876823,_0x176aa2){return _0x1cc1(_0x176aa2-0xe5,_0x876823);}return Array['from'](this[_0x45f1cb(0x304,0x294)][_0x45f1cb(0x388,0x30b)]());}['listeners'](_0x5a957c){function _0x44fd7e(_0x24ca84,_0x4e9872){return _0x1cc1(_0x4e9872-0x1a6,_0x24ca84);}return Array['from'](this['events'][_0x44fd7e(0x3d4,0x37e)](_0x5a957c)??[]);}[_0x2d9ed0(0x3af,0x434)](_0x3b38dd,_0x2b14d2){this['on'](_0x3b38dd,_0x2b14d2);}['removeListener'](_0x341db7,_0x163f67){this['off'](_0x341db7,_0x163f67);}[_0x2d9ed0(0x433,0x41e)](_0x520e79,_0x43314a){const _0x4d404b=(..._0x463c57)=>{function _0x1cf8eb(_0x207b64,_0x228e73){return _0x1cc1(_0x228e73-0x331,_0x207b64);}this[_0x1cf8eb(0x4cc,0x4a9)](_0x520e79,_0x4d404b),_0x43314a(..._0x463c57);};this['on'](_0x520e79,_0x4d404b);}[_0x2d9ed0(0x345,0x2ce)](_0x23c2ab,_0x3cd260){this['on'](_0x23c2ab,_0x3cd260);}[_0x2d9ed0(0x448,0x4b2)](_0x11ecb3,_0x1972b1){const _0x2633fc=(..._0x44d09e)=>{this['off'](_0x11ecb3,_0x2633fc),_0x1972b1(..._0x44d09e);};this['on'](_0x11ecb3,_0x2633fc);}[_0x2d9ed0(0x38c,0x3f9)](_0x172a56){this[_0x4a811a(-0x1cd,-0x1b3)]=_0x172a56;function _0x4a811a(_0x4988aa,_0x105ee1){return _0x1cc1(_0x4988aa- -0x334,_0x105ee1);}return this;}[_0x2d9ed0(0x3a9,0x37c)](){function _0x523095(_0x5b5323,_0x20775c){return _0x1cc1(_0x20775c- -0x310,_0x5b5323);}return this[_0x523095(-0x125,-0x1a9)];}[_0x2d9ed0(0x405,0x3d6)](_0x23bc62){return this['listeners'](_0x23bc62);}}class RealtimeChannel extends EventManager{constructor(_0x143bdf,_0x114886){super(),this['joinedOnce']=![];function _0x3c4a7e(_0x1a24db,_0x4542e1){return _0x1cc1(_0x4542e1-0x322,_0x1a24db);}this['state']='closed',this['subscriptions']=new Map(),this[_0x3c4a7e(0x51e,0x51a)]=_0x143bdf,this[_0x3c4a7e(0x4f0,0x4ed)]=_0x114886;}['subscribe'](_0x283e00){function _0x28e821(_0x5bcaf7,_0x88018d){return _0x1cc1(_0x88018d- -0x6f,_0x5bcaf7);}return!this['joinedOnce']&&(this[_0x28e821(0x1e6,0x1a9)]=!![],this['_join']()),_0x283e00&&this['on'](_0x28e821(0x81,0x104),_0x283e00),this;}[_0x2d9ed0(0x417,0x498)](filter,_0x57f3f2){const _0x52ae6e=_0x393d02(-0x179,-0x110)+JSON['stringify'](filter);this['on'](_0x52ae6e,_0x57f3f2);const _0x9e757c={'unsubscribe':()=>{function _0x316df5(_0x626566,_0x591a23){return _0x1cc1(_0x626566-0x3d3,_0x591a23);}this['off'](_0x52ae6e,_0x57f3f2),this[_0x316df5(0x50d,0x582)][_0x316df5(0x59d,0x563)](_0x52ae6e);}};this['subscriptions'][_0x393d02(-0x11d,-0x99)](_0x52ae6e,_0x9e757c);this['socket']?.['connected']&&this[_0x393d02(-0x17,-0x91)]===_0x393d02(-0xcb,-0x114)&&this[_0x393d02(-0x7d,-0xa5)]['emit'](_0x393d02(-0x86,-0x97),{'topic':this[_0x393d02(-0x8b,-0x78)],'filter':filter,'ref':this['makeRef']()});function _0x393d02(_0x5cac1e,_0x5632e9){return _0x1cc1(_0x5632e9- -0x270,_0x5cac1e);}return _0x9e757c;}['onBroadcast'](filter,_0x308cfa){const _0x116083='broadcast:'+JSON[_0x423b85(0xe2,0xe0)](filter);this['on'](_0x116083,_0x308cfa);const _0x2d1204={'unsubscribe':()=>{this[_0x423bf6(-0x45,0x2)](_0x116083,_0x308cfa);function _0x423bf6(_0x5add93,_0x4dc743){return _0x1cc1(_0x4dc743- -0x176,_0x5add93);}this['subscriptions'][_0x423bf6(0x49,0x54)](_0x116083);}};this[_0x423b85(0xb7,0xd9)]['set'](_0x116083,_0x2d1204);function _0x423b85(_0x5d7cf3,_0x5598b4){return _0x1cc1(_0x5598b4- -0x61,_0x5d7cf3);}return _0x2d1204;}[_0x2d9ed0(0x41e,0x47e)](filter,_0xe8ae){const _0x2b8f8f=_0x559261(0x487,0x43c)+JSON['stringify'](filter);this['on'](_0x2b8f8f,_0xe8ae);const _0x4ac224={'unsubscribe':()=>{this[_0x1dc28f(0x3a8,0x33d)](_0x2b8f8f,_0xe8ae);function _0x1dc28f(_0x7b5bb5,_0x3730d5){return _0x1cc1(_0x3730d5-0x1c5,_0x7b5bb5);}this[_0x1dc28f(0x35b,0x2ff)][_0x1dc28f(0x37b,0x38f)](_0x2b8f8f);}};function _0x559261(_0x2bcb70,_0x2cf06c){return _0x1cc1(_0x2cf06c-0x260,_0x2bcb70);}return this[_0x559261(0x390,0x39a)][_0x559261(0x3f0,0x437)](_0x2b8f8f,_0x4ac224),_0x4ac224;}['send'](_0x466f98){return new Promise(_0x26117b=>{function _0x4de238(_0x56d9a9,_0x9c254a){return _0x1cc1(_0x9c254a-0x179,_0x56d9a9);}this['socket']?.['connected']&&this[_0x4de238(0x374,0x358)]==='joined'?(this[_0x4de238(0x398,0x344)][_0x4de238(0x305,0x323)]('broadcast',{'topic':this[_0x4de238(0x2fc,0x371)],'event':_0x466f98[_0x4de238(0x340,0x3b6)],'payload':_0x466f98,'ref':this[_0x4de238(0x327,0x367)]()}),_0x26117b('ok')):_0x26117b(_0x4de238(0x2b8,0x309));});}['track'](_0x19c7b8){return new Promise(_0xeade3d=>{function _0x41c99e(_0x35744a,_0x1de3fd){return _0x1cc1(_0x1de3fd- -0xc2,_0x35744a);}this[_0x41c99e(0x138,0x109)]?.[_0x41c99e(0x8c,0x6e)]&&this['state']===_0x41c99e(0x59,0x9a)?(this['socket']['emit']('presence',{'topic':this[_0x41c99e(0x109,0x136)],'event':_0x41c99e(0xbc,0xcd),'payload':_0x19c7b8,'ref':this['makeRef']()}),_0xeade3d('ok')):_0xeade3d('error');});}['untrack'](){return new Promise(_0x50d1b0=>{function _0x59b3a1(_0x7fa5a6,_0x3c8ca6){return _0x1cc1(_0x3c8ca6-0x254,_0x7fa5a6);}this['socket']?.['connected']&&this[_0x59b3a1(0x3c4,0x433)]==='joined'?(this[_0x59b3a1(0x451,0x41f)][_0x59b3a1(0x416,0x3fe)]('presence',{'topic':this[_0x59b3a1(0x3cd,0x44c)],'event':'untrack','ref':this['makeRef']()}),_0x50d1b0('ok')):_0x50d1b0(_0x59b3a1(0x462,0x3e4));});}['unsubscribe'](){return new Promise(_0x2d4bd8=>{this['state']=_0x1c4de8(-0x6b,-0xeb),this[_0x1c4de8(-0xde,-0x88)][_0x1c4de8(-0xb4,-0x8f)](_0x38c384=>{_0x38c384['unsubscribe']();}),this['subscriptions'][_0x1c4de8(-0xe2,-0x74)]();function _0x1c4de8(_0x114b24,_0xc6f351){return _0x1cc1(_0x114b24- -0x218,_0xc6f351);}this[_0x1c4de8(-0x4d,-0x47)]?.['connected']&&this[_0x1c4de8(-0x4d,-0x7c)]['emit'](_0x1c4de8(-0x9a,-0x6a),{'topic':this[_0x1c4de8(-0x20,-0x2d)],'ref':this['makeRef']()}),this['state']=_0x1c4de8(0x15,0x7e),this['removeAllListeners'](),_0x2d4bd8('ok');});}['_join'](){if(this[_0x101455(-0x16,-0x46)]==='leaving')return;function _0x101455(_0x25aacd,_0x394db5){return _0x1cc1(_0x25aacd- -0x1f5,_0x394db5);}this['state']=_0x101455(-0x6d,-0x36),this[_0x101455(-0x2a,0x59)]?.[_0x101455(-0xc5,-0x82)]&&(this[_0x101455(-0x2a,0x37)][_0x101455(-0x4b,-0x4b)]('join',{'topic':this[_0x101455(0x3,-0x7e)],'ref':this[_0x101455(-0x7,-0x57)]()}),setTimeout(()=>{function _0x1a9e9a(_0x3f1739,_0x5bc083){return _0x1cc1(_0x3f1739- -0x18c,_0x5bc083);}this['state']==='joining'&&(this['state']='joined',this[_0x1a9e9a(0x1e,-0x4f)](_0x1a9e9a(-0x19,0x5c),_0x1a9e9a(-0x5a,-0x4f)));},0x64));}['_rejoin'](){function _0x1ff155(_0x21b37f,_0x3f75c8){return _0x1cc1(_0x21b37f-0x278,_0x3f75c8);}this['joinedOnce']&&(this['_join'](),this['subscriptions'][_0x1ff155(0x3dc,0x3a0)]((_0x2d96a2,_0x39b6d5)=>{function _0xd84eb7(_0x3897bc,_0x421a18){return _0x1cc1(_0x421a18- -0x352,_0x3897bc);}if(_0x39b6d5['startsWith'](_0xd84eb7(-0x1e8,-0x1f2))){const filter=JSON[_0xd84eb7(-0x24c,-0x1db)](_0x39b6d5[_0xd84eb7(-0x1f6,-0x18d)]('postgres_changes:',''));this[_0xd84eb7(-0x1b9,-0x187)]?.[_0xd84eb7(-0x18a,-0x1a8)]('subscribe_postgres_changes',{'topic':this['topic'],'filter':filter,'ref':this['makeRef']()});}}));}[_0x2d9ed0(0x3ab,0x342)](_0x50357e,_0x39e1aa){function _0x243fdf(_0x455a54,_0x7c4639){return _0x1cc1(_0x7c4639- -0x55,_0x455a54);}if(_0x50357e==='postgres_changes'){const _0x2ed6bb=_0x243fdf(0xc0,0x10b)+JSON['stringify'](_0x39e1aa['filter']||{});this[_0x243fdf(0x1c1,0x155)](_0x2ed6bb,_0x39e1aa);}else{if(_0x50357e===_0x243fdf(0x13d,0xee)){const _0x5264b3='broadcast:'+JSON['stringify']({'event':_0x39e1aa['event']});this[_0x243fdf(0x10d,0x155)](_0x5264b3,_0x39e1aa);}else{if(_0x50357e==='presence'){const _0x2786b8=_0x243fdf(0x1f1,0x187)+JSON['stringify']({'event':_0x39e1aa[_0x243fdf(0x230,0x1e8)]});this['emit'](_0x2786b8,_0x39e1aa);}}}this['emit'](_0x50357e,_0x39e1aa);}[_0x2d9ed0(0x447,0x426)](_0xc08a70){this['state']=_0xc08a70;let status;switch(_0xc08a70){case _0x4108b2(0x2bf,0x2b1):status='SUBSCRIBED';break;case _0x4108b2(0x2d6,0x2f1):status=_0x4108b2(0x340,0x380);break;case _0x4108b2(0x3df,0x382):status='CLOSED';break;default:return;}function _0x4108b2(_0x4090f6,_0x947458){return _0x1cc1(_0x947458-0x155,_0x4090f6);}this['emit']('status',status);}[_0x2d9ed0(0x3ff,0x3e5)](){return Math['random']()['toString'](0x24)['substring'](0x2,0xf);}['getState'](){return this['state'];}}function getEnvironment(){function _0x10a2b6(_0x452a7b,_0x1dadf4){return _0x1cc1(_0x452a7b-0x233,_0x1dadf4);}if(typeof navigator!==_0x10a2b6(0x3b5,0x337)&&navigator['product']===_0x10a2b6(0x378,0x388))return'react-native';if(typeof window!=='undefined'&&typeof document!=='undefined')return'browser';if(typeof global!=='undefined'&&typeof process!==_0x10a2b6(0x3b5,0x42a)&&process[_0x10a2b6(0x424,0x433)]?.['node'])return _0x10a2b6(0x414,0x49a);return _0x10a2b6(0x3a0,0x3c9);}function isSocketIOAvailable(){function _0x3408ad(_0x1e9417,_0x7d9d45){return _0x1cc1(_0x7d9d45-0x362,_0x1e9417);}try{const _0x13f0a1=getEnvironment();switch(_0x13f0a1){case _0x3408ad(0x501,0x543):return typeof require!==_0x3408ad(0x4a2,0x4e4)&&require['resolve']&&!!require[_0x3408ad(0x5a9,0x562)](_0x3408ad(0x58f,0x55c));case'browser':if(typeof globalThis!=='undefined'&&'io'in globalThis)return!![];return typeof require!==_0x3408ad(0x4f4,0x4e4)&&require['resolve']&&!!require[_0x3408ad(0x4e7,0x562)]('socket.io-client');case _0x3408ad(0x5d4,0x59d):try{return typeof require!==_0x3408ad(0x4bc,0x4e4)&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x430eb2(_0x3b2c2e,_0x136890){return _0x1cc1(_0x136890-0xe6,_0x3b2c2e);}try{if(typeof require!=='undefined')return require('socket.io-client');if(typeof globalThis!==_0x430eb2(0x222,0x268)&&'io'in globalThis)return{'io':globalThis['io']};throw new Error(_0x430eb2(0x2b4,0x2d5));}catch(_0x33cd91){throw new Error('Socket.io-client\x20não\x20está\x20disponível\x20neste\x20ambiente.\x20Para\x20usar\x20funcionalidades\x20de\x20realtime,\x20instale:\x20npm\x20install\x20socket.io-client');}}class WebSocketAdapter{constructor(){function _0x140209(_0x3026b6,_0x496488){return _0x1cc1(_0x496488-0x314,_0x3026b6);}this[_0x140209(0x47d,0x4df)]=null;}async[_0x2d9ed0(0x438,0x49b)](_0x451c1f,_0x1b095e){if(!isSocketIOAvailable())throw new Error('Socket.io-client não está disponível. Para usar funcionalidades de realtime, instale: npm install socket.io-client');const {io:_0x15110f}=getSocketIO();return new Promise((_0x22f9ad,_0x1b5edc)=>{this['socket']=_0x15110f(_0x451c1f,_0x1b095e),this['socket']['on']('connect',()=>_0x22f9ad()),this['socket']['on']('connect_error',_0x34c2b2=>_0x1b5edc(_0x34c2b2));});}['disconnect'](){function _0x29fa39(_0x389cdb,_0x42151e){return _0x1cc1(_0x389cdb-0x3c8,_0x42151e);}this[_0x29fa39(0x593,0x60e)]&&(this['socket'][_0x29fa39(0x536,0x520)](),this[_0x29fa39(0x593,0x5d8)]=null);}[_0x2d9ed0(0x3bb,0x37d)](_0x6ececb,data){function _0x3eaad3(_0x23529c,_0x3634f6){return _0x1cc1(_0x23529c-0x1a6,_0x3634f6);}this[_0x3eaad3(0x371,0x325)]?.[_0x3eaad3(0x350,0x2d9)](_0x6ececb,data);}['on'](_0x5d41dd,_0x4777cf){this['socket']?.['on'](_0x5d41dd,_0x4777cf);}['off'](_0x528e20,_0x263932){function _0x1caa65(_0x2bb537,_0x194ae8){return _0x1cc1(_0x194ae8-0xed,_0x2bb537);}_0x263932?this[_0x1caa65(0x291,0x2b8)]?.['off'](_0x528e20,_0x263932):this['socket']?.['off'](_0x528e20);}get[_0x2d9ed0(0x341,0x2d5)](){function _0x5f7694(_0x497602,_0x1b1214){return _0x1cc1(_0x497602-0x10b,_0x1b1214);}return this[_0x5f7694(0x2d6,0x333)]?.['connected']??![];}}function _0x5014(){const _0x5d774e=['yNjVD3nLCG','zgLZy29UBMvJDa','x2DLDfnVy2TLDa','DxnLCG','rMfPBgvKihrVig1VDMuGzMLSzq','AgfZ','C3rHDhvZ','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','zxzLBNroyw1LCW','C3rVCMfNzq','CgfYC2u','B2zM','zgv0zwn0q3vZDg9Trgf0ywjHC2u','y29UzMLN','C2v0twf4tgLZDgvUzxjZ','z2v0u3rHDhvZ','BMvX','BgvHDMu','CMvMCMvZAfnLC3nPB24','y3jLyxrL','AgfZq3vZDg9Trgf0ywjHC2u','Dw5KzwzPBMvK','ms4XlJG','zMLSzq','C29YDej5','ChjLzML4','DhjHBNnMB3jT','AM9PBMLUzW','zxHLy3v0zq','DxbZzxj0','C2vZC2LVBG','BhrL','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbSB2DZ','zgv0zwn0zwrdB25MAwC','DhjHy2S','zxjYB3i','nZe1mZK4sg9NCwLb','rgf0ywjHC2vdBgLLBNq','Aw5PDgLHBgL6zun1C3rVBurHDgfIyxnL','y29UBMvJDf9LCNjVCG','uhjLzMvY','ndC3mtLKtK1uqLi','DxbKyxrLrgf0yq','z2v0twf4tgLZDgvUzxjZ','yxv0Aa','x3rYAwDNzxi','uMvHBhrPBwvdBgLLBNq','zxjYB3jLza','zw50CMLLCW','ywrKtgLZDgvUzxi','Cg9ZDgDYzxnFy2HHBMDLCW','Cg9ZDa','l3n0B3jHz2uVDxnHz2u','zw50CNLWB2LUDa','Ahr0CenSAwvUDa','yM9KEq','B2zMC2v0','icHtDgf0Dxm6ia','z2v0rgv0zwn0zwrdB25MAwC','z2v0v29YA3nWywnLswq','DgfIBgu','zw1PDa','igf0DgvTChrZoIa','D29YA3nWywnLswq','BgvHDMLUzW','q3vZDg9Trgf0ywjHC2vnyw5Hz2vY','zxzLBNrZ','Aw5Zzxj0','ywnJzxnZx3rVA2vU','l2vUDG','y2fJAgvdB250CM9S','DxbKyxrLrw52','mtuYndKYodLJDKDosvi','zwjHyxmUyxv0Ac5ZzxnZAw9U','B25dB25Uzwn0Aw9Uu3rHDgvdAgfUz2u','l2zPBgvZl2nVChK','mtbuuM52zgy','DxbKyxrL','l3nKAY92ms8','u3rVCMfNzuj1y2TLDa','zgvSzxrLt3b0Aw9UCW','DMfSDwu','DxnL','BxvSDgLWyxj0l2zVCM0Tzgf0yq','Ec10B3rHBc1JB3vUDa','uMvHBhrPBwvdAgfUBMvS','C2L6zq','DgvZDenVBM5Ly3rPB24','CMvWBgfJzq','y2HHBM5LBhm','C2vHCMnO','y29SDw1U','C2nOzw1H','zgvSzxrL','C29JA2v0','zgf0ywjHC2u','AgvHCNrIzwf0','z2v0twv0CMLJCW','lMrLC2m','l2zPBgvZlW','C2v0DxbizwfYDgjLyxq','yxnJzw5KAw5N','y3jLyxrLu2LNBMvKvxjS','C3rYAw5N','DMvYAwz5','B3bLCMf0Aw9U','C2v0','z2v0','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','yxbPs2v5','l3n0B3jHz2uVyNvJA2v0CW','ChjLC2vUy2u6','qxv0AgvUDgLJyxrPB24GzMfPBgvK','qMvHCMvYia','C3rHDgu','l2zPBgvZ','BM9Kzq','CMvTB3zLqwXSq2HHBM5LBhm','zgLZy29UBMvJDgvK','CMvZzxrqyxnZD29Yza','C3bSAxq','B3b0Aw9UCW','l2f1DgGVDJeVDxnLCG','C2v0sxrLBq','zxHLy3v0zvf1zxj5','y2XPzw50','rNvUy3rPB25Zq2XPzw50','odyWndu0mfzoANHfuG','mJrcz2v1v1i','BwfRzvjLzG','C29JA2v0lMLVlwnSAwvUDcbUB3qGyxzHAwXHyMXL','C29JA2v0qwrHChrLCG','DMvYC2LVBNm','AgvHCNrIzwf0sw50zxj2ywW','yMfZzvvsta','CMf3tgLZDgvUzxjZ','yxbWzw5K','CMvJB25Uzwn0qxr0zw1WDhm','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','Dg9WAwm','CNbJ','C29JA2v0lMLVlwnSAwvUDa','Dw5ZDwjZy3jPyMu','AgfUzgXLrxjYB3i','mJa4vefnAKHc','CxvLCNK','rNvUy3rPB24GAw52B2nHDgLVBIbMywLSzwq','CMvZB2X2zq','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','CMvQzwn0','BgLRzq','l2z1BMn0Aw9UCY92mq','C2LNBKLU','B25qB3n0z3jLC0nOyw5Nzxm','zgf0yq','C2v0v29YA3nWywnLswq','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','y3jLzgvUDgLHBhm','CMvZCg9UC2u','C2v0u2vZC2LVBG','B25qCMvZzw5Jzq','B3jKzxi','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','D2vIC29JA2v0','rMfPBgvKihrVihvWzgf0zsbMDw5JDgLVBIbLBNzPCM9UBwvUDa','rgf0ywjHC2uGB3bLCMf0Aw9UigzHAwXLza','y29Kzq','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbTzxrYAwnZ','DxjS','ChjLzMvY','z2v0vxnHz2u','AM9PBMvKt25Jzq','CMvZB2X1DgLVBJ1TzxjNzs1KDxbSAwnHDgvZlhjLDhvYBJ1YzxbYzxnLBNrHDgLVBG','zNjVBq','D2fYBG','C2LNBK91Da','Aw52B2TL','Chv0','Bg9N','AgvHzgvYCW','Bwf0y2G','B25Jzq','Aw5PDgLHBgL6zq','Aw50zxjJzxb0B3jZ','AwXPA2u','A2v5CW','y29UBMvJDa','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','CMfUz2u','u3rVCMfNzunSAwvUDa','q0HbtK5ftf9fuLjpuG','zg93BMXVywq','y2XVC2vK','ntuXnZe3nMPzEujTCW','Dgv4Dc9WBgfPBG','zw52','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','y29TBw9U','C3nSrw5HyMXLza','x2PVAw4','y2XLyxjtzxnZAw9U','x3nLDfn0yxrL','ChjLCgvUze9Uy2vmAxn0zw5LCG','rMfPBgvKihrVihrLC3qGy29UBMvJDgLVBG','l3n0B3jHz2uVyNvJA2v0CY8','BgvUz3rO','CMvHy3qTBMf0AxzL','y29UDgvUDfr5Cgu','zxzLBNq','nuPesvr1zW','rujHyvnfCNjVCG','y29UBMvJDgvK','z2v0qNvJA2v0','u1vcu0nssujfra','l2XVz3m','ChjLCgvUzeXPC3rLBMvY','DgvZDen1C3rVBunVBM5Ly3rPB24','y2XLyxi','BwvZC2fNzq','BgLTAxq','zgv0ywLSCW','C3vIC2nYAxb0Aw9UCW','Aw1WB3j0twfW','Ag9ZDa','yNvJA2v0swq','BMfTzq','nda0odzQCgnzrfC','y2HHBM5LBa','C3rYAw5NAwz5','ChvZAa','yNjVywrJyxn0','y29UBMvJDgLVBLn0yxrL','uMvHy3royxrPDMu','shr0CenSAwvUDa','C3rHDhvZvgv4Da','z2v0uhvIBgLJvxjS','C2vSzwn0','zMLSDgvYCW','rMfPBgvKihrVigrLCgXVEsbMDw5JDgLVBG','z2v0u2vZC2LVBG','Cg9ZDgDYzxneyxrHyMfZzq','l2z1BMn0Aw9UCY92ms8','B3bLCMf0B3i','vw5RBM93BIbLCNjVCG','CgvYAw9K','Cg9YDa','l3nPz24','AgfUzgXLqxv0AevYCM9Y','y3vYCMvUDfnLC3nPB24','DxbKyxrLrMLSzu1LDgfKyxrH','mta5oteYqM9pvwnh','DxbKyxrLt3b0Aw9UCW','AM9PBG','z2v0vxnLCG','Dg9tDhjPBMC','AM9PBMvK','Bwv0Ag9K','y2fWDhvYzvn0ywnRvhjHy2u','CMvHBhrPBwu','Cg9ZDgDYzxnFy2HHBMDLCZO','BgLZDgvUzxjdB3vUDa','z3rL','Bgv2zwW','zM9YrwfJAa','Dg9vChbLCKnHC2u','C2v0u2vZC2LVBKLUDgvYBMfS','Bwf4tgLZDgvUzxjZ','Bwv0ywrHDge','l2zPBgvZl21VDMu','ChjLC2vUy2u','BM93','y3vYCMvUDfnJAgvTyq'];_0x5014=function(){return _0x5d774e;};return _0x5014();}class ReactNativeSocketAdapter{constructor(){function _0x33b5eb(_0x50e257,_0x3026f4){return _0x1cc1(_0x50e257- -0x149,_0x3026f4);}this[_0x33b5eb(0x82,0xa9)]=null;}async[_0x2d9ed0(0x438,0x46c)](_0xd774f3,_0x366fc8){if(!isSocketIOAvailable())throw new Error('Socket.io-client\x20não\x20está\x20disponível.\x20Para\x20React\x20Native,\x20instale:\x20npm\x20install\x20socket.io-client');const {io:_0x50b167}=getSocketIO();return new Promise((_0x101a3d,_0xbbfccc)=>{this[_0x4cbd02(0x1e4,0x1e5)]=_0x50b167(_0xd774f3,{..._0x366fc8,'transports':[_0x4cbd02(0x28a,0x22a)],'upgrade':![],'autoConnect':!![]});function _0x4cbd02(_0x217ebf,_0x2adfa6){return _0x1cc1(_0x2adfa6-0x1a,_0x217ebf);}this['socket']['on'](_0x4cbd02(0x1e8,0x241),()=>_0x101a3d()),this['socket']['on']('connect_error',_0x10af4b=>_0xbbfccc(_0x10af4b));});}['disconnect'](){function _0x450e68(_0x2c8d19,_0x54008e){return _0x1cc1(_0x54008e-0x36a,_0x2c8d19);}this[_0x450e68(0x587,0x535)]&&(this['socket']['disconnect'](),this[_0x450e68(0x4eb,0x535)]=null);}[_0x2d9ed0(0x3bb,0x3c0)](_0x5365e1,data){function _0x82b17e(_0x21cf14,_0x14b65a){return _0x1cc1(_0x14b65a-0x247,_0x21cf14);}this['socket']?.[_0x82b17e(0x441,0x3f1)](_0x5365e1,data);}['on'](_0x43516c,_0x2506b8){function _0x5bb51c(_0x24f681,_0x2a743e){return _0x1cc1(_0x2a743e-0x369,_0x24f681);}this[_0x5bb51c(0x586,0x534)]?.['on'](_0x43516c,_0x2506b8);}['off'](_0x177a5b,_0x31fc59){function _0x5a7a3c(_0x52074a,_0x46c255){return _0x1cc1(_0x52074a-0x35f,_0x46c255);}_0x31fc59?this[_0x5a7a3c(0x52a,0x4cb)]?.[_0x5a7a3c(0x4d7,0x527)](_0x177a5b,_0x31fc59):this['socket']?.[_0x5a7a3c(0x4d7,0x4a4)](_0x177a5b);}get[_0x2d9ed0(0x341,0x37b)](){return this['socket']?.['connected']??![];}}function createSocketAdapter(){const _0x2c26e7=getEnvironment();function _0x4a4d7e(_0x10792e,_0x4b6d25){return _0x1cc1(_0x4b6d25- -0x31d,_0x10792e);}switch(_0x2c26e7){case _0x4a4d7e(-0xc9,-0xe2):return new ReactNativeSocketAdapter();case'browser':case _0x4a4d7e(-0xde,-0x13c):default:return new WebSocketAdapter();}}class RealtimeClient{constructor(_0x53313f,_0xd3510c,_0x1a5669={}){this[_0x1b3f8d(0x2e,0x2d)]=null;function _0x1b3f8d(_0x3fdb32,_0x32f6b8){return _0x1cc1(_0x3fdb32- -0x19d,_0x32f6b8);}this['channels']=new Map(),this[_0x1b3f8d(-0x59,-0x6d)]=_0x1b3f8d(0x46,0x28),this[_0x1b3f8d(0x59,-0x20)]=0x0,this[_0x1b3f8d(0x5a,0xca)]=0x5,this[_0x1b3f8d(0x78,0x2)]=_0x53313f,this['apiKey']=_0xd3510c,this['options']={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x1a5669},this[_0x1b3f8d(0x53,0x71)]=createSocketAdapter();}['connect'](){return new Promise(async(_0x34cc6b,_0x20e2a2)=>{if(this[_0x20562d(-0xb8,-0xfc)][_0x20562d(-0x178,-0x11b)]){_0x34cc6b();return;}this['connectionState']='connecting';function _0x20562d(_0x511232,_0x10cbcf){return _0x1cc1(_0x511232- -0x2a8,_0x10cbcf);}try{await this[_0x20562d(-0xb8,-0x38)][_0x20562d(-0x81,-0x8e)](this['url'],{'auth':{'apikey':this['apiKey']},'transports':[_0x20562d(-0x98,-0x5e)],'reconnection':!![],'reconnectionDelay':this[_0x20562d(-0xc2,-0x125)]['reconnectInterval'],'reconnectionAttempts':this['options']['maxReconnectAttempts'],...this[_0x20562d(-0xc2,-0x7f)]['socketOptions']}),this['socket']=this[_0x20562d(-0xb8,-0x10e)]['socket'],this[_0x20562d(-0xb8,-0xe8)]['on'](_0x20562d(-0x81,-0x85),()=>{this[_0x1d8f1d(-0x14f,-0xe9)]=_0x1d8f1d(-0x177,-0xfd);function _0x1d8f1d(_0x581037,_0x3bef6f){return _0x1cc1(_0x3bef6f- -0x22d,_0x581037);}this[_0x1d8f1d(-0x4a,-0x37)]=0x0,this[_0x1d8f1d(0x7,-0x5c)](),_0x34cc6b();}),this['socketAdapter']['on'](_0x20562d(-0x13a,-0x180),()=>{this['connectionState']=_0x2ba231(-0xfc,-0x169);function _0x2ba231(_0x44fa68,_0x2fc121){return _0x1cc1(_0x2fc121- -0x34c,_0x44fa68);}this['channels']['forEach'](channel=>{channel['_setState']('closed');});}),this['socketAdapter']['on']('connect_error',_0x17ed77=>{function _0x24529a(_0x3c9ec2,_0x3a61e1){return _0x1cc1(_0x3c9ec2- -0x391,_0x3a61e1);}this[_0x24529a(-0x24d,-0x2c1)]=_0x24529a(-0x201,-0x1ad),this['reconnectAttempts']++,this[_0x24529a(-0x19b,-0x1d6)]>=this['maxReconnectAttempts']&&_0x20e2a2(new Error('Failed\x20to\x20connect\x20after\x20'+this['maxReconnectAttempts']+_0x24529a(-0x1e6,-0x21b)+_0x17ed77['message']));}),this['socketAdapter']['on']('reconnect',()=>{function _0x3ef6f9(_0x5afc22,_0x23531c){return _0x1cc1(_0x23531c-0x29e,_0x5afc22);}this[_0x3ef6f9(0x3d1,0x3e2)]='connected',this[_0x3ef6f9(0x513,0x494)]=0x0,this[_0x3ef6f9(0x4c7,0x464)]['forEach'](channel=>{channel['_rejoin']();});}),this[_0x20562d(-0xb8,-0xd6)]['on']('postgres_changes',_0x503624=>{function _0x3b9f9f(_0x90dc89,_0x41446c){return _0x1cc1(_0x41446c- -0x37b,_0x90dc89);}const channel=this['channels']['get'](_0x503624['topic']);channel&&channel[_0x3b9f9f(-0x176,-0x1e1)](_0x3b9f9f(-0x1be,-0x1dc),_0x503624);}),this[_0x20562d(-0xb8,-0xce)]['on'](_0x20562d(-0x165,-0x1e5),_0xed52a1=>{const channel=this['channels']['get'](_0xed52a1['topic']);channel&&channel['_trigger']('broadcast',_0xed52a1);}),this['socketAdapter']['on']('presence',_0x4d4a3d=>{function _0x50dc26(_0x2a03ab,_0x427619){return _0x1cc1(_0x427619- -0x3a8,_0x2a03ab);}const channel=this[_0x50dc26(-0x205,-0x1e2)][_0x50dc26(-0x159,-0x1d0)](_0x4d4a3d[_0x50dc26(-0x13b,-0x1b0)]);channel&&channel['_trigger'](_0x50dc26(-0x1fd,-0x23e),_0x4d4a3d);});}catch(_0x118dfe){this[_0x20562d(-0x164,-0x150)]=_0x20562d(-0x118,-0xaa),_0x20e2a2(_0x118dfe);}});}['disconnect'](){this['socketAdapter']&&(this['socketAdapter'][_0x33ead9(0x187,0x10c)](),this['socket']=null);this['connectionState']=_0x33ead9(0x128,0x181);function _0x33ead9(_0x8084d5,_0x2ac5de){return _0x1cc1(_0x2ac5de- -0x62,_0x8084d5);}this['channels']['clear']();}[_0x2d9ed0(0x351,0x33c)](_0x202f90){function _0x1e6766(_0x4b43df,_0x1c0a70){return _0x1cc1(_0x1c0a70- -0x186,_0x4b43df);}if(this['channels'][_0x1e6766(-0x18,-0x14)](_0x202f90))return this['channels'][_0x1e6766(0x3c,0x52)](_0x202f90);const channel=new RealtimeChannel(_0x202f90,this[_0x1e6766(-0x30,0x45)]);return this['channels']['set'](_0x202f90,channel),this[_0x1e6766(0x7,-0x42)]==='connected'&&channel[_0x1e6766(0xe6,0xae)](),channel;}['removeChannel'](channel){function _0x20f278(_0x1b74ec,_0x1655a8){return _0x1cc1(_0x1655a8-0x93,_0x1b74ec);}const _0x580344=channel['topic'];this[_0x20f278(0x293,0x259)]['has'](_0x580344)&&(this[_0x20f278(0x296,0x259)][_0x20f278(0x220,0x25d)](_0x580344),channel[_0x20f278(0x2a7,0x28e)]());}[_0x2d9ed0(0x3f3,0x41c)](){this['channels']['forEach'](channel=>{channel['unsubscribe']();}),this['channels']['clear']();}['getChannels'](){function _0x59ce0f(_0x2151c0,_0x3dc898){return _0x1cc1(_0x3dc898- -0x122,_0x2151c0);}return Array[_0x59ce0f(0x156,0xf8)](this[_0x59ce0f(0x39,0xa4)]['values']());}['isConnected'](){function _0x4b2b69(_0xe906bf,_0x309929){return _0x1cc1(_0x309929- -0x1b8,_0xe906bf);}return this['connectionState']==='connected'&&this['socketAdapter'][_0x4b2b69(-0x38,-0x88)];}['getConnectionState'](){return this['connectionState'];}[_0x2d9ed0(0x3c8,0x3e1)](_0x44a2b8){function _0x17996e(_0x5a55a9,_0x2a5fad){return _0x1cc1(_0x5a55a9-0x28e,_0x2a5fad);}const _0x4e1731=()=>_0x44a2b8(this[_0x17996e(0x3d2,0x413)]);return this['socketAdapter']&&(this['socketAdapter']['on']('connect',()=>{this['connectionState']='connected',_0x4e1731();}),this['socketAdapter']['on'](_0x17996e(0x3fc,0x3e1),()=>{this[_0xde80da(-0x1a8,-0x169)]=_0xde80da(-0x112,-0xca);function _0xde80da(_0x3c4f1b,_0x199b27){return _0x1cc1(_0x199b27- -0x2ad,_0x3c4f1b);}_0x4e1731();}),this[_0x17996e(0x47e,0x416)]['on'](_0x17996e(0x422,0x439),()=>{this['connectionState']=_0x4a26b1(0x47a,0x479);function _0x4a26b1(_0xa1af37,_0xb77a4a){return _0x1cc1(_0xb77a4a-0x2e9,_0xa1af37);}_0x4e1731();})),()=>{function _0x18f671(_0x9f1dfe,_0x2901f3){return _0x1cc1(_0x9f1dfe- -0x9d,_0x2901f3);}this[_0x18f671(0x153,0x103)]&&(this['socketAdapter'][_0x18f671(0xdb,0x7f)]('connect',_0x4e1731),this[_0x18f671(0x153,0x1bb)]['off'](_0x18f671(0xd1,0xec),_0x4e1731),this[_0x18f671(0x153,0x10c)][_0x18f671(0xdb,0xfe)](_0x18f671(0xf7,0x14c),_0x4e1731));};}['setupHeartbeat'](){if(!this['options'][_0x3e4173(0x162,0x1da)]||!this[_0x3e4173(0x160,0x12a)])return;function _0x3e4173(_0x49e150,_0xe3c7ed){return _0x1cc1(_0x49e150- -0x90,_0xe3c7ed);}const interval=setInterval(()=>{function _0x176c9f(_0x5331b3,_0x245ed5){return _0x1cc1(_0x5331b3-0x9c,_0x245ed5);}this[_0x176c9f(0x28c,0x20f)]?.['connected']?this['socketAdapter'][_0x176c9f(0x246,0x1c2)](_0x176c9f(0x269,0x291),{'timestamp':Date[_0x176c9f(0x207,0x284)]()}):clearInterval(interval);},this[_0x3e4173(0x156,0xf2)]['heartbeatInterval']);}[_0x2d9ed0(0x380,0x2fe)](){function _0x575208(_0x4e1de4,_0x45dc34){return _0x1cc1(_0x45dc34-0x97,_0x4e1de4);}return this[_0x575208(0x278,0x262)];}}class FunctionsClient{constructor(_0x509fcf){function _0x3480fe(_0x324a39,_0x3b246e){return _0x1cc1(_0x3b246e- -0x1ca,_0x324a39);}this[_0x3480fe(0x51,-0x27)]=_0x509fcf;}async['invoke'](_0x356afc,_0x557892){function _0x369aee(_0x11ea09,_0x41bef0){return _0x1cc1(_0x41bef0- -0x67,_0x11ea09);}try{const _0x1a7a39=_0x557892?.[_0x369aee(0x12b,0xf6)]||'POST',headers={'Content-Type':'application/json',..._0x557892?.['headers']};let response;const _0x27e368='/functions/v1/'+_0x356afc;switch(_0x1a7a39[_0x369aee(0x119,0xfe)]()){case'GET':response=await this['httpClient'][_0x369aee(0x1d7,0x171)](_0x27e368,{'headers':headers,'params':_0x557892?.['body']});break;case'POST':response=await this['httpClient']['post'](_0x27e368,_0x557892?.['body'],{'headers':headers});break;case'PUT':response=await this['httpClient']['put'](_0x27e368,_0x557892?.['body'],{'headers':headers});break;case'PATCH':response=await this[_0x369aee(0x139,0x13c)]['patch'](_0x27e368,_0x557892?.[_0x369aee(0x1b5,0x13d)],{'headers':headers});break;case'DELETE':response=await this['httpClient'][_0x369aee(0x10e,0x163)](_0x27e368,{'headers':headers,'data':_0x557892?.['body']});break;default:throw new EBaaSError('Unsupported\x20HTTP\x20method:\x20'+_0x1a7a39,0x190);}return{'data':response['data'],'error':null};}catch(_0x165119){return{'data':null,'error':_0x165119 instanceof EBaaSError?_0x165119:new EBaaSError(_0x165119 instanceof Error?_0x165119[_0x369aee(0xce,0xd0)]:_0x369aee(0x1bd,0x198),0x0,_0x165119)};}}async['list'](){function _0x379ceb(_0x4f1555,_0x478185){return _0x1cc1(_0x478185-0x22e,_0x4f1555);}try{const response=await this[_0x379ceb(0x3fc,0x3d1)][_0x379ceb(0x3a4,0x406)](_0x379ceb(0x433,0x432));return{'data':response[_0x379ceb(0x3fa,0x435)],'error':null};}catch(_0x4afca4){return{'data':null,'error':_0x4afca4 instanceof EBaaSError?_0x4afca4:new EBaaSError(_0x4afca4 instanceof Error?_0x4afca4[_0x379ceb(0x336,0x365)]:'Failed\x20to\x20list\x20functions',0x0,_0x4afca4)};}}async['get'](_0x46b45a){function _0x56570b(_0x500f67,_0x4e0636){return _0x1cc1(_0x500f67-0x1be,_0x4e0636);}try{const response=await this['httpClient']['get']('/functions/v1/'+_0x46b45a+'/info');return{'data':response[_0x56570b(0x3c5,0x3c7)],'error':null};}catch(_0x14736d){return{'data':null,'error':_0x14736d instanceof EBaaSError?_0x14736d:new EBaaSError(_0x14736d instanceof Error?_0x14736d[_0x56570b(0x2f5,0x279)]:'Failed\x20to\x20get\x20function',0x0,_0x14736d)};}}async['deploy'](_0x45b3b3,_0xe3238c){function _0x465662(_0x7727df,_0x2440d4){return _0x1cc1(_0x2440d4-0x3b1,_0x7727df);}try{const _0x580644=new FormData();if(_0xe3238c['code']instanceof File)_0x580644['append'](_0x465662(0x542,0x5c4),_0xe3238c['code']);else typeof _0xe3238c['code']===_0x465662(0x586,0x585)&&_0x580644[_0x465662(0x5ac,0x5a6)](_0x465662(0x61c,0x5c4),new Blob([_0xe3238c[_0x465662(0x5bf,0x5c4)]],{'type':_0x465662(0x57c,0x5e0)}),'index.ts');_0xe3238c['entrypoint']&&_0x580644[_0x465662(0x58c,0x5a6)]('entrypoint',_0xe3238c[_0x465662(0x58b,0x553)]);_0xe3238c[_0x465662(0x5d5,0x5e1)]&&_0x580644[_0x465662(0x5ad,0x5a6)]('env',JSON['stringify'](_0xe3238c[_0x465662(0x656,0x5e1)]));_0xe3238c['importMap']&&_0x580644['append'](_0x465662(0x527,0x4ec),JSON['stringify'](_0xe3238c['importMap']));_0xe3238c[_0x465662(0x558,0x586)]!==undefined&&_0x580644[_0x465662(0x541,0x5a6)](_0x465662(0x5a1,0x586),String(_0xe3238c['verify']));const response=await this['httpClient']['post'](_0x465662(0x4f6,0x4ff)+_0x45b3b3+'/deploy',_0x580644,{'headers':{'Content-Type':_0x465662(0x5b7,0x571)}});return{'data':response['data'],'error':null};}catch(_0x291ee2){return{'data':null,'error':_0x291ee2 instanceof EBaaSError?_0x291ee2:new EBaaSError(_0x291ee2 instanceof Error?_0x291ee2['message']:_0x465662(0x47d,0x4fc),0x0,_0x291ee2)};}}async['delete'](_0x35c956){function _0x4f9d77(_0x4e696a,_0x32c484){return _0x1cc1(_0x4e696a- -0x7,_0x32c484);}try{const response=await this['httpClient'][_0x4f9d77(0x1c3,0x248)](_0x4f9d77(0x147,0x1ca)+_0x35c956);return{'data':response[_0x4f9d77(0x200,0x26e)],'error':null};}catch(_0x437552){return{'data':null,'error':_0x437552 instanceof EBaaSError?_0x437552:new EBaaSError(_0x437552 instanceof Error?_0x437552[_0x4f9d77(0x130,0x186)]:_0x4f9d77(0x22a,0x1ba),0x0,_0x437552)};}}async[_0x2d9ed0(0x3c5,0x3c0)](_0x3599c9,_0x65417f){function _0x258db9(_0x1692db,_0x2b35d1){return _0x1cc1(_0x1692db- -0x2fd,_0x2b35d1);}try{const response=await this['httpClient'][_0x258db9(-0xdf,-0xa1)]('/functions/v1/'+_0x3599c9+_0x258db9(-0x14b,-0x10a),{'env':_0x65417f});return{'data':response[_0x258db9(-0xf6,-0xb7)],'error':null};}catch(_0x18f944){return{'data':null,'error':_0x18f944 instanceof EBaaSError?_0x18f944:new EBaaSError(_0x18f944 instanceof Error?_0x18f944[_0x258db9(-0x1c6,-0x149)]:_0x258db9(-0xec,-0x14e),0x0,_0x18f944)};}}async['getLogs'](_0x854431,_0x93bbef){function _0x39c207(_0xe5afee,_0x523f67){return _0x1cc1(_0x523f67-0x27b,_0xe5afee);}try{const _0x4b8b47=new URLSearchParams();_0x93bbef?.['limit']&&_0x4b8b47['append'](_0x39c207(0x3a6,0x3b3),String(_0x93bbef[_0x39c207(0x32e,0x3b3)]));_0x93bbef?.[_0x39c207(0x3f7,0x420)]&&_0x4b8b47['append'](_0x39c207(0x463,0x420),String(_0x93bbef[_0x39c207(0x411,0x420)]));_0x93bbef?.['level']&&_0x4b8b47[_0x39c207(0x433,0x470)]('level',_0x93bbef[_0x39c207(0x407,0x3de)]);const _0x438d8a=_0x39c207(0x421,0x3c9)+_0x854431+_0x39c207(0x3c9,0x3ae)+(_0x4b8b47[_0x39c207(0x428,0x3d6)]()?'?'+_0x4b8b47[_0x39c207(0x3c2,0x3d6)]():''),response=await this[_0x39c207(0x42e,0x41e)]['get'](_0x438d8a);return{'data':response['data'],'error':null};}catch(_0x4ed004){return{'data':null,'error':_0x4ed004 instanceof EBaaSError?_0x4ed004:new EBaaSError(_0x4ed004 instanceof Error?_0x4ed004[_0x39c207(0x3d2,0x3b2)]:_0x39c207(0x40d,0x408),0x0,_0x4ed004)};}}async[_0x2d9ed0(0x3df,0x41a)](_0x1c9f18,_0x179902){function _0x2cb924(_0x54d59e,_0x161dd5){return _0x1cc1(_0x161dd5-0x203,_0x54d59e);}try{const _0x109018=new URLSearchParams();_0x179902?.[_0x2cb924(0x3b5,0x354)]&&_0x109018[_0x2cb924(0x382,0x3f8)](_0x2cb924(0x3bb,0x354),_0x179902['period']);const _0x51bda8='/functions/v1/'+_0x1c9f18+'/metrics'+(_0x109018['toString']()?'?'+_0x109018[_0x2cb924(0x38b,0x35e)]():''),response=await this[_0x2cb924(0x350,0x3a6)][_0x2cb924(0x3dd,0x3db)](_0x51bda8);return{'data':response['data'],'error':null};}catch(_0x4afcad){return{'data':null,'error':_0x4afcad instanceof EBaaSError?_0x4afcad:new EBaaSError(_0x4afcad instanceof Error?_0x4afcad['message']:_0x2cb924(0x48b,0x417),0x0,_0x4afcad)};}}}class EBaaSClient{constructor(_0x2b5299,_0x48f6d9,_0x3637b1){this['options']=_0x3637b1;function _0x391538(_0x129cde,_0x3b52b8){return _0x1cc1(_0x129cde-0x3d2,_0x3b52b8);}this[_0x391538(0x575,0x5b5)]=new HttpClient({'url':_0x2b5299,'apiKey':_0x48f6d9,'timeout':0x7530,'headers':_0x3637b1?.['global']?.[_0x391538(0x5f2,0x627)]}),this[_0x391538(0x56b,0x5ce)]=new AuthClient(this['httpClient'],_0x3637b1?.[_0x391538(0x59e,0x533)]?.[_0x391538(0x57e,0x573)]),this[_0x391538(0x59e,0x5bc)]=new DatabaseClient(this['httpClient'],_0x3637b1?.['database']?.[_0x391538(0x57e,0x56b)]),this['storage']=new StorageClient(this['httpClient']),this['realtime']=new RealtimeClient(_0x2b5299,_0x48f6d9,_0x3637b1?.[_0x391538(0x531,0x4f6)]),this['functions']=new FunctionsClient(this['httpClient']),this[_0x391538(0x565,0x4f0)]();}[_0x2d9ed0(0x42b,0x3c8)](_0x184dcd){function _0x210000(_0x4c47c6,_0x355d1a){return _0x1cc1(_0x4c47c6- -0xcc,_0x355d1a);}return this[_0x210000(0x100,0xc6)][_0x210000(0x14e,0x168)](_0x184dcd);}[_0x2d9ed0(0x40a,0x418)](_0x11825a,_0x459990){function _0x57fa52(_0x4b9659,_0x33f3f0){return _0x1cc1(_0x33f3f0-0x376,_0x4b9659);}return this[_0x57fa52(0x563,0x542)][_0x57fa52(0x4f4,0x56f)](_0x11825a,_0x459990);}['bucket'](_0x5f8b3d){function _0x140f9b(_0xf1b979,_0x52779a){return _0x1cc1(_0x52779a-0x1b0,_0xf1b979);}return this[_0x140f9b(0x31d,0x326)]['from'](_0x5f8b3d);}[_0x2d9ed0(0x351,0x326)](_0x56a609){function _0x479af5(_0x100688,_0x5633c4){return _0x1cc1(_0x100688- -0x2a4,_0x5633c4);}return this[_0x479af5(-0x145,-0x103)][_0x479af5(-0x164,-0xf7)](_0x56a609);}[_0x2d9ed0(0x42e,0x3d7)](_0x2d75b4,_0x300464){return this['functions']['invoke'](_0x2d75b4,_0x300464);}async[_0x2d9ed0(0x3a4,0x391)](){function _0x5c31c3(_0x24c2cb,_0x5ca1e4){return _0x1cc1(_0x24c2cb-0x1bb,_0x5ca1e4);}if(this['options']?.[_0x5c31c3(0x387,0x3a3)]?.['autoDetectCustomDatabase'])try{await this['database']['initialize']();}catch(_0x5b3265){console[_0x5c31c3(0x3d6,0x3f6)]('Failed to initialize custom database detection:',_0x5b3265);}}async[_0x2d9ed0(0x419,0x3b8)](_0x570b71){this[_0x26f2ce(-0x133,-0x1a5)]['setWorkspaceId'](_0x570b71);function _0x26f2ce(_0x47959e,_0xa14cce){return _0x1cc1(_0x47959e- -0x2cc,_0xa14cce);}this['database'][_0x26f2ce(-0xc4,-0xe6)](_0x570b71),this['options']?.['database']?.['autoDetectCustomDatabase']&&await this['database']['initialize']();}async['configureCustomDatabase'](_0x14c63f){await this['database']['configureCustomDatabase'](_0x14c63f);}['getCustomDatabaseStatus'](){function _0x22f9b7(_0x25222c,_0x306cbd){return _0x1cc1(_0x25222c-0x178,_0x306cbd);}return this['database'][_0x22f9b7(0x3a0,0x390)]();}}function createClient(_0x3dc09d,_0x3cfa50,_0x153eb2){return new EBaaSClient(_0x3dc09d,_0x3cfa50,_0x153eb2);}const version=_0x2d9ed0(0x394,0x388);function _0x1cc1(_0x579a85,_0x44b311){const _0x501481=_0x5014();return _0x1cc1=function(_0x1cc137,_0x43300d){_0x1cc137=_0x1cc137-0x130;let _0x348c9f=_0x501481[_0x1cc137];if(_0x1cc1['gQEMuN']===undefined){var _0x215787=function(_0x1f1e26){const _0x57daed='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a928c='',_0x401160='';for(let _0x1e82aa=0x0,_0x18823a,_0xb0f5cb,_0x27c418=0x0;_0xb0f5cb=_0x1f1e26['charAt'](_0x27c418++);~_0xb0f5cb&&(_0x18823a=_0x1e82aa%0x4?_0x18823a*0x40+_0xb0f5cb:_0xb0f5cb,_0x1e82aa++%0x4)?_0x1a928c+=String['fromCharCode'](0xff&_0x18823a>>(-0x2*_0x1e82aa&0x6)):0x0){_0xb0f5cb=_0x57daed['indexOf'](_0xb0f5cb);}for(let _0x67ef13=0x0,_0x4707ea=_0x1a928c['length'];_0x67ef13<_0x4707ea;_0x67ef13++){_0x401160+='%'+('00'+_0x1a928c['charCodeAt'](_0x67ef13)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x401160);};_0x1cc1['oPmtIK']=_0x215787,_0x579a85=arguments,_0x1cc1['gQEMuN']=!![];}const _0x3aa26e=_0x501481[0x0],_0x4cbb01=_0x1cc137+_0x3aa26e,_0x527f8b=_0x579a85[_0x4cbb01];return!_0x527f8b?(_0x348c9f=_0x1cc1['oPmtIK'](_0x348c9f),_0x579a85[_0x4cbb01]=_0x348c9f):_0x348c9f=_0x527f8b,_0x348c9f;},_0x1cc1(_0x579a85,_0x44b311);}exports['AuthClient']=AuthClient;function _0x2d9ed0(_0x43bf20,_0x4f09d2){return _0x1cc1(_0x43bf20-0x211,_0x4f09d2);}exports[_0x2d9ed0(0x3bf,0x445)]=CustomDatabaseManager,exports[_0x2d9ed0(0x3a3,0x421)]=DatabaseClient,exports['EBaaSClient']=EBaaSClient,exports[_0x2d9ed0(0x450,0x3ff)]=EBaaSError,exports[_0x2d9ed0(0x3fc,0x3b7)]=FunctionsClient,exports[_0x2d9ed0(0x357,0x3c7)]=HttpClient,exports['QueryBuilder']=QueryBuilder,exports[_0x2d9ed0(0x3d3,0x3dc)]=RealtimeChannel,exports[_0x2d9ed0(0x3ac,0x335)]=RealtimeClient,exports[_0x2d9ed0(0x3cd,0x3e1)]=StorageBucket,exports[_0x2d9ed0(0x43b,0x3c2)]=StorageClient,exports['createClient']=createClient,exports['version']=version;