scimgateway 4.5.0 → 4.5.1

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
@@ -16,7 +16,7 @@ Validated through IdP's:
16
16
 
17
17
  Latest news:
18
18
 
19
- - Supports stream publishing mode having [SCIM Stream](https://elshaug.xyz/docs/scim-stream) as a prerequisite. In this mode, standard incoming SCIM requests from your Identity Provider (IdP) or API are directed and published to the stream. Subsequently, one of the gateways subscribing to the channel utilized by the publisher will manage the SCIM request, and response back to the publisher. Using SCIM Stream we have `egress/outbound only traffic` and get loadbalancing/failover by adding more gateways subscribing to same channel.
19
+ - Supports stream publishing mode having [SCIM Stream](https://elshaug.xyz/docs/scim-stream) as a prerequisite. In this mode, standard incoming SCIM requests from your Identity Provider (IdP) or API are directed and published to the stream. Subsequently, one of the gateways subscribing to the channel utilized by the publisher will manage the SCIM request, and response back. Using SCIM Stream we have egress/outbound only traffic and get loadbalancing/failover by adding more gateways subscribing to the same channel.
20
20
  - **BREAKING**: [SCIM Stream](https://elshaug.xyz/docs/scim-stream) is the modern way of user provisioning letting clients subscribe to messages instead of traditional IGA top-down provisioning. SCIM Gateway now offers enhanced functionality with support for message subscription and automated provisioning using SCIM Stream
21
21
  - Authentication PassThrough letting plugin pass authentication directly to endpoint for avoid maintaining secrets at the gateway. Kubernetes health checks and shutdown handler support
22
22
  - Supports OAuth Client Credentials authentication
@@ -1150,6 +1150,12 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1150
1150
 
1151
1151
  ## Change log
1152
1152
 
1153
+ ### v4.5.1
1154
+
1155
+ [Improved]
1156
+
1157
+ - scim-stream, client reconnect improvements
1158
+
1153
1159
  ### v4.5.0
1154
1160
 
1155
1161
  [Improved]
@@ -10,4 +10,4 @@
10
10
  // Note: scim-stream.js is part of the licensed SCIM Stream which is a prerequisite for message Pub/Sub
11
11
  // for details see: https://elshaug.xyz/docs/scim-stream
12
12
  //
13
- 'use strict';function a0_0x3a0f(_0x569f06,_0x5a5856){const _0x5f4acb=a0_0x5f4a();return a0_0x3a0f=function(_0x3a0fae,_0x7028ea){_0x3a0fae=_0x3a0fae-0x169;let _0x331567=_0x5f4acb[_0x3a0fae];return _0x331567;},a0_0x3a0f(_0x569f06,_0x5a5856);}const a0_0x4c7482=a0_0x3a0f;(function(_0x1d9060,_0x24e049){const _0x27c8e4=a0_0x3a0f,_0x39b059=_0x1d9060();while(!![]){try{const _0x1138db=-parseInt(_0x27c8e4(0x23e))/0x1*(-parseInt(_0x27c8e4(0x211))/0x2)+parseInt(_0x27c8e4(0x253))/0x3+parseInt(_0x27c8e4(0x21f))/0x4*(parseInt(_0x27c8e4(0x229))/0x5)+parseInt(_0x27c8e4(0x1f2))/0x6*(-parseInt(_0x27c8e4(0x191))/0x7)+parseInt(_0x27c8e4(0x186))/0x8*(parseInt(_0x27c8e4(0x24d))/0x9)+-parseInt(_0x27c8e4(0x1f9))/0xa+-parseInt(_0x27c8e4(0x256))/0xb;if(_0x1138db===_0x24e049)break;else _0x39b059['push'](_0x39b059['shift']());}catch(_0x5b6090){_0x39b059['push'](_0x39b059['shift']());}}}(a0_0x5f4a,0xe87c8));function a0_0x5f4a(){const _0x6538ad=['ETIMEDOUT','ConsumerEvents','data','length','\x20Create\x20User\x20userName=',']\x20error:\x20no\x20subscribers/responders\x20to\x20subject\x20','query',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','copyObj','includes','description','from','user','Events','\x20createUser()\x20obj=','call','push','maxReconnectAttempts','type',']\x20client\x20has\x20a\x20stale\x20connection\x20',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject','file','firstn',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','publisher\x20error:\x20none\x20JSON\x20formatted\x20response:\x20','putApi','{\x22error\x22:\x22','\x20Replace\x20User\x20id=',']\x20client\x20disconnected\x20',']\x20error:\x20','filter_subject','/certs/',']\x20subscriber[','message','drain','file-not-configured',']\x20connect\x20error:\x20','typeId','getGroups','\x20message:\x20','\x20role\x20removal\x20error:\x20','status','charAt','fold-to-ascii','baseEntity',']\x20error:\x20message\x20must\x20be\x20JSON\x20formatted',']\x20subscriber\x20stopped\x20error:\x20','pluginName','DebugEvents','128406VOAWBB','hasOwnProperty','SCIM\x20Stream','SIGTERM','publisher\x20not\x20initialized/connected','displayName',',\x20attributes=','2679390HSLNcu','../lib/utils','operation','config',']\x20initialization\x20certificate\x20error:\x20','constructor','jwtAuthenticator','\x20result=','certificate','modifyGroup','params','randomUUID',']\x20connected\x20',']\x20handling\x20\x22','groups','server_name','active',']\x20initialization\x20error:\x20missing\x20certificate\x20configuration','\x20not\x20equal\x20subscriber\x20configured\x20baseEntity=','readFileSync','true','Subscriber','Resources','sub','49684viDKMr','Msg-Id','reconnectTimeWait','ENOTFOUND','reconnect','\x27\x20not\x20supported','replaceUsrGrp','/Users/','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','Publisher','/approles','replaceDomains','\x20message\x20error\x20response:\x20','jwt','4LdTAmP','\x20getUserId()\x20error:\x20','isArray','roles','toLowerCase','tls','AckPolicy','HR.','Explicit','\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration','5446785nWIaPn','getUsers','isClosed','503','createUser',']\x20client\x20reconnected\x20','replace','onCreate','SCIM\x20Stream\x20-\x20Autogenerated','forEach','stringify','name','\x20error:\x20','modifyUser','obj','Operations','close','elementnumber','Reconnect','subscribe','createGroup','11FcGYjg','false','write','transports','deleteUser','subscriber\x20message\x20error:\x20message\x20not\x20JSON\x20formatted','getProcessed','mkdirSync','\x20handling\x20message:\x20','UnableConnectingService','\x20message\x20response:\x20','DeliverPolicy','authenticator',',\x20obj=','durable_','9loDBHC',']\x20closed\x20with\x20error:\x20','pingInterval',']\x20publisher[','deliver_policy','replaceAll','2470605vfYGyO','originalUrl','\x20-\x20','10827410rtWWJe','generateUserPassword','_autogenerated.cfg','\x20count=','publisher\x20response\x20error:\x20',']\x20initialization\x20error:\x20configuration\x20scim.usePutSoftSync\x20must\x20be\x20set\x20to\x20true\x20when\x20subscribing\x20to\x20ENTRA\x20or\x20HR\x20topics','SIGINT','skipConvertRolesToGroups','deleteUserOnLastGroupRoleRemoval','then','secret','attributes','handle','delete','startsWith',']\x20initialization\x20error:\x20missing\x20configuration\x20nats','\x20done',',\x20id=',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.tenant','usePutSoftSync','\x20missing\x20user\x20object\x20in\x20message:\x20','uppercase','User','info','exports','ack','ENTRA.','rejectUnauthorized','_info','\x20processing\x20incoming\x20message','crypto','Disconnect',']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20','maxPingOut','nats','decode','debug','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available','\x20message\x20json\x20parsing\x20error:\x20','existsSync','\x20message:\x20user\x20does\x20not\x20exist',',true','\x20Create\x20userName=','get','substring','modifyOnly','value','add',']\x20client\x20error\x20',']\x20client\x20consumer\x20error:\x20',']\x20initialization\x20error:\x20missing\x20configuration\x20stream.baseUrls','schemas','660496baIiYp','toUpperCase','remove','servers','deleteGroup','update','userName','consumers','display','connect','ConsumerNotFound','21jDyeoU','\x20error:\x20missing\x20result','foldReplacing','publish','level','password','\x20=>\x20subscriber\x20not\x20activated','\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true','\x20Delete\x20User\x20id=','append','waitOnFirstConnect','indexOf','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false','join','postApi','Error','Errors','tenant','gwName','parse','approles','doIncrement','request','normalize','toString','fsExistsSync','publisher[','body','StringCodec','activityOperation','Reconnecting','respond','string','configDir','baseUrls','getuniquevalue','subscriber\x20message\x20error:\x20message\x20missing\x20handle','ctxCopy','subject','lowercase','headers','patchApi','logger','error','\x20message\x20handled:\x20','path','getUsers()\x20getObj=','split'];a0_0x5f4a=function(){return _0x6538ad;};return a0_0x5f4a();}const nats=require('nats'),ascii127=require(a0_0x4c7482(0x1ec)),fs=require('fs'),utils=require(a0_0x4c7482(0x1fa)),path=require(a0_0x4c7482(0x1be)),crypto=require(a0_0x4c7482(0x170));module[a0_0x4c7482(0x16a)][a0_0x4c7482(0x20e)]=function(_0x392181){const _0x379b18=a0_0x4c7482,_0x6f88fe=_0x392181,_0x34238c={};let _0x48ddd5='';for(let _0x35f610=0x0;_0x35f610<_0x6f88fe['logger'][_0x379b18(0x241)][_0x379b18(0x1c4)];_0x35f610++){if(_0x6f88fe[_0x379b18(0x1bb)][_0x379b18(0x241)][_0x35f610][_0x379b18(0x234)]===_0x379b18(0x1d6)){_0x48ddd5=_0x6f88fe[_0x379b18(0x1bb)][_0x379b18(0x241)][_0x35f610][_0x379b18(0x195)];break;}}const _0x2a18d5=''+(_0x48ddd5==='debug'?'\x0a':''),_0xe561a0=async(_0x54b0ff,_0x478998)=>{const _0x4ae0f5=_0x379b18,_0x5c4f44=_0x34238c[_0x54b0ff]['config']?.['nats']?.[_0x4ae0f5(0x1b7)];let _0x354e8c;try{_0x354e8c=await nats[_0x4ae0f5(0x18f)](_0x478998);if(_0x354e8c[_0x4ae0f5(0x169)]['server_name']!==_0x4ae0f5(0x1f4)){_0x354e8c[_0x4ae0f5(0x239)]();return;}_0x34238c[_0x54b0ff]['nc']=_0x354e8c,_0x24da95(_0x54b0ff,_0x354e8c),_0x5958f3(_0x54b0ff,_0x354e8c);}catch(_0x2502db){_0x6f88fe['logger'][_0x4ae0f5(0x1bc)](_0x6f88fe['gwName']+'['+_0x6f88fe[_0x4ae0f5(0x1f0)]+']\x20subscriber['+_0x54b0ff+']['+_0x5c4f44+']\x20connect\x20error:\x20'+_0x2502db[_0x4ae0f5(0x1e2)]+_0x4ae0f5(0x228)),_0x478998[_0x4ae0f5(0x19b)]=!![];try{_0x354e8c=await nats['connect'](_0x478998);if(_0x354e8c['info'][_0x4ae0f5(0x208)]!==_0x4ae0f5(0x1f4)){_0x354e8c[_0x4ae0f5(0x239)]();return;}_0x34238c[_0x54b0ff]['nc']=_0x354e8c,_0x24da95(_0x54b0ff,_0x354e8c),_0x5958f3(_0x54b0ff,_0x354e8c);}catch(_0x27029c){_0x6f88fe[_0x4ae0f5(0x1bb)][_0x4ae0f5(0x1bc)](_0x6f88fe[_0x4ae0f5(0x1a3)]+'['+_0x6f88fe[_0x4ae0f5(0x1f0)]+_0x4ae0f5(0x1e1)+_0x54b0ff+']['+_0x5c4f44+']\x20connect\x20error:\x20'+_0x27029c['message']);return;}}_0x6f88fe[_0x4ae0f5(0x1bb)][_0x4ae0f5(0x176)](_0x6f88fe[_0x4ae0f5(0x1a3)]+'['+_0x6f88fe[_0x4ae0f5(0x1f0)]+']\x20subscriber['+_0x54b0ff+']['+_0x5c4f44+_0x4ae0f5(0x205)+(_0x478998[_0x4ae0f5(0x224)]['ca']?_0x4ae0f5(0x224):'')+'\x20'+_0x354e8c['getServer']()),_0x354e8c['closed']()[_0x4ae0f5(0x25f)](_0x2a4b11=>{const _0x4aaae2=_0x4ae0f5;_0x2a4b11&&_0x6f88fe['logger']['error'](_0x6f88fe[_0x4aaae2(0x1a3)]+'['+_0x6f88fe[_0x4aaae2(0x1f0)]+']\x20subscriber['+_0x54b0ff+']['+_0x5c4f44+_0x4aaae2(0x24e)+_0x2a4b11[_0x4aaae2(0x1e2)]);});};this['add']=async(_0x50b782,_0x53c632)=>{const _0x30556a=_0x379b18;if(!_0x53c632?.['nats']){_0x6f88fe[_0x30556a(0x1bb)][_0x30556a(0x1bc)](_0x6f88fe[_0x30556a(0x1a3)]+'['+_0x6f88fe[_0x30556a(0x1f0)]+_0x30556a(0x1e1)+_0x50b782+']\x20initialization\x20error:\x20missing\x20configuration\x20nats');return;}if(!_0x53c632?.[_0x30556a(0x174)]?.['tenant']){_0x6f88fe[_0x30556a(0x1bb)][_0x30556a(0x1bc)](_0x6f88fe[_0x30556a(0x1a3)]+'['+_0x6f88fe[_0x30556a(0x1f0)]+']\x20subscriber['+_0x50b782+_0x30556a(0x268));return;}if(!_0x53c632?.[_0x30556a(0x174)]?.[_0x30556a(0x1b7)]){_0x6f88fe[_0x30556a(0x1bb)][_0x30556a(0x1bc)](_0x6f88fe[_0x30556a(0x1a3)]+'['+_0x6f88fe[_0x30556a(0x1f0)]+_0x30556a(0x1e1)+_0x50b782+']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject');return;}if(!_0x53c632?.['certificate']?.['ca']){_0x6f88fe[_0x30556a(0x1bb)]['error'](_0x6f88fe['gwName']+'['+_0x6f88fe[_0x30556a(0x1f0)]+_0x30556a(0x1e1)+_0x50b782+_0x30556a(0x20a));return;}if(!_0x53c632['baseUrls']||!Array[_0x30556a(0x221)](_0x53c632[_0x30556a(0x1b3)])||_0x53c632[_0x30556a(0x1b3)][_0x30556a(0x1c4)]<0x1){_0x6f88fe[_0x30556a(0x1bb)][_0x30556a(0x1bc)](_0x6f88fe[_0x30556a(0x1a3)]+'['+_0x6f88fe[_0x30556a(0x1f0)]+_0x30556a(0x1e1)+_0x50b782+']\x20initialization\x20error:\x20missing\x20configuration\x20stream.baseUrls');return;}if(!_0x53c632['usePutSoftSync']){const _0xe9da9f=_0x53c632?.[_0x30556a(0x174)]?.['subject'][_0x30556a(0x187)]();if(_0xe9da9f[_0x30556a(0x264)](_0x30556a(0x16c))||_0xe9da9f[_0x30556a(0x264)](_0x30556a(0x226))){_0x6f88fe[_0x30556a(0x1bb)]['error'](_0x6f88fe[_0x30556a(0x1a3)]+'['+_0x6f88fe[_0x30556a(0x1f0)]+_0x30556a(0x1e1)+_0x50b782+_0x30556a(0x25b));return;}}const _0x420d14={};try{let _0x1af5c4=path['join'](_0x6f88fe['configDir'],_0x30556a(0x1e0),_0x53c632?.[_0x30556a(0x201)]?.['ca']||_0x30556a(0x1e4));(_0x53c632?.[_0x30556a(0x201)]?.['ca']?.[_0x30556a(0x264)]('/')||_0x53c632?.[_0x30556a(0x201)]?.['ca']?.[_0x30556a(0x1ca)]('\x5c'))&&(_0x1af5c4=_0x53c632['certificate']['ca']),_0x420d14['ca']=[fs['readFileSync'](_0x1af5c4)],_0x420d14[_0x30556a(0x16d)]=!![];}catch(_0x46ed99){_0x6f88fe['logger']['error'](_0x6f88fe['gwName']+'['+_0x6f88fe['pluginName']+_0x30556a(0x1e1)+_0x50b782+_0x30556a(0x1fd)+_0x46ed99[_0x30556a(0x1e2)]);return;}const _0x540870={},_0x5b3535=new TextEncoder()['encode'](_0x53c632?.[_0x30556a(0x174)]?.[_0x30556a(0x260)]),_0x29d97c=_0x53c632?.[_0x30556a(0x174)]?.[_0x30556a(0x21e)];_0x540870[_0x30556a(0x24a)]=nats['jwtAuthenticator'](_0x29d97c,_0x5b3535),_0x540870['servers']=_0x53c632[_0x30556a(0x1b3)],_0x540870[_0x30556a(0x224)]=_0x420d14,_0x540870[_0x30556a(0x19b)]=![],_0x540870[_0x30556a(0x215)]=!![],_0x540870['reconnectTimeWait']=0x3e8*0xa,_0x540870[_0x30556a(0x1d2)]=-0x1,_0x540870[_0x30556a(0x24f)]=0x2*0x3c*0x3e8,_0x540870[_0x30556a(0x173)]=0x5,_0x540870['debug']=![],_0x34238c[_0x50b782]={},_0x34238c[_0x50b782]['config']=_0x53c632,_0x34238c[_0x50b782]['nc']=undefined,_0x34238c[_0x50b782][_0x30556a(0x210)]=undefined,_0xe561a0(_0x50b782,_0x540870);};const _0x5958f3=async(_0x3c7e44,_0x4313c9)=>{const _0xe1c726=_0x379b18,_0x5cd06b=_0x34238c[_0x3c7e44]['config'],_0x314955=_0x5cd06b?.['nats']?.[_0xe1c726(0x1b7)];if(!_0x4313c9){_0x6f88fe[_0xe1c726(0x1bb)][_0xe1c726(0x1bc)](_0x6f88fe[_0xe1c726(0x1a3)]+'['+_0x6f88fe[_0xe1c726(0x1f0)]+']\x20subscriber['+_0x3c7e44+']['+_0x314955+_0xe1c726(0x1d8));return;}const _0x33d35c=async(_0x9021f1,_0x1778ca)=>{const _0x382189=_0xe1c726;try{_0x6f88fe['logger'][_0x382189(0x169)](_0x9021f1+_0x382189(0x246)+_0x1778ca);let _0x9b1a27;try{if(_0x5cd06b['replaceDomains']&&Array[_0x382189(0x221)](_0x5cd06b[_0x382189(0x21c)]))for(let _0x7fd0fb=0x0;_0x7fd0fb<_0x5cd06b[_0x382189(0x21c)][_0x382189(0x1c4)];_0x7fd0fb++){const _0x3d2efa=_0x5cd06b[_0x382189(0x21c)][_0x7fd0fb];if(!_0x3d2efa['from']||!_0x3d2efa[_0x382189(0x1cc)]['includes']('.')||!_0x3d2efa['to']||!_0x3d2efa['to'][_0x382189(0x1ca)]('.'))continue;const _0x6abe33=new RegExp('@'+_0x3d2efa[_0x382189(0x1cc)]+'\x22','gi');_0x1778ca=_0x1778ca['replace'](_0x6abe33,'@'+_0x3d2efa['to']+'\x22');}_0x9b1a27=JSON[_0x382189(0x1a4)](_0x1778ca);}catch(_0x5e32e8){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+_0x382189(0x178)+_0x5e32e8[_0x382189(0x1e2)]+_0x382189(0x1e8)+_0x1778ca),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}const _0x3c52ef=_0x9b1a27[_0x382189(0x1cd)];if(!_0x3c52ef){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+_0x382189(0x26a)+JSON[_0x382189(0x233)](_0x9b1a27)),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}if(!_0x3c52ef[_0x382189(0x18c)]){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+'\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20'+JSON[_0x382189(0x233)](_0x9b1a27)),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+'\x20done'+_0x2a18d5);return;}delete _0x3c52ef[_0x382189(0x185)];let _0x346024;_0x3c52ef['id']&&(_0x346024=_0x3c52ef['id'],delete _0x3c52ef['id']);let _0x2c19cd;_0x3c52ef[_0x382189(0x230)]&&(_0x2c19cd=utils[_0x382189(0x1c9)](_0x3c52ef[_0x382189(0x230)]),delete _0x3c52ef['onCreate']);await _0x510e06(_0x3c7e44,_0x3c52ef);const _0x5eb570=_0x3c52ef[_0x382189(0x18c)];let _0x4c2249,_0x305958;try{_0x4c2249=await _0xc9f437(_0x3c7e44,_0x382189(0x18c),_0x5eb570);}catch(_0x5883){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+'\x20getUserId()\x20error:\x20'+_0x5883[_0x382189(0x1e2)]),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);const _0x188e8e=['UnableConnectingHost',_0x382189(0x247),'ECONNREFUSED',_0x382189(0x214),_0x382189(0x1c1),'timeout'];for(const _0x4e4601 in _0x188e8e){if(_0x5883[_0x382189(0x1e2)]['includes'](_0x4e4601))return!![];}return;}if(!_0x5cd06b[_0x382189(0x25d)]){let _0x22fa9f=![];if(_0x9b1a27[_0x382189(0x238)]&&Array[_0x382189(0x221)](_0x9b1a27[_0x382189(0x238)]))for(let _0x551c12=0x0;_0x551c12<_0x9b1a27['Operations'][_0x382189(0x1c4)];_0x551c12++){const _0x15312e=_0x9b1a27[_0x382189(0x238)][_0x551c12];_0x15312e['path'][_0x382189(0x264)](_0x382189(0x222))&&(_0x15312e[_0x382189(0x1be)]=_0x382189(0x207),Array[_0x382189(0x221)](_0x15312e['value'])?(_0x15312e[_0x382189(0x180)][0x0]['id']=_0x15312e[_0x382189(0x180)][0x0][_0x382189(0x180)],_0x15312e[_0x382189(0x180)][0x0][_0x382189(0x18e)]=_0x15312e[_0x382189(0x180)][0x0][_0x382189(0x1d3)]+'\x20-\x20'+_0x15312e[_0x382189(0x180)][0x0][_0x382189(0x180)],delete _0x15312e[_0x382189(0x180)][0x0]['value'],delete _0x15312e[_0x382189(0x180)][0x0][_0x382189(0x1d3)]):_0x15312e[_0x382189(0x180)]=[{'id':_0x15312e[_0x382189(0x180)],'display':_0x15312e[_0x382189(0x180)]}],delete _0x15312e[_0x382189(0x1e6)],_0x22fa9f=!![]);}if(_0x3c52ef[_0x382189(0x222)]&&Array[_0x382189(0x221)](_0x3c52ef[_0x382189(0x222)])&&_0x3c52ef[_0x382189(0x222)]['length']>0x0){if(!_0x3c52ef[_0x382189(0x207)])_0x3c52ef[_0x382189(0x207)]=[];if(!Array[_0x382189(0x221)](_0x3c52ef[_0x382189(0x207)]))_0x3c52ef[_0x382189(0x207)]=[];for(let _0x3586e9=0x0;_0x3586e9<_0x3c52ef[_0x382189(0x222)][_0x382189(0x1c4)];_0x3586e9++){const _0x3294b8={},_0x51c5d3=_0x3c52ef[_0x382189(0x222)][_0x3586e9];_0x3294b8['value']=_0x51c5d3['value'],_0x3294b8[_0x382189(0x18e)]=_0x51c5d3['type']+_0x382189(0x255)+_0x51c5d3[_0x382189(0x18e)],_0x3c52ef[_0x382189(0x207)][_0x382189(0x1d1)](_0x3294b8);}delete _0x3c52ef['roles'],_0x22fa9f=!![];}if(_0x22fa9f)_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+'\x20roles\x20converted\x20to\x20groups:\x20'+JSON[_0x382189(0x233)](_0x9b1a27));}if(!_0x4c2249){if(_0x9b1a27['activityOperation']===_0x382189(0x242)){_0x6f88fe['logger']['debug'](_0x9021f1+'\x20Delete\x20User\x20userName='+_0x5eb570+_0x382189(0x17a)),_0x6f88fe['logger'][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}if(_0x5cd06b['modifyOnly']&&_0x5cd06b[_0x382189(0x17f)]===!![]){_0x6f88fe[_0x382189(0x1bb)]['debug'](_0x9021f1+'\x20Create\x20userName='+_0x5eb570+_0x382189(0x219)),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}if(Object['prototype']['hasOwnProperty'][_0x382189(0x1d0)](_0x3c52ef,_0x382189(0x209))){if(typeof _0x3c52ef[_0x382189(0x209)]==='string'){const _0x1cfe59=_0x3c52ef[_0x382189(0x209)][_0x382189(0x223)]();if(_0x1cfe59===_0x382189(0x20d))_0x3c52ef[_0x382189(0x209)]=!![];else{if(_0x1cfe59===_0x382189(0x23f))_0x3c52ef['active']=![];}}if(_0x3c52ef[_0x382189(0x209)]===![]){_0x6f88fe['logger'][_0x382189(0x176)](_0x9021f1+_0x382189(0x17c)+_0x5eb570+_0x382189(0x19d)),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+'\x20done'+_0x2a18d5);return;}}_0x6f88fe['logger'][_0x382189(0x176)](_0x9021f1+_0x382189(0x1c5)+_0x5eb570);const _0x5d18d6=utils[_0x382189(0x1c9)](_0x3c52ef);try{delete _0x5d18d6['groups'];!_0x5d18d6[_0x382189(0x196)]&&_0x5cd06b[_0x382189(0x257)]&&_0x5cd06b['generateUserPassword']===!![]&&(_0x5d18d6[_0x382189(0x196)]=utils['createRandomPassword'](0xf));if(_0x2c19cd||_0x346024){if(_0x2c19cd)for(const _0x31f21d in _0x2c19cd){_0x5d18d6[_0x31f21d]=_0x2c19cd[_0x31f21d];}if(_0x346024)_0x5d18d6['id']=_0x346024;await _0x510e06(_0x3c7e44,_0x5d18d6);}await _0x6f88fe[_0x382189(0x22d)](_0x3c7e44,_0x5d18d6),_0x3c52ef['groups']&&Array[_0x382189(0x221)](_0x3c52ef[_0x382189(0x207)])&&_0x3c52ef[_0x382189(0x207)]['length']>0x0&&(_0x305958=await _0xc9f437(_0x3c7e44,'userName',_0x5eb570));}catch(_0x572bcb){_0x6f88fe['logger']['error'](_0x9021f1+_0x382189(0x1cf)+JSON['stringify'](_0x5d18d6)+_0x382189(0x235)+_0x572bcb[_0x382189(0x1e2)]+'}'),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+'\x20done'+_0x2a18d5);return;}}if(_0x4c2249||_0x305958){if(_0x9b1a27[_0x382189(0x1ae)]===_0x382189(0x242)){if(_0x5cd06b[_0x382189(0x17f)]&&_0x5cd06b[_0x382189(0x17f)]===!![]){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+'\x20Delete\x20User\x20id='+_0x4c2249+_0x382189(0x198)),_0x6f88fe[_0x382189(0x1bb)]['debug'](_0x9021f1+'\x20done'+_0x2a18d5);return;}_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x199)+_0x4c2249);try{await _0x6f88fe['deleteUser'](_0x3c7e44,_0x4c2249);}catch(_0x2c35c1){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+_0x382189(0x199)+_0x4c2249+_0x382189(0x235)+_0x2c35c1['message']+'}'),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+'\x20done'+_0x2a18d5);return;}}else{if(_0x305958)_0x4c2249=_0x305958;_0x6f88fe[_0x382189(0x1bb)]['debug'](_0x9021f1+_0x382189(0x1dc)+_0x4c2249);const _0x1e96f1={};_0x1e96f1['set']=()=>{},_0x1e96f1[_0x382189(0x203)]={},_0x1e96f1[_0x382189(0x203)][_0x382189(0x1ed)]=_0x3c7e44,_0x1e96f1[_0x382189(0x203)]['id']=_0x4c2249,_0x1e96f1['request']={},_0x1e96f1[_0x382189(0x1a7)][_0x382189(0x254)]=_0x3c7e44?'/'+_0x3c7e44+_0x382189(0x218)+_0x4c2249:_0x382189(0x218)+_0x4c2249,_0x1e96f1['request'][_0x382189(0x1ac)]=_0x3c52ef;try{await _0x6f88fe[_0x382189(0x217)](_0x1e96f1);}catch(_0x318bfe){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+'\x20Replace\x20User\x20id='+_0x4c2249+_0x382189(0x235)+_0x318bfe['message']),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}if(_0x1e96f1[_0x382189(0x1ea)]&&(_0x1e96f1[_0x382189(0x1ea)]<0xc8||_0x1e96f1['status']>0x12b)){if(_0x1e96f1[_0x382189(0x1ac)]){if(_0x1e96f1[_0x382189(0x1ac)]['detail']){let _0x3a55f7=_0x1e96f1['body']['detail'];_0x3a55f7=_0x3a55f7['replace'](_0x6f88fe[_0x382189(0x1a3)]+'['+_0x6f88fe[_0x382189(0x1f0)]+']',''+_0x9021f1),_0x6f88fe['logger'][_0x382189(0x1bc)](''+_0x3a55f7);}else{if(_0x1e96f1[_0x382189(0x1ac)][_0x382189(0x1a1)]&&Array[_0x382189(0x221)](_0x1e96f1[_0x382189(0x1ac)][_0x382189(0x1a1)])&&_0x1e96f1[_0x382189(0x1ac)][_0x382189(0x1a1)]['length']>0x0){let _0x25e60a=_0x1e96f1[_0x382189(0x1ac)][_0x382189(0x1a1)][0x0][_0x382189(0x1cb)];_0x25e60a=_0x25e60a[_0x382189(0x22f)](_0x6f88fe['gwName']+'['+_0x6f88fe[_0x382189(0x1f0)]+']',''+_0x9021f1),_0x6f88fe['logger']['error'](''+_0x25e60a);}}}}if(_0x5cd06b[_0x382189(0x269)]){const [_0x28a5ad,_0x599011]=_0x6f88fe['convertedScim20']({'Operations':_0x9b1a27[_0x382189(0x238)]});if(_0x599011){_0x6f88fe['logger'][_0x382189(0x1bc)](_0x9021f1+_0x382189(0x1dc)+_0x4c2249+'\x20convertedScim20\x20error:\x20'+_0x599011[_0x382189(0x1e2)]),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}const _0x36ed8c=[];if(_0x28a5ad[_0x382189(0x222)]&&Array[_0x382189(0x221)](_0x28a5ad[_0x382189(0x222)]))for(let _0x255899=0x0;_0x255899<_0x28a5ad[_0x382189(0x222)][_0x382189(0x1c4)];_0x255899++){_0x28a5ad[_0x382189(0x222)][_0x255899][_0x382189(0x1fb)]&&_0x28a5ad[_0x382189(0x222)][_0x255899][_0x382189(0x1fb)]===_0x382189(0x263)&&_0x36ed8c[_0x382189(0x1d1)](_0x28a5ad[_0x382189(0x222)][_0x255899]);}if(_0x36ed8c['length']>0x0)try{await _0x6f88fe[_0x382189(0x236)](_0x3c7e44,_0x4c2249,{'roles':_0x36ed8c});}catch(_0x371eaa){_0x6f88fe[_0x382189(0x1bb)]['error'](_0x9021f1+_0x382189(0x1dc)+_0x4c2249+_0x382189(0x1e9)+_0x371eaa['message']);}const _0x45c9e0=[];if(_0x28a5ad[_0x382189(0x207)]&&Array[_0x382189(0x221)](_0x28a5ad['groups']))for(let _0x166310=0x0;_0x166310<_0x28a5ad[_0x382189(0x207)]['length'];_0x166310++){_0x28a5ad[_0x382189(0x207)][_0x166310]['operation']&&_0x28a5ad['groups'][_0x166310][_0x382189(0x1fb)]===_0x382189(0x263)&&_0x45c9e0[_0x382189(0x1d1)](_0x28a5ad[_0x382189(0x207)][_0x166310]);}if(_0x45c9e0[_0x382189(0x1c4)]>0x0)for(let _0x576f78=0x0;_0x576f78<_0x45c9e0[_0x382189(0x1c4)];_0x576f78++){try{await _0x6f88fe[_0x382189(0x202)](_0x3c7e44,_0x45c9e0[_0x576f78]['id'],{'members':[{'operation':_0x382189(0x263),'value':_0x4c2249}]});}catch(_0x33b55d){_0x6f88fe[_0x382189(0x1bb)]['error'](_0x9021f1+_0x382189(0x1dc)+_0x4c2249+'\x20group\x20removal\x20error:\x20'+_0x33b55d['message']);}}}if(_0x5cd06b[_0x382189(0x25e)]&&_0x9b1a27['activityOperation']===_0x382189(0x236)){if(_0x3c52ef['groups']&&Array[_0x382189(0x221)](_0x3c52ef[_0x382189(0x207)])&&_0x3c52ef[_0x382189(0x207)][_0x382189(0x1c4)]===0x0){if(_0x3c52ef[_0x382189(0x222)]&&Array[_0x382189(0x221)](_0x3c52ef[_0x382189(0x222)])&&_0x3c52ef[_0x382189(0x222)]['length']===0x0){if(_0x9b1a27[_0x382189(0x238)]&&Array[_0x382189(0x221)](_0x9b1a27[_0x382189(0x238)])&&_0x9b1a27[_0x382189(0x238)][_0x382189(0x1c4)]>0x0){let _0x452cc8=![];for(let _0x331e7c=0x0;_0x331e7c<_0x9b1a27[_0x382189(0x238)][_0x382189(0x1c4)];_0x331e7c++){const _0x497b8c=_0x9b1a27[_0x382189(0x238)][_0x331e7c];if(_0x497b8c['op']===_0x382189(0x188)){if(_0x497b8c['path']){if(_0x497b8c[_0x382189(0x1be)]['startsWith'](_0x382189(0x222))&&_0x497b8c[_0x382189(0x1e6)]){_0x452cc8=!![];break;}else{if(_0x497b8c[_0x382189(0x1be)]===_0x382189(0x207)){_0x452cc8=!![];break;}}}}}if(_0x452cc8){_0x6f88fe[_0x382189(0x1bb)]['debug'](_0x9021f1+_0x382189(0x199)+_0x4c2249);try{await _0x6f88fe['deleteUser'](_0x3c7e44,_0x4c2249);}catch(_0x4d0c0d){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x9021f1+_0x382189(0x199)+_0x4c2249+_0x382189(0x235)+_0x4d0c0d[_0x382189(0x1e2)]+'}'),_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);return;}}}}}}}}_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x176)](_0x9021f1+_0x382189(0x266)+_0x2a18d5);}catch(_0x539bca){_0x6f88fe[_0x382189(0x1bb)][_0x382189(0x1bc)](_0x6f88fe[_0x382189(0x1a3)]+'['+_0x6f88fe[_0x382189(0x1f0)]+_0x382189(0x1e1)+_0x3c7e44+']['+_0x314955+_0x382189(0x1de)+_0x539bca[_0x382189(0x1e2)]+_0x382189(0x197)+_0x2a18d5);}},_0x288a07=nats['StringCodec'](),_0x3080fe=_0x4313c9['jetstream'](),_0x1def85=(_0xe1c726(0x24c)+_0x6f88fe[_0xe1c726(0x1f0)]+'_'+_0x3c7e44)[_0xe1c726(0x252)]('*','#')[_0xe1c726(0x252)]('>','##')[_0xe1c726(0x252)]('.','_'),_0x4f5fee=_0x314955[_0xe1c726(0x1c0)]('.')[0x0][_0xe1c726(0x187)]()==='GW',_0x5edd18=async()=>{const _0x12e952=_0xe1c726;try{let _0x552e4d;const _0x4d4196=''+_0x5cd06b?.[_0x12e952(0x174)]?.[_0x12e952(0x1a2)],_0x1e426c=await _0x4313c9['jetstreamManager'](),_0x1d81e2=async()=>{const _0x2611bc=_0x12e952;let _0x3ef7f4;try{_0x3ef7f4=await _0x3080fe[_0x2611bc(0x18d)][_0x2611bc(0x17d)](_0x4d4196,_0x1def85);}catch(_0x31fa7c){const _0x32304e={'durable_name':_0x1def85,'deliver_policy':nats[_0x2611bc(0x249)]['All'],'ack_policy':nats[_0x2611bc(0x225)][_0x2611bc(0x227)],'filter_subject':_0x314955};await _0x1e426c['consumers'][_0x2611bc(0x181)](_0x4d4196,_0x32304e),_0x3ef7f4=await _0x3080fe['consumers'][_0x2611bc(0x17d)](_0x4d4196,_0x1def85);}if(_0x3ef7f4?.['_info']?.[_0x2611bc(0x1fc)]?.[_0x2611bc(0x251)]!=='all')throw new Error('internal\x20stream\x20policy\x20have\x20been\x20changed\x20-\x20central\x20SCIM\x20Stream\x20must\x20be\x20stopped\x20and\x20corresponding\x20./jetstream\x20folder\x20deleted\x20before\x20startup\x20allowing\x20new\x20policy');_0x3ef7f4?.[_0x2611bc(0x16e)]?.[_0x2611bc(0x1fc)]?.[_0x2611bc(0x1df)]!==_0x314955&&(await _0x1e426c[_0x2611bc(0x18d)][_0x2611bc(0x18b)](_0x4d4196,_0x1def85,{'filter_subject':_0x314955}),_0x3ef7f4=await _0x3080fe[_0x2611bc(0x18d)]['get'](_0x4d4196,_0x1def85)),_0x552e4d=await _0x3ef7f4['consume']({'max_messages':0x64});};await _0x1d81e2();const _0x442d80=async()=>{const _0x2a48d7=_0x12e952;for await(const _0x41233c of await _0x552e4d[_0x2a48d7(0x1ea)]()){switch(_0x41233c[_0x2a48d7(0x1d3)]){case nats[_0x2a48d7(0x1c2)][_0x2a48d7(0x190)]:if(_0x41233c[_0x2a48d7(0x1c3)]===0x1)_0x6f88fe['logger'][_0x2a48d7(0x169)](_0x6f88fe[_0x2a48d7(0x1a3)]+'['+_0x6f88fe[_0x2a48d7(0x1f0)]+_0x2a48d7(0x1e1)+_0x3c7e44+']['+_0x314955+_0x2a48d7(0x172)+_0x41233c[_0x2a48d7(0x1d3)]),_0x1d81e2();else _0x41233c[_0x2a48d7(0x1c3)]%0xa===0x0&&_0x6f88fe['logger'][_0x2a48d7(0x1bc)](_0x6f88fe[_0x2a48d7(0x1a3)]+'['+_0x6f88fe[_0x2a48d7(0x1f0)]+_0x2a48d7(0x1e1)+_0x3c7e44+']['+_0x314955+_0x2a48d7(0x183)+_0x41233c[_0x2a48d7(0x1d3)]+_0x2a48d7(0x259)+_0x41233c[_0x2a48d7(0x1c3)]);break;}}};_0x442d80();for await(const _0x3c66b2 of _0x552e4d){if(!_0x3c66b2[_0x12e952(0x1b9)]||!_0x3c66b2[_0x12e952(0x1b9)][_0x12e952(0x17d)](_0x12e952(0x212))){_0x3c66b2[_0x12e952(0x16b)]();continue;}const _0x34caad=_0x6f88fe[_0x12e952(0x1a3)]+'['+_0x6f88fe[_0x12e952(0x1f0)]+_0x12e952(0x1e1)+_0x3c7e44+']['+_0x3c66b2[_0x12e952(0x1b7)]+']['+_0x552e4d[_0x12e952(0x244)]()+']['+(_0x3c66b2['headers']?_0x3c66b2[_0x12e952(0x1b9)]['get'](_0x12e952(0x212)):'')+']',_0x56619f=_0x288a07[_0x12e952(0x175)](_0x3c66b2[_0x12e952(0x1c3)]),_0x495127=await _0x33d35c(_0x34caad,_0x56619f);if(!_0x495127||_0x495127!==!![])_0x3c66b2[_0x12e952(0x16b)]();else _0x6f88fe[_0x12e952(0x1bb)][_0x12e952(0x1bc)](_0x34caad+'\x20subscriber\x20error:\x20scimgateway\x20endpoint\x20connect\x20problem\x20-\x20will\x20do\x20auto\x20retry\x20until\x20connected');}}catch(_0x5dfdcd){_0x6f88fe['logger']['error'](_0x6f88fe[_0x12e952(0x1a3)]+'['+_0x6f88fe[_0x12e952(0x1f0)]+_0x12e952(0x1e1)+_0x3c7e44+']['+_0x314955+_0x12e952(0x1ef)+_0x5dfdcd['message']);}},_0x117989=async()=>{const _0x3df7f6=_0xe1c726,_0x20fee2=_0x4313c9[_0x3df7f6(0x23c)](_0x314955,{'max':0x64});for await(const _0x5c0ae7 of _0x20fee2){if(!_0x5c0ae7[_0x3df7f6(0x1b9)]||!_0x5c0ae7[_0x3df7f6(0x1b9)][_0x3df7f6(0x17d)](_0x3df7f6(0x212)))continue;let _0xe5e982,_0x3a5463;try{try{_0xe5e982=JSON[_0x3df7f6(0x1a4)](_0x5c0ae7[_0x3df7f6(0x1b1)]());}catch(_0x22d069){const _0x5ec752=_0x3df7f6(0x243);_0x6f88fe[_0x3df7f6(0x1bb)]['error'](_0x6f88fe[_0x3df7f6(0x1a3)]+'['+_0x6f88fe[_0x3df7f6(0x1f0)]+']\x20subscriber['+_0x3c7e44+']['+_0x314955+']\x20'+_0x5ec752+':\x20'+_0x5c0ae7[_0x3df7f6(0x1b1)]());throw new Error(_0x5ec752);}if(!_0xe5e982||!_0xe5e982['handle']){const _0x582f57=_0x3df7f6(0x1b5);_0x6f88fe['logger'][_0x3df7f6(0x1bc)](_0x6f88fe[_0x3df7f6(0x1a3)]+'['+_0x6f88fe[_0x3df7f6(0x1f0)]+']\x20subscriber['+_0x3c7e44+']['+_0x314955+']\x20'+_0x582f57+':\x20'+_0xe5e982);throw new Error(_0x582f57);}!Object['prototype'][_0x3df7f6(0x1f3)][_0x3df7f6(0x1d0)](_0xe5e982,'baseEntity')&&(_0xe5e982[_0x3df7f6(0x1ed)]='undefined');if(_0xe5e982[_0x3df7f6(0x1ed)]!==_0x3c7e44){const _0x1c3812='subscriber\x20message\x20error:\x20message\x20baseEntity='+_0xe5e982[_0x3df7f6(0x1ed)]+_0x3df7f6(0x20b)+_0x3c7e44;_0x6f88fe[_0x3df7f6(0x1bb)][_0x3df7f6(0x1bc)](_0x6f88fe[_0x3df7f6(0x1a3)]+'['+_0x6f88fe['pluginName']+_0x3df7f6(0x1e1)+_0x3c7e44+']['+_0x314955+']\x20'+_0x1c3812);throw new Error(_0x1c3812);}_0x3a5463=_0x6f88fe['gwName']+'['+_0x6f88fe[_0x3df7f6(0x1f0)]+_0x3df7f6(0x1e1)+_0x3c7e44+']['+_0x5c0ae7[_0x3df7f6(0x1b7)]+']['+(_0x5c0ae7['headers']?_0x5c0ae7[_0x3df7f6(0x1b9)][_0x3df7f6(0x17d)]('Msg-Id'):'')+']',_0x6f88fe[_0x3df7f6(0x1bb)]['debug'](_0x3a5463+_0x3df7f6(0x16f));let _0x102cae,_0x272d2b;switch(_0xe5e982[_0x3df7f6(0x262)]){case _0x3df7f6(0x22a):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['obj'],_0xe5e982[_0x3df7f6(0x261)],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x1e7):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['obj'],_0xe5e982['attributes'],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x22d):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982[_0x3df7f6(0x237)],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x23d):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['obj'],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x242):_0x102cae=await _0x6f88fe[_0xe5e982['handle']](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x18a):_0x102cae=await _0x6f88fe[_0xe5e982['handle']](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x1b6)]);break;case'modifyUser':_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x237)],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x202):_0x102cae=await _0x6f88fe[_0xe5e982['handle']](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x237)],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x217):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0xe5e982['ctx']);break;case _0x3df7f6(0x19f):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982[_0x3df7f6(0x237)],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x1da):_0x102cae=await _0x6f88fe[_0xe5e982['handle']](_0x3c7e44,_0xe5e982['id'],_0xe5e982['obj'],_0xe5e982[_0x3df7f6(0x1b6)]);break;case _0x3df7f6(0x1ba):_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x237)],_0xe5e982[_0x3df7f6(0x1b6)]);break;case'getApi':_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x1c7)],_0xe5e982[_0x3df7f6(0x237)],_0xe5e982['ctxCopy']);break;case'deleteApi':_0x102cae=await _0x6f88fe[_0xe5e982[_0x3df7f6(0x262)]](_0x3c7e44,_0xe5e982['id'],_0xe5e982[_0x3df7f6(0x1b6)]);break;default:_0x272d2b='subscriber\x20message\x20error:\x20handle\x20\x27'+_0xe5e982['handle']+_0x3df7f6(0x216),_0x6f88fe[_0x3df7f6(0x1bb)][_0x3df7f6(0x1bc)](_0x6f88fe[_0x3df7f6(0x1a3)]+'['+_0x6f88fe['pluginName']+_0x3df7f6(0x1e1)+_0x3c7e44+']['+_0x314955+']\x20'+_0x272d2b);throw new Error(_0x272d2b);}if(!_0x102cae)_0x102cae=null;const _0x2f4d9e=JSON[_0x3df7f6(0x233)](_0x102cae);_0x5c0ae7[_0x3df7f6(0x1b0)](_0x2f4d9e),_0x6f88fe[_0x3df7f6(0x1bb)][_0x3df7f6(0x169)](_0x3a5463+_0x3df7f6(0x1bd)+_0xe5e982[_0x3df7f6(0x262)]+_0x3df7f6(0x24b)+(_0xe5e982[_0x3df7f6(0x237)]?JSON['stringify'](_0xe5e982['obj']):'')+_0x3df7f6(0x267)+(_0xe5e982['id']?_0xe5e982['id']:'')+',\x20attributes='+(_0xe5e982[_0x3df7f6(0x261)]?_0xe5e982[_0x3df7f6(0x261)]:'')+_0x3df7f6(0x248)+_0x2f4d9e+_0x2a18d5);}catch(_0x162b1a){const _0x50f198=_0x3df7f6(0x1db)+_0x162b1a[_0x3df7f6(0x1e2)]+'\x22,\x22errName\x22:\x22'+_0x162b1a[_0x3df7f6(0x234)]+'\x22}';_0x5c0ae7[_0x3df7f6(0x1b0)](_0x50f198),_0x6f88fe['logger'][_0x3df7f6(0x169)]((_0x3a5463||'')+_0x3df7f6(0x1bd)+_0xe5e982[_0x3df7f6(0x262)]+_0x3df7f6(0x24b)+(_0xe5e982[_0x3df7f6(0x237)]?JSON[_0x3df7f6(0x233)](_0xe5e982['obj']):'')+_0x3df7f6(0x267)+(_0xe5e982['id']?_0xe5e982['id']:'')+_0x3df7f6(0x1f8)+(_0xe5e982['attributes']?_0xe5e982['attributes']:'')+_0x3df7f6(0x21d)+_0x50f198+_0x2a18d5);}}};if(_0x4f5fee)_0x117989();else _0x5edd18();},_0x24da95=async(_0x3e52e2,_0x34f5dc)=>{const _0x17a3f7=_0x379b18,_0x549af0=_0x34238c[_0x3e52e2]['config']?.['nats']?.[_0x17a3f7(0x1b7)];let _0x5ddd20=0x0;for await(const _0x4e7829 of _0x34f5dc[_0x17a3f7(0x1ea)]()){switch(_0x4e7829[_0x17a3f7(0x1d3)]){case nats[_0x17a3f7(0x1ce)]['Disconnect']:_0x6f88fe[_0x17a3f7(0x1bb)][_0x17a3f7(0x1bc)](_0x6f88fe[_0x17a3f7(0x1a3)]+'['+_0x6f88fe[_0x17a3f7(0x1f0)]+_0x17a3f7(0x1e1)+_0x3e52e2+']['+_0x549af0+_0x17a3f7(0x1dd)+_0x4e7829[_0x17a3f7(0x1c3)]+_0x17a3f7(0x177)),_0x5ddd20=0x0;break;case nats[_0x17a3f7(0x1ce)]['Reconnect']:_0x6f88fe[_0x17a3f7(0x1bb)][_0x17a3f7(0x169)](_0x6f88fe['gwName']+'['+_0x6f88fe[_0x17a3f7(0x1f0)]+_0x17a3f7(0x1e1)+_0x3e52e2+']['+_0x549af0+_0x17a3f7(0x22e)+_0x4e7829['data']);break;case nats[_0x17a3f7(0x1ce)]['Error']:_0x6f88fe['logger'][_0x17a3f7(0x1bc)](_0x6f88fe[_0x17a3f7(0x1a3)]+'['+_0x6f88fe['pluginName']+']\x20subscriber['+_0x3e52e2+']['+_0x549af0+_0x17a3f7(0x182)+_0x4e7829[_0x17a3f7(0x1c3)]);break;case nats[_0x17a3f7(0x1f1)][_0x17a3f7(0x1af)]:_0x5ddd20+=0x1;_0x5ddd20%0x1e===0x0&&_0x6f88fe[_0x17a3f7(0x1bb)]['debug'](_0x6f88fe[_0x17a3f7(0x1a3)]+'['+_0x6f88fe[_0x17a3f7(0x1f0)]+_0x17a3f7(0x1e1)+_0x3e52e2+']['+_0x549af0+_0x17a3f7(0x1c8)+_0x4e7829[_0x17a3f7(0x1c3)]+'\x20(count='+_0x5ddd20+')');break;case nats[_0x17a3f7(0x1f1)]['StaleConnection']:_0x6f88fe['logger']['debug'](_0x6f88fe[_0x17a3f7(0x1a3)]+'['+_0x6f88fe['pluginName']+_0x17a3f7(0x1e1)+_0x3e52e2+']['+_0x549af0+_0x17a3f7(0x1d4)+_0x4e7829[_0x17a3f7(0x1c3)]);break;}}};process['on']('SIGTERM',async()=>{const _0x46cc7f=_0x379b18;for(const _0x21264c in _0x34238c){_0x34238c[_0x21264c]['nc']&&!_0x34238c[_0x21264c]['nc']['isClosed']()&&await _0x34238c[_0x21264c]['nc'][_0x46cc7f(0x1e3)]();}}),process['on'](_0x379b18(0x25c),async()=>{const _0x1243a3=_0x379b18;for(const _0x2fff26 in _0x34238c){_0x34238c[_0x2fff26]['nc']&&!_0x34238c[_0x2fff26]['nc'][_0x1243a3(0x22b)]()&&await _0x34238c[_0x2fff26]['nc'][_0x1243a3(0x1e3)]();}});const _0xc9f437=async(_0x15b0c5,_0x2d44fc,_0x26defc)=>{const _0x4638d4=_0x379b18,_0x9a1e08={'attribute':_0x2d44fc,'operator':'eq','value':_0x26defc,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x5656e9=[_0x2d44fc];if(_0x2d44fc!=='id')_0x5656e9[_0x4638d4(0x1d1)]('id');try{const _0x2eee51=await _0x6f88fe[_0x4638d4(0x22a)](_0x15b0c5,_0x9a1e08,_0x5656e9);if(!_0x2eee51||!_0x2eee51['Resources']||!Array[_0x4638d4(0x221)](_0x2eee51[_0x4638d4(0x20f)]))throw new Error('getUsers()\x20getObj='+JSON[_0x4638d4(0x233)](_0x9a1e08)+_0x4638d4(0x192));if(_0x2eee51['Resources'][_0x4638d4(0x1c4)]===0x0)return null;else{if(_0x2eee51[_0x4638d4(0x20f)][_0x4638d4(0x1c4)]>0x2)throw new Error(_0x4638d4(0x1bf)+JSON[_0x4638d4(0x233)](_0x9a1e08)+'\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}');else{const _0x21d32a=_0x2eee51[_0x4638d4(0x20f)][0x0];if(!_0x21d32a['id'])throw new Error(_0x4638d4(0x1bf)+JSON[_0x4638d4(0x233)](_0x9a1e08)+_0x4638d4(0x200)+JSON['stringify'](_0x21d32a)+'\x20error:\x20missing\x20id}');return decodeURIComponent(_0x21d32a['id']);}}}catch(_0x26e6fc){throw new Error('getUsers()\x20getObj='+JSON[_0x4638d4(0x233)](_0x9a1e08)+_0x4638d4(0x235)+_0x26e6fc['message']+'}');}},_0x4cb8df=_0x106837=>{const _0x34ce47=_0x379b18;if(!_0x106837||typeof _0x106837!==_0x34ce47(0x1b1))return[null,null];_0x106837=_0x106837['trim']();const _0x510754=_0x106837[_0x34ce47(0x19c)]('(');if(_0x510754<0x1)return[null,null];if(_0x106837[_0x34ce47(0x17e)](_0x106837[_0x34ce47(0x1c4)]-0x1)!==')')return[null,null];if(_0x189785(_0x106837,'(')!==_0x189785(_0x106837,')'))return[null,null];const _0x32efd2=_0x106837[_0x34ce47(0x17e)](0x0,_0x510754),_0x19f6b7=_0x106837[_0x34ce47(0x17e)](_0x510754+0x1,_0x106837[_0x34ce47(0x1c4)]-0x1);let _0x8677d8=[];const _0x3eb682=_0x19f6b7['split'](',');let _0x30df3a='';for(let _0x4d7e72=0x0;_0x4d7e72<_0x3eb682[_0x34ce47(0x1c4)];_0x4d7e72++){const _0x4b12c9=_0x30df3a?_0x30df3a+','+_0x3eb682[_0x4d7e72]:_0x3eb682[_0x4d7e72],_0x539f62=_0x189785(_0x4b12c9,'('),_0x426faf=_0x189785(_0x4b12c9,')');if(_0x539f62===_0x426faf)_0x8677d8[_0x34ce47(0x1d1)](_0x1bdb60(_0x4b12c9,'\x22')),_0x30df3a='';else{if(_0x30df3a)_0x30df3a+=','+_0x3eb682[_0x4d7e72];else _0x30df3a+=_0x3eb682[_0x4d7e72];}}if(_0x8677d8[_0x34ce47(0x1c4)]===0x0)_0x8677d8=null;return[_0x32efd2,_0x8677d8];};function _0x189785(_0x507450,_0x536d6a){const _0x19e7e0=_0x379b18;let _0x8acd0f=0x0;for(let _0x204f2b=0x0;_0x204f2b<_0x507450[_0x19e7e0(0x1c4)];_0x204f2b++){_0x507450[_0x19e7e0(0x1eb)](_0x204f2b)===_0x536d6a&&(_0x8acd0f+=0x1);}return _0x8acd0f;}const _0x1bdb60=(_0x17744d,_0x33fcce)=>{const _0x33268d=_0x379b18;if(typeof _0x17744d!==_0x33268d(0x1b1)||typeof _0x33fcce!==_0x33268d(0x1b1))return _0x17744d;if(_0x17744d[_0x33268d(0x1c4)]===0x1)return _0x17744d;if(_0x33fcce['length']!==0x1)return _0x17744d;return _0x17744d=_0x17744d['trim'](),_0x17744d['substring'](0x0,0x1)===_0x33fcce&&(_0x17744d=_0x17744d['substring'](0x1)),_0x17744d[_0x33268d(0x17e)](_0x17744d[_0x33268d(0x1c4)]-0x1)===_0x33fcce&&(_0x17744d=_0x17744d[_0x33268d(0x17e)](0x0,_0x17744d[_0x33268d(0x1c4)]-0x1)),_0x17744d;},_0x24a1df=async(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0xe36cc9)=>{const _0x4a284d=_0x379b18;if(!_0x1aa4c2||!_0x2d8ca9||!_0xe36cc9)return null;const [_0x42e329,_0x5ad581]=_0x4cb8df(_0xe36cc9);if(!_0x42e329||!_0x5ad581){const _0xe85623=_0xe36cc9[_0x4a284d(0x1c0)]('(');if(_0xe85623[_0x4a284d(0x1c4)]>0x1){const _0x3c2fab=['lowercase','uppercase',_0x4a284d(0x1d7),_0x4a284d(0x23a),_0x4a284d(0x19e),_0x4a284d(0x22f),_0x4a284d(0x1a8),'increment',_0x4a284d(0x1b4)],_0x51540a=_0xe85623[0x0]['toLowerCase']();if(_0x3c2fab[_0x4a284d(0x1ca)](_0x51540a))return null;}return _0xe36cc9;}for(let _0x1a9af6=0x0;_0x1a9af6<_0x5ad581[_0x4a284d(0x1c4)];_0x1a9af6++){if(_0x5ad581[_0x1a9af6][_0x4a284d(0x17e)](0x0,0x1)==='['){const _0x29d820=_0x5ad581[_0x1a9af6][_0x4a284d(0x19c)](']');if(_0x29d820<0x0)return null;const _0x3ed9e=_0x5ad581[_0x1a9af6][_0x4a284d(0x17e)](0x1,_0x29d820),_0xd5615c=_0x3ed9e['split']('.');let _0x4e928b;for(let _0x153efe=0x0;_0x153efe<_0xd5615c[_0x4a284d(0x1c4)];_0x153efe++){if(_0x153efe===0x0)_0x4e928b=_0x1aa4c2[_0xd5615c[_0x153efe]];else{if(!_0x4e928b)return null;_0x4e928b=_0x4e928b[_0xd5615c[_0x153efe]];}}if(!_0x4e928b)return null;_0x5ad581[_0x1a9af6]=_0x4e928b;}}for(let _0x2b263d=0x0;_0x2b263d<_0x5ad581[_0x4a284d(0x1c4)];_0x2b263d++){const [_0x4f4d36]=_0x4cb8df(_0x5ad581[_0x2b263d]);_0x4f4d36&&(_0x5ad581[_0x2b263d]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x5ad581[_0x2b263d]));}if(_0x5ad581[0x0]===null)return null;switch(_0x42e329['toLowerCase']()){case _0x4a284d(0x1b8):{if(_0x5ad581[_0x4a284d(0x1c4)]!==0x1)return null;const [_0xc12ee4]=_0x4cb8df(_0x5ad581[0x0]);if(_0xc12ee4)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0xc12ee4);if(_0x5ad581[0x0]===null)return null;return _0x5ad581[0x0][_0x4a284d(0x223)]();}case _0x4a284d(0x26b):{if(_0x5ad581[_0x4a284d(0x1c4)]!==0x1)return null;const [_0x254473]=_0x4cb8df(_0x5ad581[0x0]);if(_0x254473)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x254473);if(_0x5ad581[0x0]===null)return null;return _0x5ad581[0x0][_0x4a284d(0x187)]();}case _0x4a284d(0x1d7):{if(_0x5ad581[_0x4a284d(0x1c4)]!==0x2)return null;const [_0x5443b1]=_0x4cb8df(_0x5ad581[0x0]);if(_0x5443b1)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x5443b1);if(_0x5ad581[0x0]===null)return null;if(isNaN(_0x5ad581[0x1]))return null;return _0x5ad581[0x0][_0x4a284d(0x17e)](0x0,_0x5ad581[0x1]);}case _0x4a284d(0x23a):{const [_0x368f29]=_0x4cb8df(_0x5ad581[0x0]);if(_0x5ad581[_0x4a284d(0x1c4)]<0x2)return null;if(_0x368f29)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x368f29);if(_0x5ad581[0x0]===null)return null;const _0x2de495=_0x5ad581[0x1];if(isNaN(_0x2de495))return null;let _0x9e2960;if(_0x5ad581[_0x4a284d(0x1c4)]===0x3)_0x9e2960=_0x5ad581[0x0][_0x4a284d(0x1c0)](_0x5ad581[0x2]);else _0x9e2960=_0x9e2960=_0x5ad581[0x0]['split']('\x20');if(_0x2de495<=_0x9e2960['length'])return _0x9e2960[_0x2de495-0x1];else return'';}case _0x4a284d(0x22f):{const [_0x1e78ba]=_0x4cb8df(_0x5ad581[0x0]);if(_0x1e78ba)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x1e78ba);if(_0x5ad581[0x0]===null)return null;if(_0x5ad581[_0x4a284d(0x1c4)]!==0x3)return null;return _0x5ad581[0x0]['replaceAll'](_0x5ad581[0x1],_0x5ad581[0x2]);}case _0x4a284d(0x1a8):{if(_0x5ad581[_0x4a284d(0x1c4)]!==0x1)return null;const [_0x50c757]=_0x4cb8df(_0x5ad581[0x0]);if(_0x50c757)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x50c757);if(_0x5ad581[0x0]===null)return null;return ascii127[_0x4a284d(0x193)](_0x5ad581[0x0]);}case _0x4a284d(0x19e):{let _0x97b881='';for(let _0x3ecf32=0x0;_0x3ecf32<_0x5ad581['length'];_0x3ecf32++){const [_0x5325c1]=_0x4cb8df(_0x5ad581[_0x3ecf32]);if(_0x5325c1)_0x5ad581[_0x3ecf32]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x5325c1);if(_0x5ad581[_0x3ecf32]===null)return null;_0x97b881+=_0x5ad581[_0x3ecf32];}return _0x97b881;}case'increment':{if(_0x5ad581[_0x4a284d(0x1c4)]>0x2)return null;const [_0x50c112]=_0x4cb8df(_0x5ad581[0x0]);if(_0x50c112)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x50c112);if(_0x5ad581[0x0]===null)return null;const _0x5d6caa=parseInt(_0x5ad581[0x0]);if(isNaN(_0x5d6caa))return null;let _0x4c896e='##doIncrement';_0x4c896e+=','+_0x5ad581[0x0];if(_0x5ad581['length']===0x2&&_0x5ad581[0x1][_0x4a284d(0x223)]()===_0x4a284d(0x20d))_0x4c896e+=_0x4a284d(0x17b);else _0x4c896e+=',false';return _0x4c896e+='##',_0x4c896e;}case _0x4a284d(0x1b4):{if(_0x5ad581[_0x4a284d(0x1c4)]!==0x1)return null;const [_0x22f9b1]=_0x4cb8df(_0x5ad581[0x0]);if(_0x22f9b1)_0x5ad581[0x0]=await _0x24a1df(_0x284a6d,_0x1aa4c2,_0x2d8ca9,_0x22f9b1);if(_0x5ad581[0x0]===null)return null;let _0x453dab,_0x14d84c=![],_0x553fde='';const _0x43d511=_0x5ad581[0x0]['split']('##');if(_0x43d511[_0x4a284d(0x1c4)]>0x2)for(let _0x273260=0x0;_0x273260<_0x43d511[_0x4a284d(0x1c4)];_0x273260++){if(_0x43d511[_0x273260][_0x4a284d(0x264)](_0x4a284d(0x1a6))){const _0x5a3d9f=_0x43d511[_0x273260][_0x4a284d(0x1c0)](',');if(_0x5a3d9f[_0x4a284d(0x1c4)]<0x2)return null;const _0x11f64c=parseInt(_0x5a3d9f[0x1]);if(isNaN(_0x11f64c))return null;_0x553fde='##'+_0x43d511[_0x273260]+'##',_0x453dab=_0x5a3d9f[0x1],_0x5a3d9f[_0x4a284d(0x1c4)]>0x2&&(_0x14d84c=_0x5a3d9f[0x2][_0x4a284d(0x223)]()===_0x4a284d(0x20d));}}let _0x2378a8,_0x2c9213=0x0,_0x3504f3=0x0;if(_0x453dab){_0x3504f3=_0x453dab['length'],_0x2c9213=0xa;for(let _0x2df0ab=0x1;_0x2df0ab<_0x3504f3;_0x2df0ab++){_0x2c9213*=0xa;}_0x2c9213-=0x1,_0x2378a8=parseInt(_0x453dab);if(isNaN(_0x2378a8))return null;_0x2378a8-=0x1;}else _0x2378a8=0x0;do{_0x2378a8+=0x1;let _0x554fe4=_0x5ad581[0x0];if(_0x453dab!==undefined&&_0x553fde){let _0x5bdb39=_0x2378a8[_0x4a284d(0x1a9)]();while(_0x5bdb39['length']<_0x3504f3){_0x5bdb39='0'+_0x5bdb39;}_0x14d84c?_0x554fe4=_0x554fe4[_0x4a284d(0x22f)](_0x553fde,_0x5bdb39):(_0x554fe4=_0x554fe4['replace'](_0x553fde,''),_0x14d84c=!![],_0x2378a8-=0x1);}try{const _0x5521f2=await _0xc9f437(_0x284a6d,_0x2d8ca9,_0x554fe4);if(!_0x5521f2)return _0x554fe4;}catch(_0x293637){return _0x6f88fe[_0x4a284d(0x1bb)][_0x4a284d(0x1bc)](_0x6f88fe[_0x4a284d(0x1a3)]+'['+_0x6f88fe[_0x4a284d(0x1f0)]+']\x20'+_0x42e329+_0x4a284d(0x220)+_0x293637[_0x4a284d(0x1e2)]),null;}}while(_0x2378a8<_0x2c9213);return null;}default:}return null;},_0x510e06=async(_0x162864,_0x56e46b)=>{const _0x1bb104=_0x379b18;for(const _0x479fe2 in _0x56e46b){const _0x5885d7=_0x56e46b[_0x479fe2],[_0x2d4555,_0x14d408]=_0x4cb8df(_0x5885d7);if(_0x2d4555){const _0x558c5c=''+_0x479fe2,_0x5aa3af=_0x2d4555+'('+_0x14d408[_0x1bb104(0x19e)](',')+')',_0x22b9b4=await _0x24a1df(_0x162864,_0x56e46b,_0x558c5c,_0x5aa3af);if(_0x22b9b4===null)delete _0x56e46b[_0x479fe2];else _0x56e46b[_0x479fe2]=_0x22b9b4;}for(const _0x2da157 in _0x5885d7){const _0x1b9bd8=_0x5885d7[_0x2da157],[_0x5899c8,_0x27cb1c]=_0x4cb8df(_0x1b9bd8);if(_0x5899c8){const _0x116008=_0x479fe2+'.'+_0x2da157,_0x3a100a=_0x5899c8+'('+_0x27cb1c[_0x1bb104(0x19e)](',')+')',_0x24826d=await _0x24a1df(_0x162864,_0x56e46b,_0x116008,_0x3a100a);if(_0x24826d===null)delete _0x5885d7[_0x2da157];else _0x5885d7[_0x2da157]=_0x24826d;}}}return _0x56e46b;};},module[a0_0x4c7482(0x16a)][a0_0x4c7482(0x21a)]=function(_0x4328bf){const _0x574a5e=a0_0x4c7482,_0x264c7f=_0x4328bf,_0x16941d={},_0x573768=async(_0x15bade,_0xcf4efd)=>{const _0x366b4b=a0_0x3a0f,_0x1ab53a=_0x16941d[_0x15bade][_0x366b4b(0x1fc)]?.[_0x366b4b(0x174)]?.[_0x366b4b(0x1b7)];let _0x4c94d9=0x0;for await(const _0x1ed9d9 of _0xcf4efd[_0x366b4b(0x1ea)]()){switch(_0x1ed9d9[_0x366b4b(0x1d3)]){case nats[_0x366b4b(0x1ce)][_0x366b4b(0x171)]:_0x264c7f['logger'][_0x366b4b(0x1bc)](_0x264c7f[_0x366b4b(0x1a3)]+'['+_0x264c7f[_0x366b4b(0x1f0)]+_0x366b4b(0x250)+_0x15bade+']['+_0x1ab53a+_0x366b4b(0x1dd)+_0x1ed9d9[_0x366b4b(0x1c3)]+_0x366b4b(0x177)),_0x4c94d9=0x0;break;case nats['Events'][_0x366b4b(0x23b)]:_0x264c7f[_0x366b4b(0x1bb)]['info'](_0x264c7f[_0x366b4b(0x1a3)]+'['+_0x264c7f[_0x366b4b(0x1f0)]+']\x20publisher['+_0x15bade+']['+_0x1ab53a+_0x366b4b(0x22e)+_0x1ed9d9['data']);break;case nats['Events'][_0x366b4b(0x1a0)]:_0x264c7f[_0x366b4b(0x1bb)][_0x366b4b(0x1bc)](_0x264c7f['gwName']+'['+_0x264c7f[_0x366b4b(0x1f0)]+_0x366b4b(0x250)+_0x15bade+']['+_0x1ab53a+_0x366b4b(0x182)+_0x1ed9d9[_0x366b4b(0x1c3)]);break;case nats[_0x366b4b(0x1f1)][_0x366b4b(0x1af)]:_0x4c94d9+=0x1;_0x4c94d9%0x1e===0x0&&_0x264c7f['logger'][_0x366b4b(0x176)](_0x264c7f[_0x366b4b(0x1a3)]+'['+_0x264c7f['pluginName']+_0x366b4b(0x250)+_0x15bade+']['+_0x1ab53a+']\x20client\x20is\x20attempting\x20to\x20reconnect\x20'+_0x1ed9d9[_0x366b4b(0x1c3)]+'\x20(count='+_0x4c94d9+')');break;case nats[_0x366b4b(0x1f1)]['StaleConnection']:_0x264c7f[_0x366b4b(0x1bb)]['debug'](_0x264c7f['gwName']+'['+_0x264c7f[_0x366b4b(0x1f0)]+_0x366b4b(0x250)+_0x15bade+']['+_0x1ab53a+_0x366b4b(0x1d4)+_0x1ed9d9[_0x366b4b(0x1c3)]);break;}}},_0x1f6e86=async(_0x32c950,_0x5ed648)=>{const _0xd229aa=a0_0x3a0f,_0x5576cc=_0x16941d[_0x32c950][_0xd229aa(0x1fc)]?.[_0xd229aa(0x174)]?.[_0xd229aa(0x1b7)];let _0x27c9b0;try{_0x27c9b0=await nats[_0xd229aa(0x18f)](_0x5ed648);if(_0x27c9b0[_0xd229aa(0x169)]['server_name']!==_0xd229aa(0x1f4)){_0x27c9b0[_0xd229aa(0x239)]();return;}_0x16941d[_0x32c950]['nc']=_0x27c9b0,_0x573768(_0x32c950,_0x27c9b0);}catch(_0x43a1bf){_0x264c7f['logger'][_0xd229aa(0x1bc)](_0x264c7f[_0xd229aa(0x1a3)]+'['+_0x264c7f['pluginName']+_0xd229aa(0x250)+_0x32c950+']['+_0x5576cc+']\x20connect\x20error:\x20'+_0x43a1bf[_0xd229aa(0x1e2)]+_0xd229aa(0x228)),_0x5ed648[_0xd229aa(0x19b)]=!![];try{_0x27c9b0=await nats[_0xd229aa(0x18f)](_0x5ed648);if(_0x27c9b0[_0xd229aa(0x169)][_0xd229aa(0x208)]!==_0xd229aa(0x1f4)){_0x27c9b0[_0xd229aa(0x239)]();return;}_0x16941d[_0x32c950]['nc']=_0x27c9b0,_0x573768(_0x32c950,_0x27c9b0);}catch(_0xecf9e5){_0x264c7f[_0xd229aa(0x1bb)][_0xd229aa(0x1bc)](_0x264c7f['gwName']+'['+_0x264c7f[_0xd229aa(0x1f0)]+_0xd229aa(0x250)+_0x32c950+']['+_0x5576cc+_0xd229aa(0x1e5)+_0xecf9e5[_0xd229aa(0x1e2)]);return;}}_0x264c7f[_0xd229aa(0x1bb)]['debug'](_0x264c7f[_0xd229aa(0x1a3)]+'['+_0x264c7f[_0xd229aa(0x1f0)]+_0xd229aa(0x250)+_0x32c950+']['+_0x5576cc+_0xd229aa(0x205)+(_0x5ed648[_0xd229aa(0x224)]['ca']?_0xd229aa(0x224):'')+'\x20'+_0x27c9b0['getServer']()),_0x27c9b0['closed']()[_0xd229aa(0x25f)](_0x27fc2d=>{const _0x1e2697=_0xd229aa;_0x27fc2d&&_0x264c7f[_0x1e2697(0x1bb)][_0x1e2697(0x1bc)](_0x264c7f[_0x1e2697(0x1a3)]+'['+_0x264c7f[_0x1e2697(0x1f0)]+_0x1e2697(0x250)+_0x32c950+']['+_0x5576cc+_0x1e2697(0x24e)+_0x27fc2d['message']);});};this[_0x574a5e(0x181)]=async(_0x445908,_0x53bf02)=>{const _0x10428a=_0x574a5e;if(!_0x53bf02?.['nats']){_0x264c7f[_0x10428a(0x1bb)]['error'](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+_0x10428a(0x250)+_0x445908+_0x10428a(0x265));return;}if(!_0x53bf02?.[_0x10428a(0x174)]?.[_0x10428a(0x1a2)]){_0x264c7f['logger'][_0x10428a(0x1bc)](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+_0x10428a(0x250)+_0x445908+_0x10428a(0x268));return;}if(!_0x53bf02?.['nats']?.[_0x10428a(0x1b7)]){_0x264c7f[_0x10428a(0x1bb)]['error'](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+_0x10428a(0x250)+_0x445908+_0x10428a(0x1d5));return;}if(!_0x53bf02?.[_0x10428a(0x174)]?.[_0x10428a(0x1b7)]['startsWith']('GW.')){_0x264c7f[_0x10428a(0x1bb)][_0x10428a(0x1bc)](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+_0x10428a(0x250)+_0x445908+']\x20initialization\x20error:\x20nats.subject\x20root\x20topic\x20must\x20be\x20\x27GW\x27,\x20nats.subject\x20example:\x20GW.APP1');return;}if(!_0x53bf02['baseUrls']||!Array[_0x10428a(0x221)](_0x53bf02['baseUrls'])||_0x53bf02[_0x10428a(0x1b3)][_0x10428a(0x1c4)]<0x1){_0x264c7f[_0x10428a(0x1bb)][_0x10428a(0x1bc)](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+_0x10428a(0x250)+_0x445908+_0x10428a(0x184));return;}if(!_0x53bf02?.['certificate']?.['ca']){_0x264c7f[_0x10428a(0x1bb)]['error'](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+']\x20publisher['+_0x445908+']\x20initialization\x20error:\x20missing\x20certificate\x20configuration');return;}const _0x1ab7a4={};try{let _0x260584=path[_0x10428a(0x19e)](_0x264c7f[_0x10428a(0x1b2)],_0x10428a(0x1e0),_0x53bf02?.[_0x10428a(0x201)]?.['ca']||'file-not-configured');(_0x53bf02?.[_0x10428a(0x201)]?.['ca']?.[_0x10428a(0x264)]('/')||_0x53bf02?.[_0x10428a(0x201)]?.['ca']?.['includes']('\x5c'))&&(_0x260584=_0x53bf02[_0x10428a(0x201)]['ca']),_0x1ab7a4['ca']=[fs[_0x10428a(0x20c)](_0x260584)],_0x1ab7a4[_0x10428a(0x16d)]=!![];}catch(_0x4a3417){_0x264c7f[_0x10428a(0x1bb)][_0x10428a(0x1bc)](_0x264c7f[_0x10428a(0x1a3)]+'['+_0x264c7f[_0x10428a(0x1f0)]+_0x10428a(0x250)+_0x445908+_0x10428a(0x1fd)+_0x4a3417[_0x10428a(0x1e2)]);return;}const _0xa0ccf5={},_0x4ccd4e=new TextEncoder()['encode'](_0x53bf02?.[_0x10428a(0x174)]?.['secret']),_0x8a6c7b=_0x53bf02?.['nats']?.['jwt'];_0xa0ccf5[_0x10428a(0x24a)]=nats[_0x10428a(0x1ff)](_0x8a6c7b,_0x4ccd4e),_0xa0ccf5[_0x10428a(0x189)]=_0x53bf02['baseUrls'],_0xa0ccf5[_0x10428a(0x224)]=_0x1ab7a4,_0xa0ccf5[_0x10428a(0x19b)]=![],_0xa0ccf5[_0x10428a(0x215)]=!![],_0xa0ccf5[_0x10428a(0x213)]=0x3e8*0xa,_0xa0ccf5[_0x10428a(0x1d2)]=-0x1,_0xa0ccf5[_0x10428a(0x24f)]=0x2*0x3c*0x3e8,_0xa0ccf5[_0x10428a(0x173)]=0x5,_0xa0ccf5[_0x10428a(0x176)]=![],_0x16941d[_0x445908]={},_0x16941d[_0x445908][_0x10428a(0x1fc)]=_0x53bf02,_0x16941d[_0x445908]['nc']=undefined,_0x1f6e86(_0x445908,_0xa0ccf5);};const _0x21f401=nats[_0x574a5e(0x1ad)]();this[_0x574a5e(0x194)]=async _0xcee305=>{const _0x429a11=_0x574a5e;let _0x362fa4;try{if(_0xcee305[_0x429a11(0x1fe)]===Object){_0x362fa4=_0xcee305[_0x429a11(0x1ed)];if(!_0x362fa4)_0xcee305[_0x429a11(0x1ed)]='undefined';_0xcee305=JSON[_0x429a11(0x233)](_0xcee305);}else{const _0x10e834=JSON[_0x429a11(0x1a4)](_0xcee305);_0x362fa4=_0x10e834[_0x429a11(0x1ed)];}}catch(_0x4802a2){throw new Error(_0x429a11(0x1ab)+_0x362fa4+_0x429a11(0x1ee));}if(!_0x16941d[_0x362fa4])throw new Error(_0x429a11(0x1ab)+_0x362fa4+']\x20error:\x20missing\x20entity\x20configuration\x20for\x20baseEntity='+_0x362fa4);const _0x3e398f=nats[_0x429a11(0x1b9)]();_0x3e398f[_0x429a11(0x19a)](_0x429a11(0x212),crypto[_0x429a11(0x204)]());let _0x7f2d74;try{if(!_0x16941d[_0x362fa4]['nc'])throw new Error(_0x429a11(0x1f6));_0x7f2d74=await _0x16941d[_0x362fa4]['nc'][_0x429a11(0x1a7)](_0x16941d[_0x362fa4][_0x429a11(0x1fc)]?.[_0x429a11(0x174)]?.[_0x429a11(0x1b7)],_0x21f401['encode'](_0xcee305),{'headers':_0x3e398f});}catch(_0x10a9ff){if(_0x10a9ff[_0x429a11(0x1e2)]===_0x429a11(0x22c))throw new Error(_0x429a11(0x1ab)+_0x362fa4+_0x429a11(0x1c6)+_0x16941d[_0x362fa4]['config']?.[_0x429a11(0x174)]?.[_0x429a11(0x1b7)]);else throw new Error(_0x429a11(0x1ab)+_0x362fa4+']\x20error:\x20'+_0x10a9ff[_0x429a11(0x1e2)]);}let _0x5462b8;try{_0x5462b8=JSON[_0x429a11(0x1a4)](_0x7f2d74[_0x429a11(0x1b1)]());}catch(_0x183969){throw new Error(_0x429a11(0x1d9)+_0x7f2d74[_0x429a11(0x1b1)]());}if(_0x5462b8?.['error']){const _0x192402=new Error(_0x429a11(0x25a)+_0x5462b8[_0x429a11(0x1bc)]);_0x192402[_0x429a11(0x234)]=_0x5462b8['errName'];throw _0x192402;}return _0x5462b8;},process['on'](_0x574a5e(0x1f5),async()=>{const _0x35dd1a=_0x574a5e;for(const _0x32d40f in _0x16941d){_0x16941d[_0x32d40f]['nc']&&!_0x16941d[_0x32d40f]['nc']['isClosed']()&&await _0x16941d[_0x32d40f]['nc'][_0x35dd1a(0x1e3)]();}}),process['on'](_0x574a5e(0x25c),async()=>{const _0x35f8e5=_0x574a5e;for(const _0x3e4db6 in _0x16941d){_0x16941d[_0x3e4db6]['nc']&&!_0x16941d[_0x3e4db6]['nc'][_0x35f8e5(0x22b)]()&&await _0x16941d[_0x3e4db6]['nc'][_0x35f8e5(0x1e3)]();}});},module[a0_0x4c7482(0x16a)]['getAppRoles']=async(_0x3164ee,_0x1821fa,_0x461397,_0x53e9f7)=>{const _0x2af4f6=a0_0x4c7482,_0x22e69e='getAppRoles',_0x5dc811=_0x3164ee;_0x5dc811[_0x2af4f6(0x1bb)]['debug'](_0x5dc811[_0x2af4f6(0x1a3)]+'['+_0x5dc811[_0x2af4f6(0x1f0)]+_0x2af4f6(0x206)+_0x22e69e+'\x22');try{if(!fs[_0x2af4f6(0x179)](_0x5dc811[_0x2af4f6(0x1b2)]+'/approles'))fs[_0x2af4f6(0x245)](_0x5dc811[_0x2af4f6(0x1b2)]+_0x2af4f6(0x21b));}catch(_0x4a45f7){}const _0x28a3ba=path[_0x2af4f6(0x19e)](''+_0x5dc811[_0x2af4f6(0x1b2)],_0x2af4f6(0x1a5),'approles_'+_0x5dc811['pluginName']+_0x2af4f6(0x258)),_0x397c39={};utils[_0x2af4f6(0x1aa)](_0x28a3ba)&&fs['readFileSync'](_0x28a3ba,'utf-8')[_0x2af4f6(0x1c0)](/\r?\n/)[_0x2af4f6(0x232)](_0x173ff2=>{const _0x3fb79=_0x2af4f6,_0x1afe92=_0x173ff2[_0x3fb79(0x1c0)]('\x20');_0x1afe92[_0x3fb79(0x1c4)]===0x2&&(_0x397c39[_0x1afe92[0x0]]=_0x1afe92[0x1]);});const _0x5c6595=fs['createWriteStream'](_0x28a3ba,{'flags':'w','encoding':'utf8','mode':0x1b6,'autoClose':!![]}),_0x5599eb=[],_0x2d8713=await _0x5dc811[_0x2af4f6(0x1e7)](_0x1821fa,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x2af4f6(0x1f7)]);return _0x2d8713[_0x2af4f6(0x20f)][_0x2af4f6(0x232)](_0x513796=>{const _0x3b16fd=_0x2af4f6;if(_0x513796['id']){let _0x26f74e=crypto[_0x3b16fd(0x204)]();if(_0x397c39[_0x513796['id']])_0x26f74e=_0x397c39[_0x513796['id']];const _0x263b3a={'allowedMemberTypes':[_0x3b16fd(0x26c)],'description':_0x3b16fd(0x231),'displayName':_0x513796[_0x3b16fd(0x1f7)]||_0x513796['id'],'id':_0x26f74e,'isEnabled':!![],'lang':null,'origin':'Application','value':decodeURIComponent(_0x513796['id'])};_0x5599eb[_0x3b16fd(0x1d1)](_0x263b3a),_0x5c6595[_0x3b16fd(0x240)](_0x513796['id']+'\x20'+_0x26f74e+'\x0a');}}),_0x5c6595[_0x2af4f6(0x239)](),_0x5dc811['logger']['debug'](_0x5dc811['gwName']+'['+_0x5dc811[_0x2af4f6(0x1f0)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x28a3ba),{'Resources':[{'appRoles':_0x5599eb}]};};
13
+ 'use strict';const a0_0x59b720=a0_0x449c;(function(_0x42bd45,_0x277975){const _0x1de1f9=a0_0x449c,_0xe419f7=_0x42bd45();while(!![]){try{const _0x3ff116=-parseInt(_0x1de1f9(0x18b))/0x1*(parseInt(_0x1de1f9(0x206))/0x2)+parseInt(_0x1de1f9(0x1a8))/0x3*(-parseInt(_0x1de1f9(0x1dd))/0x4)+parseInt(_0x1de1f9(0x17d))/0x5+-parseInt(_0x1de1f9(0x1d5))/0x6+-parseInt(_0x1de1f9(0x13e))/0x7+-parseInt(_0x1de1f9(0x165))/0x8*(parseInt(_0x1de1f9(0x208))/0x9)+parseInt(_0x1de1f9(0x20b))/0xa*(parseInt(_0x1de1f9(0x200))/0xb);if(_0x3ff116===_0x277975)break;else _0xe419f7['push'](_0xe419f7['shift']());}catch(_0x375bb3){_0xe419f7['push'](_0xe419f7['shift']());}}}(a0_0x1758,0xe7181));function a0_0x1758(){const _0x46e2af=['true','Reconnect','drain','decode','toString','Subscriber','subscriber\x20message\x20error:\x20message\x20baseEntity=','StringCodec','value','createUser','doIncrement','servers','trim','hasOwnProperty','3892356sFmLER','sub','deleteGroup','createGroup','getProcessed','filter_subject','ack','display','2421352uxcZOk','getGroups',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20',']\x20initialization\x20error:\x20missing\x20configuration\x20stream.baseUrls','publisher\x20error:\x20none\x20JSON\x20formatted\x20response:\x20','\x20message\x20json\x20parsing\x20error:\x20',']\x20error:\x20','tenant','mkdirSync','createWriteStream','typeId','parse','SIGTERM','subscriber\x20message\x20error:\x20message\x20not\x20JSON\x20formatted','error','\x20message\x20response:\x20','operation',']\x20connect\x20error:\x20',']\x20connected\x20','maxReconnectAttempts','consumers',']\x20initialization\x20error:\x20missing\x20certificate\x20configuration','patchApi','obj','modifyGroup','stringify','configDir','User','convertedScim20',']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20','groups','user','\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true','\x20missing\x20user\x20object\x20in\x20message:\x20','\x20createUser()\x20obj=','11WWklnF','\x20Replace\x20User\x20id=','Error','replaceDomains','subject',']\x20subscriber[','214DDcUAT','\x20message\x20handled:\x20','11014551pzSQjN','\x20-\x20','maxPingOut','41886060BNFHwL','forEach','\x20role\x20removal\x20error:\x20','\x20subscriber\x20error:\x20scimgateway\x20endpoint\x20connect\x20problem\x20-\x20will\x20do\x20auto\x20retry\x20until\x20connected','skipConvertRolesToGroups','name','status','deleteUser','SIGINT','push','password','\x20handling\x20message:\x20','getUsers()\x20getObj=','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','update',']\x20initialization\x20error:\x20configuration\x20scim.usePutSoftSync\x20must\x20be\x20set\x20to\x20true\x20when\x20subscribing\x20to\x20ENTRA\x20or\x20HR\x20topics','info','\x20error:\x20missing\x20id}','debug','undefined','active','getAppRoles','DebugEvents','##doIncrement','replace','elementnumber','schemas','publisher[','roles','foldReplacing',']\x20publisher[','replaceUsrGrp','Errors','startsWith','jwt','\x20processing\x20incoming\x20message','_info','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false','utf-8','level','SCIM\x20Stream\x20-\x20Autogenerated','503','generateUserPassword','GW.','get','/Users/','utf8',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','handle','AckPolicy','indexOf','constructor','Resources','Publisher','UnableConnectingHost','SCIM\x20Stream','gwName','getServer','\x20Delete\x20User\x20userName=','isArray','ConsumerNotFound',',\x20obj=','7072170VIaibz','request','internal\x20stream\x20policy\x20have\x20been\x20changed\x20-\x20central\x20SCIM\x20Stream\x20must\x20be\x20stopped\x20and\x20corresponding\x20./jetstream\x20folder\x20deleted\x20before\x20startup\x20allowing\x20new\x20policy','reconnect','ENTRA.','jetstream','normalize','headers','certificate','isClosed',']\x20client\x20disconnected\x20','connect','getApi','copyObj','false','\x20result=','\x27\x20not\x20supported','substring','append','\x20Delete\x20User\x20id=','type','subscribe','modifyUser','attributes',',\x20id=',']\x20client\x20reconnected\x20','body','write','ETIMEDOUT','\x20convertedScim20\x20error:\x20',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject','\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}','durable_','server_name','\x20not\x20equal\x20subscriber\x20configured\x20baseEntity=','\x20done','approles','secret','add','8nnZXUe','activityOperation','exports','ctxCopy','split','\x20=>\x20subscriber\x20not\x20activated','firstn','/certs/',']\x20initialization\x20certificate\x20error:\x20','increment','\x22,\x22errName\x22:\x22','StaleConnection','pingInterval','\x20getUserId()\x20error:\x20','prototype','\x20Create\x20User\x20userName=','Disconnect','\x20Create\x20userName=','displayName','timeout','Application','baseEntity','transports','/approles','6431575YFeDcR','string','ctx','approles_',']\x20client\x20error\x20','waitOnFirstConnect','closed','baseUrls','file','\x20group\x20removal\x20error:\x20','from','tls','\x20error:\x20','Msg-Id','9721TSXwMN',']\x20error:\x20missing\x20entity\x20configuration\x20for\x20baseEntity=','authenticator','HR.','Events','data','deleteApi','replaceAll','call','respond','../lib/utils','close','path','detail','_autogenerated.cfg','pluginName','existsSync','reconnectTimeWait','randomUUID',']\x20error:\x20no\x20subscribers/responders\x20to\x20subject\x20','publisher\x20response\x20error:\x20','\x20message:\x20user\x20does\x20not\x20exist','file-not-configured','rejectUnauthorized','\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration','modifyOnly',']\x20closed\x20with\x20error:\x20','ConsumerEvents','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available','3LOiqCh','uppercase','userName','UnableConnectingService','lowercase','onCreate','message',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.tenant','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','getUsers','Reconnecting','subscriber\x20message\x20error:\x20handle\x20\x27','join','publish','ENOTFOUND',',false','logger','includes','length','postApi','deleteUserOnLastGroupRoleRemoval','Operations','config','params','toLowerCase',',\x20attributes=',']\x20initialization\x20error:\x20missing\x20configuration\x20nats','\x20(count=','nats','jwtAuthenticator','toUpperCase'];a0_0x1758=function(){return _0x46e2af;};return a0_0x1758();}const nats=require('nats'),ascii127=require('fold-to-ascii'),fs=require('fs'),utils=require(a0_0x59b720(0x195)),path=require(a0_0x59b720(0x197)),crypto=require('crypto');function a0_0x449c(_0x1114b5,_0x3b4de3){const _0x175861=a0_0x1758();return a0_0x449c=function(_0x449c97,_0x91ca13){_0x449c97=_0x449c97-0x111;let _0x3c1a15=_0x175861[_0x449c97];return _0x3c1a15;},a0_0x449c(_0x1114b5,_0x3b4de3);}module['exports'][a0_0x59b720(0x1cc)]=function(_0x427e4a){const _0xbd089d=a0_0x59b720,_0x1339f8=_0x427e4a,_0xf2a4c2={};let _0x36befa='';for(let _0x1a4610=0x0;_0x1a4610<_0x1339f8[_0xbd089d(0x1b8)][_0xbd089d(0x17b)][_0xbd089d(0x1ba)];_0x1a4610++){if(_0x1339f8[_0xbd089d(0x1b8)]['transports'][_0x1a4610][_0xbd089d(0x210)]===_0xbd089d(0x185)){_0x36befa=_0x1339f8[_0xbd089d(0x1b8)][_0xbd089d(0x17b)][_0x1a4610][_0xbd089d(0x127)];break;}}const _0x187267=''+(_0x36befa===_0xbd089d(0x112)?'\x0a':''),_0x3bc994=async(_0x134bfa,_0x330f2)=>{const _0x25bde2=_0xbd089d,_0x3de2e0=_0xf2a4c2[_0x134bfa][_0x25bde2(0x1be)]?.['nats']?.[_0x25bde2(0x204)];let _0x486a4e;try{_0x486a4e=await nats['connect'](_0x330f2);if(_0x486a4e['info'][_0x25bde2(0x15f)]!==_0x25bde2(0x137)){_0x486a4e['close']();return;}_0xf2a4c2[_0x134bfa]['nc']=_0x486a4e,_0x34e901(_0x134bfa,_0x486a4e),_0xb7c83(_0x134bfa,_0x486a4e);}catch(_0x985b02){_0x1339f8[_0x25bde2(0x1b8)]['error'](_0x1339f8[_0x25bde2(0x138)]+'['+_0x1339f8[_0x25bde2(0x19a)]+_0x25bde2(0x205)+_0x134bfa+']['+_0x3de2e0+_0x25bde2(0x1ee)+_0x985b02[_0x25bde2(0x1ae)]+_0x25bde2(0x1a3)),_0x330f2['waitOnFirstConnect']=!![];try{_0x486a4e=await nats[_0x25bde2(0x149)](_0x330f2);if(_0x486a4e[_0x25bde2(0x21b)][_0x25bde2(0x15f)]!==_0x25bde2(0x137)){_0x486a4e[_0x25bde2(0x196)]();return;}_0xf2a4c2[_0x134bfa]['nc']=_0x486a4e,_0x34e901(_0x134bfa,_0x486a4e),_0xb7c83(_0x134bfa,_0x486a4e);}catch(_0x5558e1){_0x1339f8['logger'][_0x25bde2(0x1eb)](_0x1339f8['gwName']+'['+_0x1339f8[_0x25bde2(0x19a)]+_0x25bde2(0x205)+_0x134bfa+']['+_0x3de2e0+_0x25bde2(0x1ee)+_0x5558e1[_0x25bde2(0x1ae)]);return;}}_0x1339f8[_0x25bde2(0x1b8)][_0x25bde2(0x112)](_0x1339f8['gwName']+'['+_0x1339f8[_0x25bde2(0x19a)]+']\x20subscriber['+_0x134bfa+']['+_0x3de2e0+']\x20connected\x20'+(_0x330f2[_0x25bde2(0x188)]['ca']?'tls':'')+'\x20'+_0x486a4e[_0x25bde2(0x139)]()),_0x486a4e[_0x25bde2(0x183)]()['then'](_0x6dacef=>{const _0x1e4f23=_0x25bde2;_0x6dacef&&_0x1339f8[_0x1e4f23(0x1b8)][_0x1e4f23(0x1eb)](_0x1339f8[_0x1e4f23(0x138)]+'['+_0x1339f8[_0x1e4f23(0x19a)]+_0x1e4f23(0x205)+_0x134bfa+']['+_0x3de2e0+_0x1e4f23(0x1a5)+_0x6dacef[_0x1e4f23(0x1ae)]);});};this['add']=async(_0x232764,_0x40132a)=>{const _0x3d6970=_0xbd089d;if(!_0x40132a?.[_0x3d6970(0x1c4)]){_0x1339f8[_0x3d6970(0x1b8)]['error'](_0x1339f8[_0x3d6970(0x138)]+'['+_0x1339f8[_0x3d6970(0x19a)]+_0x3d6970(0x205)+_0x232764+_0x3d6970(0x1c2));return;}if(!_0x40132a?.['nats']?.[_0x3d6970(0x1e4)]){_0x1339f8[_0x3d6970(0x1b8)][_0x3d6970(0x1eb)](_0x1339f8[_0x3d6970(0x138)]+'['+_0x1339f8[_0x3d6970(0x19a)]+_0x3d6970(0x205)+_0x232764+_0x3d6970(0x1af));return;}if(!_0x40132a?.[_0x3d6970(0x1c4)]?.[_0x3d6970(0x204)]){_0x1339f8[_0x3d6970(0x1b8)][_0x3d6970(0x1eb)](_0x1339f8[_0x3d6970(0x138)]+'['+_0x1339f8[_0x3d6970(0x19a)]+_0x3d6970(0x205)+_0x232764+_0x3d6970(0x15c));return;}if(!_0x40132a?.['certificate']?.['ca']){_0x1339f8['logger'][_0x3d6970(0x1eb)](_0x1339f8[_0x3d6970(0x138)]+'['+_0x1339f8[_0x3d6970(0x19a)]+_0x3d6970(0x205)+_0x232764+_0x3d6970(0x1f2));return;}if(!_0x40132a['baseUrls']||!Array[_0x3d6970(0x13b)](_0x40132a[_0x3d6970(0x184)])||_0x40132a[_0x3d6970(0x184)][_0x3d6970(0x1ba)]<0x1){_0x1339f8['logger'][_0x3d6970(0x1eb)](_0x1339f8[_0x3d6970(0x138)]+'['+_0x1339f8[_0x3d6970(0x19a)]+_0x3d6970(0x205)+_0x232764+_0x3d6970(0x1e0));return;}if(!_0x40132a['usePutSoftSync']){const _0x27b106=_0x40132a?.[_0x3d6970(0x1c4)]?.[_0x3d6970(0x204)][_0x3d6970(0x1c6)]();if(_0x27b106[_0x3d6970(0x121)](_0x3d6970(0x142))||_0x27b106['startsWith'](_0x3d6970(0x18e))){_0x1339f8[_0x3d6970(0x1b8)][_0x3d6970(0x1eb)](_0x1339f8['gwName']+'['+_0x1339f8[_0x3d6970(0x19a)]+']\x20subscriber['+_0x232764+_0x3d6970(0x21a));return;}}const _0x31f270={};try{let _0x2f5d2a=path[_0x3d6970(0x1b4)](_0x1339f8[_0x3d6970(0x1f7)],_0x3d6970(0x16c),_0x40132a?.['certificate']?.['ca']||'file-not-configured');(_0x40132a?.[_0x3d6970(0x146)]?.['ca']?.[_0x3d6970(0x121)]('/')||_0x40132a?.['certificate']?.['ca']?.['includes']('\x5c'))&&(_0x2f5d2a=_0x40132a['certificate']['ca']),_0x31f270['ca']=[fs['readFileSync'](_0x2f5d2a)],_0x31f270[_0x3d6970(0x1a2)]=!![];}catch(_0x117da2){_0x1339f8['logger'][_0x3d6970(0x1eb)](_0x1339f8['gwName']+'['+_0x1339f8[_0x3d6970(0x19a)]+']\x20subscriber['+_0x232764+_0x3d6970(0x16d)+_0x117da2['message']);return;}const _0x2d806b={},_0x2f11cb=new TextEncoder()['encode'](_0x40132a?.[_0x3d6970(0x1c4)]?.[_0x3d6970(0x163)]),_0x124d59=_0x40132a?.[_0x3d6970(0x1c4)]?.['jwt'];_0x2d806b[_0x3d6970(0x18d)]=nats['jwtAuthenticator'](_0x124d59,_0x2f11cb),_0x2d806b[_0x3d6970(0x1d2)]=_0x40132a[_0x3d6970(0x184)],_0x2d806b[_0x3d6970(0x188)]=_0x31f270,_0x2d806b['waitOnFirstConnect']=![],_0x2d806b[_0x3d6970(0x141)]=!![],_0x2d806b['reconnectTimeWait']=0x3e8*0xa,_0x2d806b['maxReconnectAttempts']=-0x1,_0x2d806b[_0x3d6970(0x171)]=0x2*0x3c*0x3e8,_0x2d806b['maxPingOut']=0x5,_0x2d806b['debug']=![],_0xf2a4c2[_0x232764]={},_0xf2a4c2[_0x232764][_0x3d6970(0x1be)]=_0x40132a,_0xf2a4c2[_0x232764]['nc']=undefined,_0xf2a4c2[_0x232764][_0x3d6970(0x1d6)]=undefined,_0x3bc994(_0x232764,_0x2d806b);};const _0xb7c83=async(_0xbade0,_0x49deb2)=>{const _0x3dfe9f=_0xbd089d,_0x51bf38=_0xf2a4c2[_0xbade0][_0x3dfe9f(0x1be)],_0x4f488c=_0x51bf38?.[_0x3dfe9f(0x1c4)]?.[_0x3dfe9f(0x204)];if(!_0x49deb2){_0x1339f8[_0x3dfe9f(0x1b8)][_0x3dfe9f(0x1eb)](_0x1339f8[_0x3dfe9f(0x138)]+'['+_0x1339f8[_0x3dfe9f(0x19a)]+_0x3dfe9f(0x205)+_0xbade0+']['+_0x4f488c+_0x3dfe9f(0x12f));return;}const _0x13d681=async(_0x591d35,_0x45402b)=>{const _0xcd3ef=_0x3dfe9f;try{_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x21b)](_0x591d35+_0xcd3ef(0x216)+_0x45402b);let _0x2071a6;try{if(_0x51bf38[_0xcd3ef(0x203)]&&Array['isArray'](_0x51bf38[_0xcd3ef(0x203)]))for(let _0x54fdfb=0x0;_0x54fdfb<_0x51bf38[_0xcd3ef(0x203)][_0xcd3ef(0x1ba)];_0x54fdfb++){const _0x42fb98=_0x51bf38['replaceDomains'][_0x54fdfb];if(!_0x42fb98[_0xcd3ef(0x187)]||!_0x42fb98[_0xcd3ef(0x187)][_0xcd3ef(0x1b9)]('.')||!_0x42fb98['to']||!_0x42fb98['to']['includes']('.'))continue;const _0x4ffc89=new RegExp('@'+_0x42fb98[_0xcd3ef(0x187)]+'\x22','gi');_0x45402b=_0x45402b[_0xcd3ef(0x118)](_0x4ffc89,'@'+_0x42fb98['to']+'\x22');}_0x2071a6=JSON[_0xcd3ef(0x1e8)](_0x45402b);}catch(_0x2487c8){_0x1339f8[_0xcd3ef(0x1b8)]['error'](_0x591d35+_0xcd3ef(0x1e2)+_0x2487c8[_0xcd3ef(0x1ae)]+'\x20message:\x20'+_0x45402b),_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}const _0x397e7b=_0x2071a6[_0xcd3ef(0x1fc)];if(!_0x397e7b){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x1fe)+JSON[_0xcd3ef(0x1f6)](_0x2071a6)),_0x1339f8[_0xcd3ef(0x1b8)]['debug'](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}if(!_0x397e7b[_0xcd3ef(0x1aa)]){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x1b0)+JSON['stringify'](_0x2071a6)),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}delete _0x397e7b[_0xcd3ef(0x11a)];let _0x2e5e17;_0x397e7b['id']&&(_0x2e5e17=_0x397e7b['id'],delete _0x397e7b['id']);let _0x4cd095;_0x397e7b[_0xcd3ef(0x1ad)]&&(_0x4cd095=utils[_0xcd3ef(0x14b)](_0x397e7b[_0xcd3ef(0x1ad)]),delete _0x397e7b['onCreate']);await _0x31ac6a(_0xbade0,_0x397e7b);const _0x16d57d=_0x397e7b[_0xcd3ef(0x1aa)];let _0x44fa85,_0x49a931;try{_0x44fa85=await _0x24fff6(_0xbade0,_0xcd3ef(0x1aa),_0x16d57d);}catch(_0x2f8d4a){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x172)+_0x2f8d4a[_0xcd3ef(0x1ae)]),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);const _0xb41ab8=[_0xcd3ef(0x136),_0xcd3ef(0x1ab),'ECONNREFUSED',_0xcd3ef(0x1b6),_0xcd3ef(0x15a),_0xcd3ef(0x178)];for(const _0x58e807 in _0xb41ab8){if(_0x2f8d4a[_0xcd3ef(0x1ae)][_0xcd3ef(0x1b9)](_0x58e807))return!![];}return;}if(!_0x51bf38[_0xcd3ef(0x20f)]){let _0x5d599a=![];if(_0x2071a6[_0xcd3ef(0x1bd)]&&Array[_0xcd3ef(0x13b)](_0x2071a6['Operations']))for(let _0x45e685=0x0;_0x45e685<_0x2071a6[_0xcd3ef(0x1bd)][_0xcd3ef(0x1ba)];_0x45e685++){const _0x5929bb=_0x2071a6[_0xcd3ef(0x1bd)][_0x45e685];_0x5929bb['path'][_0xcd3ef(0x121)]('roles')&&(_0x5929bb[_0xcd3ef(0x197)]=_0xcd3ef(0x1fb),Array[_0xcd3ef(0x13b)](_0x5929bb[_0xcd3ef(0x1cf)])?(_0x5929bb['value'][0x0]['id']=_0x5929bb[_0xcd3ef(0x1cf)][0x0]['value'],_0x5929bb['value'][0x0][_0xcd3ef(0x1dc)]=_0x5929bb[_0xcd3ef(0x1cf)][0x0][_0xcd3ef(0x152)]+_0xcd3ef(0x209)+_0x5929bb[_0xcd3ef(0x1cf)][0x0][_0xcd3ef(0x1cf)],delete _0x5929bb[_0xcd3ef(0x1cf)][0x0][_0xcd3ef(0x1cf)],delete _0x5929bb[_0xcd3ef(0x1cf)][0x0]['type']):_0x5929bb['value']=[{'id':_0x5929bb[_0xcd3ef(0x1cf)],'display':_0x5929bb['value']}],delete _0x5929bb['typeId'],_0x5d599a=!![]);}if(_0x397e7b['roles']&&Array[_0xcd3ef(0x13b)](_0x397e7b[_0xcd3ef(0x11c)])&&_0x397e7b[_0xcd3ef(0x11c)][_0xcd3ef(0x1ba)]>0x0){if(!_0x397e7b[_0xcd3ef(0x1fb)])_0x397e7b[_0xcd3ef(0x1fb)]=[];if(!Array[_0xcd3ef(0x13b)](_0x397e7b[_0xcd3ef(0x1fb)]))_0x397e7b[_0xcd3ef(0x1fb)]=[];for(let _0x41c2b8=0x0;_0x41c2b8<_0x397e7b['roles']['length'];_0x41c2b8++){const _0x357dcf={},_0x4225dd=_0x397e7b[_0xcd3ef(0x11c)][_0x41c2b8];_0x357dcf['value']=_0x4225dd[_0xcd3ef(0x1cf)],_0x357dcf['display']=_0x4225dd[_0xcd3ef(0x152)]+_0xcd3ef(0x209)+_0x4225dd['display'],_0x397e7b['groups'][_0xcd3ef(0x214)](_0x357dcf);}delete _0x397e7b[_0xcd3ef(0x11c)],_0x5d599a=!![];}if(_0x5d599a)_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+'\x20roles\x20converted\x20to\x20groups:\x20'+JSON[_0xcd3ef(0x1f6)](_0x2071a6));}if(!_0x44fa85){if(_0x2071a6[_0xcd3ef(0x166)]===_0xcd3ef(0x212)){_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x13a)+_0x16d57d+_0xcd3ef(0x1a0)),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+'\x20done'+_0x187267);return;}if(_0x51bf38[_0xcd3ef(0x1a4)]&&_0x51bf38[_0xcd3ef(0x1a4)]===!![]){_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x176)+_0x16d57d+_0xcd3ef(0x218)),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}if(Object[_0xcd3ef(0x173)][_0xcd3ef(0x1d4)][_0xcd3ef(0x193)](_0x397e7b,'active')){if(typeof _0x397e7b[_0xcd3ef(0x114)]===_0xcd3ef(0x17e)){const _0x12a41f=_0x397e7b[_0xcd3ef(0x114)]['toLowerCase']();if(_0x12a41f==='true')_0x397e7b[_0xcd3ef(0x114)]=!![];else{if(_0x12a41f===_0xcd3ef(0x14c))_0x397e7b[_0xcd3ef(0x114)]=![];}}if(_0x397e7b['active']===![]){_0x1339f8[_0xcd3ef(0x1b8)]['debug'](_0x591d35+_0xcd3ef(0x176)+_0x16d57d+_0xcd3ef(0x125)),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}}_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x174)+_0x16d57d);const _0x34106a=utils[_0xcd3ef(0x14b)](_0x397e7b);try{delete _0x34106a[_0xcd3ef(0x1fb)];!_0x34106a[_0xcd3ef(0x215)]&&_0x51bf38[_0xcd3ef(0x12a)]&&_0x51bf38[_0xcd3ef(0x12a)]===!![]&&(_0x34106a[_0xcd3ef(0x215)]=utils['createRandomPassword'](0xf));if(_0x4cd095||_0x2e5e17){if(_0x4cd095)for(const _0x1b3801 in _0x4cd095){_0x34106a[_0x1b3801]=_0x4cd095[_0x1b3801];}if(_0x2e5e17)_0x34106a['id']=_0x2e5e17;await _0x31ac6a(_0xbade0,_0x34106a);}await _0x1339f8['createUser'](_0xbade0,_0x34106a),_0x397e7b[_0xcd3ef(0x1fb)]&&Array[_0xcd3ef(0x13b)](_0x397e7b[_0xcd3ef(0x1fb)])&&_0x397e7b[_0xcd3ef(0x1fb)]['length']>0x0&&(_0x49a931=await _0x24fff6(_0xbade0,_0xcd3ef(0x1aa),_0x16d57d));}catch(_0x5f7ce0){_0x1339f8[_0xcd3ef(0x1b8)]['error'](_0x591d35+_0xcd3ef(0x1ff)+JSON[_0xcd3ef(0x1f6)](_0x34106a)+_0xcd3ef(0x189)+_0x5f7ce0['message']+'}'),_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}}if(_0x44fa85||_0x49a931){if(_0x2071a6['activityOperation']===_0xcd3ef(0x212)){if(_0x51bf38['modifyOnly']&&_0x51bf38[_0xcd3ef(0x1a4)]===!![]){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x151)+_0x44fa85+_0xcd3ef(0x1fd)),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+'\x20done'+_0x187267);return;}_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x151)+_0x44fa85);try{await _0x1339f8['deleteUser'](_0xbade0,_0x44fa85);}catch(_0x4f5eac){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x151)+_0x44fa85+_0xcd3ef(0x189)+_0x4f5eac['message']+'}'),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}}else{if(_0x49a931)_0x44fa85=_0x49a931;_0x1339f8[_0xcd3ef(0x1b8)]['debug'](_0x591d35+'\x20Replace\x20User\x20id='+_0x44fa85);const _0x4d664c={};_0x4d664c['set']=()=>{},_0x4d664c[_0xcd3ef(0x1bf)]={},_0x4d664c[_0xcd3ef(0x1bf)][_0xcd3ef(0x17a)]=_0xbade0,_0x4d664c[_0xcd3ef(0x1bf)]['id']=_0x44fa85,_0x4d664c[_0xcd3ef(0x13f)]={},_0x4d664c[_0xcd3ef(0x13f)]['originalUrl']=_0xbade0?'/'+_0xbade0+_0xcd3ef(0x12d)+_0x44fa85:'/Users/'+_0x44fa85,_0x4d664c['request'][_0xcd3ef(0x158)]=_0x397e7b;try{await _0x1339f8[_0xcd3ef(0x11f)](_0x4d664c);}catch(_0x3e1509){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x201)+_0x44fa85+_0xcd3ef(0x189)+_0x3e1509[_0xcd3ef(0x1ae)]),_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}if(_0x4d664c[_0xcd3ef(0x211)]&&(_0x4d664c[_0xcd3ef(0x211)]<0xc8||_0x4d664c[_0xcd3ef(0x211)]>0x12b)){if(_0x4d664c[_0xcd3ef(0x158)]){if(_0x4d664c[_0xcd3ef(0x158)][_0xcd3ef(0x198)]){let _0x5f312d=_0x4d664c[_0xcd3ef(0x158)][_0xcd3ef(0x198)];_0x5f312d=_0x5f312d[_0xcd3ef(0x118)](_0x1339f8[_0xcd3ef(0x138)]+'['+_0x1339f8[_0xcd3ef(0x19a)]+']',''+_0x591d35),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](''+_0x5f312d);}else{if(_0x4d664c[_0xcd3ef(0x158)][_0xcd3ef(0x120)]&&Array[_0xcd3ef(0x13b)](_0x4d664c[_0xcd3ef(0x158)][_0xcd3ef(0x120)])&&_0x4d664c[_0xcd3ef(0x158)][_0xcd3ef(0x120)][_0xcd3ef(0x1ba)]>0x0){let _0x5aa452=_0x4d664c[_0xcd3ef(0x158)]['Errors'][0x0]['description'];_0x5aa452=_0x5aa452['replace'](_0x1339f8['gwName']+'['+_0x1339f8['pluginName']+']',''+_0x591d35),_0x1339f8[_0xcd3ef(0x1b8)]['error'](''+_0x5aa452);}}}}if(_0x51bf38['usePutSoftSync']){const [_0x3ee3ee,_0x5cb2be]=_0x1339f8[_0xcd3ef(0x1f9)]({'Operations':_0x2071a6[_0xcd3ef(0x1bd)]});if(_0x5cb2be){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+'\x20Replace\x20User\x20id='+_0x44fa85+_0xcd3ef(0x15b)+_0x5cb2be[_0xcd3ef(0x1ae)]),_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}const _0x41693f=[];if(_0x3ee3ee[_0xcd3ef(0x11c)]&&Array[_0xcd3ef(0x13b)](_0x3ee3ee['roles']))for(let _0x2a1e96=0x0;_0x2a1e96<_0x3ee3ee['roles'][_0xcd3ef(0x1ba)];_0x2a1e96++){_0x3ee3ee[_0xcd3ef(0x11c)][_0x2a1e96][_0xcd3ef(0x1ed)]&&_0x3ee3ee[_0xcd3ef(0x11c)][_0x2a1e96]['operation']==='delete'&&_0x41693f['push'](_0x3ee3ee[_0xcd3ef(0x11c)][_0x2a1e96]);}if(_0x41693f['length']>0x0)try{await _0x1339f8[_0xcd3ef(0x154)](_0xbade0,_0x44fa85,{'roles':_0x41693f});}catch(_0x311347){_0x1339f8['logger'][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x201)+_0x44fa85+_0xcd3ef(0x20d)+_0x311347[_0xcd3ef(0x1ae)]);}const _0xda83e2=[];if(_0x3ee3ee[_0xcd3ef(0x1fb)]&&Array['isArray'](_0x3ee3ee[_0xcd3ef(0x1fb)]))for(let _0x1db05b=0x0;_0x1db05b<_0x3ee3ee[_0xcd3ef(0x1fb)]['length'];_0x1db05b++){_0x3ee3ee[_0xcd3ef(0x1fb)][_0x1db05b][_0xcd3ef(0x1ed)]&&_0x3ee3ee[_0xcd3ef(0x1fb)][_0x1db05b][_0xcd3ef(0x1ed)]==='delete'&&_0xda83e2[_0xcd3ef(0x214)](_0x3ee3ee[_0xcd3ef(0x1fb)][_0x1db05b]);}if(_0xda83e2[_0xcd3ef(0x1ba)]>0x0)for(let _0x1492b5=0x0;_0x1492b5<_0xda83e2[_0xcd3ef(0x1ba)];_0x1492b5++){try{await _0x1339f8[_0xcd3ef(0x1f5)](_0xbade0,_0xda83e2[_0x1492b5]['id'],{'members':[{'operation':'delete','value':_0x44fa85}]});}catch(_0x28eeb8){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+_0xcd3ef(0x201)+_0x44fa85+_0xcd3ef(0x186)+_0x28eeb8[_0xcd3ef(0x1ae)]);}}}if(_0x51bf38[_0xcd3ef(0x1bc)]&&_0x2071a6[_0xcd3ef(0x166)]===_0xcd3ef(0x154)){if(_0x397e7b[_0xcd3ef(0x1fb)]&&Array[_0xcd3ef(0x13b)](_0x397e7b[_0xcd3ef(0x1fb)])&&_0x397e7b[_0xcd3ef(0x1fb)][_0xcd3ef(0x1ba)]===0x0){if(_0x397e7b[_0xcd3ef(0x11c)]&&Array[_0xcd3ef(0x13b)](_0x397e7b[_0xcd3ef(0x11c)])&&_0x397e7b['roles']['length']===0x0){if(_0x2071a6[_0xcd3ef(0x1bd)]&&Array[_0xcd3ef(0x13b)](_0x2071a6[_0xcd3ef(0x1bd)])&&_0x2071a6[_0xcd3ef(0x1bd)]['length']>0x0){let _0x51e2ef=![];for(let _0xb2cd31=0x0;_0xb2cd31<_0x2071a6[_0xcd3ef(0x1bd)]['length'];_0xb2cd31++){const _0x4d2cb0=_0x2071a6[_0xcd3ef(0x1bd)][_0xb2cd31];if(_0x4d2cb0['op']==='remove'){if(_0x4d2cb0['path']){if(_0x4d2cb0['path'][_0xcd3ef(0x121)]('roles')&&_0x4d2cb0[_0xcd3ef(0x1e7)]){_0x51e2ef=!![];break;}else{if(_0x4d2cb0[_0xcd3ef(0x197)]===_0xcd3ef(0x1fb)){_0x51e2ef=!![];break;}}}}}if(_0x51e2ef){_0x1339f8['logger'][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x151)+_0x44fa85);try{await _0x1339f8[_0xcd3ef(0x212)](_0xbade0,_0x44fa85);}catch(_0x4f2a85){_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x1eb)](_0x591d35+'\x20Delete\x20User\x20id='+_0x44fa85+'\x20error:\x20'+_0x4f2a85[_0xcd3ef(0x1ae)]+'}'),_0x1339f8[_0xcd3ef(0x1b8)]['debug'](_0x591d35+_0xcd3ef(0x161)+_0x187267);return;}}}}}}}}_0x1339f8[_0xcd3ef(0x1b8)][_0xcd3ef(0x112)](_0x591d35+_0xcd3ef(0x161)+_0x187267);}catch(_0x21cb10){_0x1339f8[_0xcd3ef(0x1b8)]['error'](_0x1339f8[_0xcd3ef(0x138)]+'['+_0x1339f8[_0xcd3ef(0x19a)]+']\x20subscriber['+_0xbade0+']['+_0x4f488c+']\x20error:\x20'+_0x21cb10[_0xcd3ef(0x1ae)]+_0xcd3ef(0x16a)+_0x187267);}},_0x516132=nats[_0x3dfe9f(0x1ce)](),_0x183fd2=_0x49deb2[_0x3dfe9f(0x143)](),_0xf19ae7=(_0x3dfe9f(0x15e)+_0x1339f8[_0x3dfe9f(0x19a)]+'_'+_0xbade0)[_0x3dfe9f(0x192)]('*','#')[_0x3dfe9f(0x192)]('>','##')[_0x3dfe9f(0x192)]('.','_'),_0x2f3ad6=_0x4f488c[_0x3dfe9f(0x169)]('.')[0x0]['toUpperCase']()==='GW',_0x4d7b7d=async()=>{const _0x22cd52=_0x3dfe9f;try{let _0x521100;const _0x2b343e=''+_0x51bf38?.[_0x22cd52(0x1c4)]?.[_0x22cd52(0x1e4)],_0xd0be05=await _0x49deb2['jetstreamManager'](),_0x5acdc8=async()=>{const _0x11b04d=_0x22cd52;let _0x23c7c0;try{_0x23c7c0=await _0x183fd2[_0x11b04d(0x1f1)][_0x11b04d(0x12c)](_0x2b343e,_0xf19ae7);}catch(_0x2b3137){const _0x3fcf6e={'durable_name':_0xf19ae7,'deliver_policy':nats['DeliverPolicy']['All'],'ack_policy':nats[_0x11b04d(0x131)]['Explicit'],'filter_subject':_0x4f488c};await _0xd0be05[_0x11b04d(0x1f1)][_0x11b04d(0x164)](_0x2b343e,_0x3fcf6e),_0x23c7c0=await _0x183fd2[_0x11b04d(0x1f1)][_0x11b04d(0x12c)](_0x2b343e,_0xf19ae7);}if(_0x23c7c0?.[_0x11b04d(0x124)]?.[_0x11b04d(0x1be)]?.['deliver_policy']!=='all')throw new Error(_0x11b04d(0x140));_0x23c7c0?.[_0x11b04d(0x124)]?.[_0x11b04d(0x1be)]?.[_0x11b04d(0x1da)]!==_0x4f488c&&(await _0xd0be05[_0x11b04d(0x1f1)][_0x11b04d(0x219)](_0x2b343e,_0xf19ae7,{'filter_subject':_0x4f488c}),_0x23c7c0=await _0x183fd2['consumers'][_0x11b04d(0x12c)](_0x2b343e,_0xf19ae7)),_0x521100=await _0x23c7c0['consume']({'max_messages':0x64}),_0x37ea9e(_0x521100);},_0x37ea9e=async _0x320a75=>{const _0x52637a=_0x22cd52;for await(const _0x4f756b of await _0x320a75[_0x52637a(0x211)]()){switch(_0x4f756b[_0x52637a(0x152)]){case nats[_0x52637a(0x1a6)][_0x52637a(0x13c)]:_0x1339f8['logger']['info'](_0x1339f8['gwName']+'['+_0x1339f8[_0x52637a(0x19a)]+_0x52637a(0x205)+_0xbade0+']['+_0x4f488c+_0x52637a(0x1fa)+_0x4f756b['type']),_0x5acdc8();return;}}};await _0x5acdc8();let _0x1f7703=-0x1;do{for await(const _0x38415e of _0x521100){if(!_0x38415e[_0x22cd52(0x145)]||!_0x38415e[_0x22cd52(0x145)]['get'](_0x22cd52(0x18a))){_0x38415e[_0x22cd52(0x1db)]();continue;}_0x1f7703=_0x521100[_0x22cd52(0x1d9)]();const _0x228f08=_0x1339f8[_0x22cd52(0x138)]+'['+_0x1339f8['pluginName']+']\x20subscriber['+_0xbade0+']['+_0x38415e[_0x22cd52(0x204)]+']['+_0x1f7703+']['+(_0x38415e['headers']?_0x38415e[_0x22cd52(0x145)][_0x22cd52(0x12c)](_0x22cd52(0x18a)):'')+']',_0x4171c=_0x516132[_0x22cd52(0x1ca)](_0x38415e['data']),_0x1afa69=await _0x13d681(_0x228f08,_0x4171c);if(!_0x1afa69||_0x1afa69!==!![])_0x38415e[_0x22cd52(0x1db)]();else _0x1339f8[_0x22cd52(0x1b8)]['error'](_0x228f08+_0x22cd52(0x20e));if(_0x1f7703<0x1)break;}}while(_0x1f7703===0x0);}catch(_0x4c1445){_0x1339f8[_0x22cd52(0x1b8)][_0x22cd52(0x1eb)](_0x1339f8[_0x22cd52(0x138)]+'['+_0x1339f8[_0x22cd52(0x19a)]+_0x22cd52(0x205)+_0xbade0+']['+_0x4f488c+']\x20subscriber\x20stopped\x20error:\x20'+_0x4c1445[_0x22cd52(0x1ae)]);}},_0x1510f0=async()=>{const _0x1f6868=_0x3dfe9f,_0x40b5b6=_0x49deb2[_0x1f6868(0x153)](_0x4f488c,{'max':0x64});for await(const _0x55e034 of _0x40b5b6){if(!_0x55e034[_0x1f6868(0x145)]||!_0x55e034[_0x1f6868(0x145)][_0x1f6868(0x12c)](_0x1f6868(0x18a)))continue;let _0x3c918b,_0x2d1ea7;try{try{_0x3c918b=JSON['parse'](_0x55e034[_0x1f6868(0x17e)]());}catch(_0xac04ca){const _0x903b1b=_0x1f6868(0x1ea);_0x1339f8['logger'][_0x1f6868(0x1eb)](_0x1339f8[_0x1f6868(0x138)]+'['+_0x1339f8['pluginName']+_0x1f6868(0x205)+_0xbade0+']['+_0x4f488c+']\x20'+_0x903b1b+':\x20'+_0x55e034[_0x1f6868(0x17e)]());throw new Error(_0x903b1b);}if(!_0x3c918b||!_0x3c918b['handle']){const _0x2edbd0='subscriber\x20message\x20error:\x20message\x20missing\x20handle';_0x1339f8['logger'][_0x1f6868(0x1eb)](_0x1339f8[_0x1f6868(0x138)]+'['+_0x1339f8[_0x1f6868(0x19a)]+_0x1f6868(0x205)+_0xbade0+']['+_0x4f488c+']\x20'+_0x2edbd0+':\x20'+_0x3c918b);throw new Error(_0x2edbd0);}!Object[_0x1f6868(0x173)][_0x1f6868(0x1d4)][_0x1f6868(0x193)](_0x3c918b,'baseEntity')&&(_0x3c918b['baseEntity']=_0x1f6868(0x113));if(_0x3c918b[_0x1f6868(0x17a)]!==_0xbade0){const _0x848aec=_0x1f6868(0x1cd)+_0x3c918b['baseEntity']+_0x1f6868(0x160)+_0xbade0;_0x1339f8[_0x1f6868(0x1b8)][_0x1f6868(0x1eb)](_0x1339f8['gwName']+'['+_0x1339f8['pluginName']+_0x1f6868(0x205)+_0xbade0+']['+_0x4f488c+']\x20'+_0x848aec);throw new Error(_0x848aec);}_0x2d1ea7=_0x1339f8['gwName']+'['+_0x1339f8[_0x1f6868(0x19a)]+_0x1f6868(0x205)+_0xbade0+']['+_0x55e034[_0x1f6868(0x204)]+']['+(_0x55e034[_0x1f6868(0x145)]?_0x55e034[_0x1f6868(0x145)][_0x1f6868(0x12c)]('Msg-Id'):'')+']',_0x1339f8[_0x1f6868(0x1b8)][_0x1f6868(0x112)](_0x2d1ea7+_0x1f6868(0x123));let _0x31d508,_0x591d08;switch(_0x3c918b[_0x1f6868(0x130)]){case _0x1f6868(0x1b1):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b[_0x1f6868(0x1f4)],_0x3c918b[_0x1f6868(0x155)],_0x3c918b[_0x1f6868(0x168)]);break;case _0x1f6868(0x1de):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['obj'],_0x3c918b[_0x1f6868(0x155)],_0x3c918b['ctxCopy']);break;case _0x1f6868(0x1d0):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b[_0x1f6868(0x1f4)],_0x3c918b['ctxCopy']);break;case _0x1f6868(0x1d8):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b[_0x1f6868(0x1f4)],_0x3c918b[_0x1f6868(0x168)]);break;case'deleteUser':_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['id'],_0x3c918b[_0x1f6868(0x168)]);break;case _0x1f6868(0x1d7):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['id'],_0x3c918b[_0x1f6868(0x168)]);break;case _0x1f6868(0x154):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['id'],_0x3c918b['obj'],_0x3c918b[_0x1f6868(0x168)]);break;case'modifyGroup':_0x31d508=await _0x1339f8[_0x3c918b['handle']](_0xbade0,_0x3c918b['id'],_0x3c918b[_0x1f6868(0x1f4)],_0x3c918b[_0x1f6868(0x168)]);break;case _0x1f6868(0x11f):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0x3c918b[_0x1f6868(0x17f)]);break;case _0x1f6868(0x1bb):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['obj'],_0x3c918b[_0x1f6868(0x168)]);break;case'putApi':_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['id'],_0x3c918b[_0x1f6868(0x1f4)],_0x3c918b[_0x1f6868(0x168)]);break;case _0x1f6868(0x1f3):_0x31d508=await _0x1339f8[_0x3c918b['handle']](_0xbade0,_0x3c918b['id'],_0x3c918b['obj'],_0x3c918b['ctxCopy']);break;case _0x1f6868(0x14a):_0x31d508=await _0x1339f8[_0x3c918b[_0x1f6868(0x130)]](_0xbade0,_0x3c918b['id'],_0x3c918b['query'],_0x3c918b[_0x1f6868(0x1f4)],_0x3c918b[_0x1f6868(0x168)]);break;case _0x1f6868(0x191):_0x31d508=await _0x1339f8[_0x3c918b['handle']](_0xbade0,_0x3c918b['id'],_0x3c918b[_0x1f6868(0x168)]);break;default:_0x591d08=_0x1f6868(0x1b3)+_0x3c918b[_0x1f6868(0x130)]+_0x1f6868(0x14e),_0x1339f8['logger'][_0x1f6868(0x1eb)](_0x1339f8['gwName']+'['+_0x1339f8['pluginName']+_0x1f6868(0x205)+_0xbade0+']['+_0x4f488c+']\x20'+_0x591d08);throw new Error(_0x591d08);}if(!_0x31d508)_0x31d508=null;const _0x460e6a=JSON['stringify'](_0x31d508);_0x55e034[_0x1f6868(0x194)](_0x460e6a),_0x1339f8[_0x1f6868(0x1b8)]['info'](_0x2d1ea7+_0x1f6868(0x207)+_0x3c918b[_0x1f6868(0x130)]+_0x1f6868(0x13d)+(_0x3c918b[_0x1f6868(0x1f4)]?JSON[_0x1f6868(0x1f6)](_0x3c918b[_0x1f6868(0x1f4)]):'')+_0x1f6868(0x156)+(_0x3c918b['id']?_0x3c918b['id']:'')+_0x1f6868(0x1c1)+(_0x3c918b[_0x1f6868(0x155)]?_0x3c918b['attributes']:'')+_0x1f6868(0x1ec)+_0x460e6a+_0x187267);}catch(_0x28f1ba){const _0x4a5639='{\x22error\x22:\x22'+_0x28f1ba[_0x1f6868(0x1ae)]+_0x1f6868(0x16f)+_0x28f1ba[_0x1f6868(0x210)]+'\x22}';_0x55e034[_0x1f6868(0x194)](_0x4a5639),_0x1339f8['logger'][_0x1f6868(0x21b)]((_0x2d1ea7||'')+'\x20message\x20handled:\x20'+_0x3c918b[_0x1f6868(0x130)]+_0x1f6868(0x13d)+(_0x3c918b[_0x1f6868(0x1f4)]?JSON[_0x1f6868(0x1f6)](_0x3c918b[_0x1f6868(0x1f4)]):'')+_0x1f6868(0x156)+(_0x3c918b['id']?_0x3c918b['id']:'')+_0x1f6868(0x1c1)+(_0x3c918b[_0x1f6868(0x155)]?_0x3c918b[_0x1f6868(0x155)]:'')+'\x20message\x20error\x20response:\x20'+_0x4a5639+_0x187267);}}};if(_0x2f3ad6)_0x1510f0();else _0x4d7b7d();},_0x34e901=async(_0x42c203,_0x35a666)=>{const _0x31f186=_0xbd089d,_0x229b95=_0xf2a4c2[_0x42c203][_0x31f186(0x1be)]?.[_0x31f186(0x1c4)]?.[_0x31f186(0x204)];let _0x3a8e73=0x0;for await(const _0x35ca48 of _0x35a666['status']()){switch(_0x35ca48[_0x31f186(0x152)]){case nats[_0x31f186(0x18f)][_0x31f186(0x175)]:_0x1339f8[_0x31f186(0x1b8)][_0x31f186(0x1eb)](_0x1339f8[_0x31f186(0x138)]+'['+_0x1339f8[_0x31f186(0x19a)]+']\x20subscriber['+_0x42c203+']['+_0x229b95+_0x31f186(0x148)+_0x35ca48[_0x31f186(0x190)]+_0x31f186(0x1a7)),_0x3a8e73=0x0;break;case nats[_0x31f186(0x18f)][_0x31f186(0x1c8)]:_0x1339f8[_0x31f186(0x1b8)][_0x31f186(0x21b)](_0x1339f8['gwName']+'['+_0x1339f8['pluginName']+']\x20subscriber['+_0x42c203+']['+_0x229b95+_0x31f186(0x157)+_0x35ca48[_0x31f186(0x190)]);break;case nats[_0x31f186(0x18f)][_0x31f186(0x202)]:_0x1339f8[_0x31f186(0x1b8)][_0x31f186(0x1eb)](_0x1339f8[_0x31f186(0x138)]+'['+_0x1339f8[_0x31f186(0x19a)]+']\x20subscriber['+_0x42c203+']['+_0x229b95+_0x31f186(0x181)+_0x35ca48['data']);break;case nats[_0x31f186(0x116)][_0x31f186(0x1b2)]:_0x3a8e73+=0x1;_0x3a8e73%0x1e===0x0&&_0x1339f8['logger']['debug'](_0x1339f8[_0x31f186(0x138)]+'['+_0x1339f8['pluginName']+_0x31f186(0x205)+_0x42c203+']['+_0x229b95+']\x20client\x20is\x20attempting\x20to\x20reconnect\x20'+_0x35ca48[_0x31f186(0x190)]+_0x31f186(0x1c3)+_0x3a8e73+')');break;case nats[_0x31f186(0x116)][_0x31f186(0x170)]:_0x1339f8[_0x31f186(0x1b8)][_0x31f186(0x112)](_0x1339f8[_0x31f186(0x138)]+'['+_0x1339f8[_0x31f186(0x19a)]+']\x20subscriber['+_0x42c203+']['+_0x229b95+']\x20client\x20has\x20a\x20stale\x20connection\x20'+_0x35ca48[_0x31f186(0x190)]);break;}}};process['on'](_0xbd089d(0x1e9),async()=>{const _0x552236=_0xbd089d;for(const _0x38abbf in _0xf2a4c2){_0xf2a4c2[_0x38abbf]['nc']&&!_0xf2a4c2[_0x38abbf]['nc'][_0x552236(0x147)]()&&await _0xf2a4c2[_0x38abbf]['nc'][_0x552236(0x1c9)]();}}),process['on']('SIGINT',async()=>{for(const _0x117e24 in _0xf2a4c2){_0xf2a4c2[_0x117e24]['nc']&&!_0xf2a4c2[_0x117e24]['nc']['isClosed']()&&await _0xf2a4c2[_0x117e24]['nc']['drain']();}});const _0x24fff6=async(_0xb41d57,_0x4b6236,_0x452300)=>{const _0xd4f235=_0xbd089d,_0x23afde={'attribute':_0x4b6236,'operator':'eq','value':_0x452300,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x1faf5d=[_0x4b6236];if(_0x4b6236!=='id')_0x1faf5d[_0xd4f235(0x214)]('id');try{const _0x32833a=await _0x1339f8[_0xd4f235(0x1b1)](_0xb41d57,_0x23afde,_0x1faf5d);if(!_0x32833a||!_0x32833a[_0xd4f235(0x134)]||!Array[_0xd4f235(0x13b)](_0x32833a['Resources']))throw new Error(_0xd4f235(0x217)+JSON['stringify'](_0x23afde)+'\x20error:\x20missing\x20result');if(_0x32833a[_0xd4f235(0x134)][_0xd4f235(0x1ba)]===0x0)return null;else{if(_0x32833a[_0xd4f235(0x134)][_0xd4f235(0x1ba)]>0x2)throw new Error(_0xd4f235(0x217)+JSON[_0xd4f235(0x1f6)](_0x23afde)+_0xd4f235(0x15d));else{const _0x115ff0=_0x32833a['Resources'][0x0];if(!_0x115ff0['id'])throw new Error(_0xd4f235(0x217)+JSON[_0xd4f235(0x1f6)](_0x23afde)+_0xd4f235(0x14d)+JSON[_0xd4f235(0x1f6)](_0x115ff0)+_0xd4f235(0x111));return decodeURIComponent(_0x115ff0['id']);}}}catch(_0x55abeb){throw new Error(_0xd4f235(0x217)+JSON[_0xd4f235(0x1f6)](_0x23afde)+_0xd4f235(0x189)+_0x55abeb[_0xd4f235(0x1ae)]+'}');}},_0x1ebc85=_0x5d9a5a=>{const _0x50b690=_0xbd089d;if(!_0x5d9a5a||typeof _0x5d9a5a!=='string')return[null,null];_0x5d9a5a=_0x5d9a5a['trim']();const _0x187907=_0x5d9a5a[_0x50b690(0x132)]('(');if(_0x187907<0x1)return[null,null];if(_0x5d9a5a[_0x50b690(0x14f)](_0x5d9a5a['length']-0x1)!==')')return[null,null];if(_0x1fa6c6(_0x5d9a5a,'(')!==_0x1fa6c6(_0x5d9a5a,')'))return[null,null];const _0x53f5a2=_0x5d9a5a['substring'](0x0,_0x187907),_0x5c2648=_0x5d9a5a['substring'](_0x187907+0x1,_0x5d9a5a[_0x50b690(0x1ba)]-0x1);let _0x596514=[];const _0x20d344=_0x5c2648[_0x50b690(0x169)](',');let _0xbef26e='';for(let _0xbafc4e=0x0;_0xbafc4e<_0x20d344[_0x50b690(0x1ba)];_0xbafc4e++){const _0x187f9b=_0xbef26e?_0xbef26e+','+_0x20d344[_0xbafc4e]:_0x20d344[_0xbafc4e],_0x36e3a7=_0x1fa6c6(_0x187f9b,'('),_0x4c0cd0=_0x1fa6c6(_0x187f9b,')');if(_0x36e3a7===_0x4c0cd0)_0x596514['push'](_0x5d759e(_0x187f9b,'\x22')),_0xbef26e='';else{if(_0xbef26e)_0xbef26e+=','+_0x20d344[_0xbafc4e];else _0xbef26e+=_0x20d344[_0xbafc4e];}}if(_0x596514[_0x50b690(0x1ba)]===0x0)_0x596514=null;return[_0x53f5a2,_0x596514];};function _0x1fa6c6(_0x2135a3,_0x82e98c){const _0x37b0fa=_0xbd089d;let _0x182461=0x0;for(let _0x3bfac0=0x0;_0x3bfac0<_0x2135a3[_0x37b0fa(0x1ba)];_0x3bfac0++){_0x2135a3['charAt'](_0x3bfac0)===_0x82e98c&&(_0x182461+=0x1);}return _0x182461;}const _0x5d759e=(_0x2b79f6,_0x2896bd)=>{const _0x1d4d16=_0xbd089d;if(typeof _0x2b79f6!==_0x1d4d16(0x17e)||typeof _0x2896bd!==_0x1d4d16(0x17e))return _0x2b79f6;if(_0x2b79f6[_0x1d4d16(0x1ba)]===0x1)return _0x2b79f6;if(_0x2896bd[_0x1d4d16(0x1ba)]!==0x1)return _0x2b79f6;return _0x2b79f6=_0x2b79f6[_0x1d4d16(0x1d3)](),_0x2b79f6[_0x1d4d16(0x14f)](0x0,0x1)===_0x2896bd&&(_0x2b79f6=_0x2b79f6[_0x1d4d16(0x14f)](0x1)),_0x2b79f6[_0x1d4d16(0x14f)](_0x2b79f6[_0x1d4d16(0x1ba)]-0x1)===_0x2896bd&&(_0x2b79f6=_0x2b79f6[_0x1d4d16(0x14f)](0x0,_0x2b79f6['length']-0x1)),_0x2b79f6;},_0x51b6dd=async(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x3100d3)=>{const _0x42ee95=_0xbd089d;if(!_0x37b44c||!_0x537ba2||!_0x3100d3)return null;const [_0x41e4e8,_0x3bb1c1]=_0x1ebc85(_0x3100d3);if(!_0x41e4e8||!_0x3bb1c1){const _0x5a8473=_0x3100d3[_0x42ee95(0x169)]('(');if(_0x5a8473[_0x42ee95(0x1ba)]>0x1){const _0x47ab77=[_0x42ee95(0x1ac),_0x42ee95(0x1a9),_0x42ee95(0x16b),_0x42ee95(0x119),_0x42ee95(0x1b4),'replace',_0x42ee95(0x144),_0x42ee95(0x16e),'getuniquevalue'],_0x309d4c=_0x5a8473[0x0][_0x42ee95(0x1c0)]();if(_0x47ab77[_0x42ee95(0x1b9)](_0x309d4c))return null;}return _0x3100d3;}for(let _0x29ab9b=0x0;_0x29ab9b<_0x3bb1c1[_0x42ee95(0x1ba)];_0x29ab9b++){if(_0x3bb1c1[_0x29ab9b]['substring'](0x0,0x1)==='['){const _0x5ec945=_0x3bb1c1[_0x29ab9b]['indexOf'](']');if(_0x5ec945<0x0)return null;const _0x33d4a3=_0x3bb1c1[_0x29ab9b][_0x42ee95(0x14f)](0x1,_0x5ec945),_0x5abb62=_0x33d4a3[_0x42ee95(0x169)]('.');let _0xc41610;for(let _0x2d7760=0x0;_0x2d7760<_0x5abb62[_0x42ee95(0x1ba)];_0x2d7760++){if(_0x2d7760===0x0)_0xc41610=_0x37b44c[_0x5abb62[_0x2d7760]];else{if(!_0xc41610)return null;_0xc41610=_0xc41610[_0x5abb62[_0x2d7760]];}}if(!_0xc41610)return null;_0x3bb1c1[_0x29ab9b]=_0xc41610;}}for(let _0x1d95a3=0x0;_0x1d95a3<_0x3bb1c1[_0x42ee95(0x1ba)];_0x1d95a3++){const [_0x1b66f9]=_0x1ebc85(_0x3bb1c1[_0x1d95a3]);_0x1b66f9&&(_0x3bb1c1[_0x1d95a3]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x3bb1c1[_0x1d95a3]));}if(_0x3bb1c1[0x0]===null)return null;switch(_0x41e4e8['toLowerCase']()){case _0x42ee95(0x1ac):{if(_0x3bb1c1['length']!==0x1)return null;const [_0x102d37]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0x102d37)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x102d37);if(_0x3bb1c1[0x0]===null)return null;return _0x3bb1c1[0x0][_0x42ee95(0x1c0)]();}case _0x42ee95(0x1a9):{if(_0x3bb1c1[_0x42ee95(0x1ba)]!==0x1)return null;const [_0x12464d]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0x12464d)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x12464d);if(_0x3bb1c1[0x0]===null)return null;return _0x3bb1c1[0x0][_0x42ee95(0x1c6)]();}case _0x42ee95(0x16b):{if(_0x3bb1c1[_0x42ee95(0x1ba)]!==0x2)return null;const [_0xec9130]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0xec9130)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0xec9130);if(_0x3bb1c1[0x0]===null)return null;if(isNaN(_0x3bb1c1[0x1]))return null;return _0x3bb1c1[0x0][_0x42ee95(0x14f)](0x0,_0x3bb1c1[0x1]);}case _0x42ee95(0x119):{const [_0x5d1ec1]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0x3bb1c1[_0x42ee95(0x1ba)]<0x2)return null;if(_0x5d1ec1)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x5d1ec1);if(_0x3bb1c1[0x0]===null)return null;const _0x2de4a1=_0x3bb1c1[0x1];if(isNaN(_0x2de4a1))return null;let _0x10bc7b;if(_0x3bb1c1['length']===0x3)_0x10bc7b=_0x3bb1c1[0x0][_0x42ee95(0x169)](_0x3bb1c1[0x2]);else _0x10bc7b=_0x10bc7b=_0x3bb1c1[0x0]['split']('\x20');if(_0x2de4a1<=_0x10bc7b['length'])return _0x10bc7b[_0x2de4a1-0x1];else return'';}case _0x42ee95(0x118):{const [_0x1ca6be]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0x1ca6be)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x1ca6be);if(_0x3bb1c1[0x0]===null)return null;if(_0x3bb1c1[_0x42ee95(0x1ba)]!==0x3)return null;return _0x3bb1c1[0x0][_0x42ee95(0x192)](_0x3bb1c1[0x1],_0x3bb1c1[0x2]);}case'normalize':{if(_0x3bb1c1['length']!==0x1)return null;const [_0xd39d53]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0xd39d53)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0xd39d53);if(_0x3bb1c1[0x0]===null)return null;return ascii127[_0x42ee95(0x11d)](_0x3bb1c1[0x0]);}case _0x42ee95(0x1b4):{let _0x1123f9='';for(let _0x587d14=0x0;_0x587d14<_0x3bb1c1[_0x42ee95(0x1ba)];_0x587d14++){const [_0x250b3a]=_0x1ebc85(_0x3bb1c1[_0x587d14]);if(_0x250b3a)_0x3bb1c1[_0x587d14]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x250b3a);if(_0x3bb1c1[_0x587d14]===null)return null;_0x1123f9+=_0x3bb1c1[_0x587d14];}return _0x1123f9;}case'increment':{if(_0x3bb1c1[_0x42ee95(0x1ba)]>0x2)return null;const [_0x354b7c]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0x354b7c)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x354b7c);if(_0x3bb1c1[0x0]===null)return null;const _0x1a74b5=parseInt(_0x3bb1c1[0x0]);if(isNaN(_0x1a74b5))return null;let _0x249d29=_0x42ee95(0x117);_0x249d29+=','+_0x3bb1c1[0x0];if(_0x3bb1c1[_0x42ee95(0x1ba)]===0x2&&_0x3bb1c1[0x1][_0x42ee95(0x1c0)]()==='true')_0x249d29+=',true';else _0x249d29+=_0x42ee95(0x1b7);return _0x249d29+='##',_0x249d29;}case'getuniquevalue':{if(_0x3bb1c1['length']!==0x1)return null;const [_0x31b679]=_0x1ebc85(_0x3bb1c1[0x0]);if(_0x31b679)_0x3bb1c1[0x0]=await _0x51b6dd(_0x2ff5bd,_0x37b44c,_0x537ba2,_0x31b679);if(_0x3bb1c1[0x0]===null)return null;let _0x1adb93,_0x4243b5=![],_0x270884='';const _0x212704=_0x3bb1c1[0x0][_0x42ee95(0x169)]('##');if(_0x212704['length']>0x2)for(let _0x64553f=0x0;_0x64553f<_0x212704[_0x42ee95(0x1ba)];_0x64553f++){if(_0x212704[_0x64553f][_0x42ee95(0x121)](_0x42ee95(0x1d1))){const _0x53ec48=_0x212704[_0x64553f]['split'](',');if(_0x53ec48[_0x42ee95(0x1ba)]<0x2)return null;const _0x5210dc=parseInt(_0x53ec48[0x1]);if(isNaN(_0x5210dc))return null;_0x270884='##'+_0x212704[_0x64553f]+'##',_0x1adb93=_0x53ec48[0x1],_0x53ec48[_0x42ee95(0x1ba)]>0x2&&(_0x4243b5=_0x53ec48[0x2]['toLowerCase']()===_0x42ee95(0x1c7));}}let _0x341e4c,_0x3b5f53=0x0,_0x157f46=0x0;if(_0x1adb93){_0x157f46=_0x1adb93[_0x42ee95(0x1ba)],_0x3b5f53=0xa;for(let _0x574e08=0x1;_0x574e08<_0x157f46;_0x574e08++){_0x3b5f53*=0xa;}_0x3b5f53-=0x1,_0x341e4c=parseInt(_0x1adb93);if(isNaN(_0x341e4c))return null;_0x341e4c-=0x1;}else _0x341e4c=0x0;do{_0x341e4c+=0x1;let _0x26ff26=_0x3bb1c1[0x0];if(_0x1adb93!==undefined&&_0x270884){let _0x7803ce=_0x341e4c[_0x42ee95(0x1cb)]();while(_0x7803ce[_0x42ee95(0x1ba)]<_0x157f46){_0x7803ce='0'+_0x7803ce;}_0x4243b5?_0x26ff26=_0x26ff26[_0x42ee95(0x118)](_0x270884,_0x7803ce):(_0x26ff26=_0x26ff26[_0x42ee95(0x118)](_0x270884,''),_0x4243b5=!![],_0x341e4c-=0x1);}try{const _0x11758d=await _0x24fff6(_0x2ff5bd,_0x537ba2,_0x26ff26);if(!_0x11758d)return _0x26ff26;}catch(_0x1ec7c2){return _0x1339f8['logger'][_0x42ee95(0x1eb)](_0x1339f8[_0x42ee95(0x138)]+'['+_0x1339f8['pluginName']+']\x20'+_0x41e4e8+_0x42ee95(0x172)+_0x1ec7c2[_0x42ee95(0x1ae)]),null;}}while(_0x341e4c<_0x3b5f53);return null;}default:}return null;},_0x31ac6a=async(_0x4aac1b,_0x2770e9)=>{const _0x232aa8=_0xbd089d;for(const _0x34fb6b in _0x2770e9){const _0x53f8e8=_0x2770e9[_0x34fb6b],[_0x296917,_0x3302e5]=_0x1ebc85(_0x53f8e8);if(_0x296917){const _0x233b89=''+_0x34fb6b,_0x1d8d0c=_0x296917+'('+_0x3302e5['join'](',')+')',_0x50ee07=await _0x51b6dd(_0x4aac1b,_0x2770e9,_0x233b89,_0x1d8d0c);if(_0x50ee07===null)delete _0x2770e9[_0x34fb6b];else _0x2770e9[_0x34fb6b]=_0x50ee07;}for(const _0x29ef32 in _0x53f8e8){const _0x293eba=_0x53f8e8[_0x29ef32],[_0x32ef12,_0xcd881a]=_0x1ebc85(_0x293eba);if(_0x32ef12){const _0x64826=_0x34fb6b+'.'+_0x29ef32,_0xa62ba8=_0x32ef12+'('+_0xcd881a[_0x232aa8(0x1b4)](',')+')',_0x24c426=await _0x51b6dd(_0x4aac1b,_0x2770e9,_0x64826,_0xa62ba8);if(_0x24c426===null)delete _0x53f8e8[_0x29ef32];else _0x53f8e8[_0x29ef32]=_0x24c426;}}}return _0x2770e9;};},module[a0_0x59b720(0x167)][a0_0x59b720(0x135)]=function(_0xf7579){const _0x5e5b21=a0_0x59b720,_0x4fc4b3=_0xf7579,_0x42cd7e={},_0x5a7e9a=async(_0x1905a1,_0x1c4e64)=>{const _0x16473c=a0_0x449c,_0x475ab6=_0x42cd7e[_0x1905a1][_0x16473c(0x1be)]?.[_0x16473c(0x1c4)]?.[_0x16473c(0x204)];let _0x13196e=0x0;for await(const _0x476bb3 of _0x1c4e64['status']()){switch(_0x476bb3[_0x16473c(0x152)]){case nats[_0x16473c(0x18f)]['Disconnect']:_0x4fc4b3['logger'][_0x16473c(0x1eb)](_0x4fc4b3['gwName']+'['+_0x4fc4b3[_0x16473c(0x19a)]+_0x16473c(0x11e)+_0x1905a1+']['+_0x475ab6+']\x20client\x20disconnected\x20'+_0x476bb3['data']+_0x16473c(0x1a7)),_0x13196e=0x0;break;case nats[_0x16473c(0x18f)][_0x16473c(0x1c8)]:_0x4fc4b3['logger'][_0x16473c(0x21b)](_0x4fc4b3[_0x16473c(0x138)]+'['+_0x4fc4b3[_0x16473c(0x19a)]+_0x16473c(0x11e)+_0x1905a1+']['+_0x475ab6+_0x16473c(0x157)+_0x476bb3[_0x16473c(0x190)]);break;case nats['Events'][_0x16473c(0x202)]:_0x4fc4b3[_0x16473c(0x1b8)][_0x16473c(0x1eb)](_0x4fc4b3['gwName']+'['+_0x4fc4b3[_0x16473c(0x19a)]+_0x16473c(0x11e)+_0x1905a1+']['+_0x475ab6+_0x16473c(0x181)+_0x476bb3[_0x16473c(0x190)]);break;case nats['DebugEvents']['Reconnecting']:_0x13196e+=0x1;_0x13196e%0x1e===0x0&&_0x4fc4b3[_0x16473c(0x1b8)][_0x16473c(0x112)](_0x4fc4b3[_0x16473c(0x138)]+'['+_0x4fc4b3[_0x16473c(0x19a)]+_0x16473c(0x11e)+_0x1905a1+']['+_0x475ab6+_0x16473c(0x1df)+_0x476bb3[_0x16473c(0x190)]+_0x16473c(0x1c3)+_0x13196e+')');break;case nats[_0x16473c(0x116)][_0x16473c(0x170)]:_0x4fc4b3[_0x16473c(0x1b8)][_0x16473c(0x112)](_0x4fc4b3['gwName']+'['+_0x4fc4b3[_0x16473c(0x19a)]+_0x16473c(0x11e)+_0x1905a1+']['+_0x475ab6+']\x20client\x20has\x20a\x20stale\x20connection\x20'+_0x476bb3[_0x16473c(0x190)]);break;}}},_0x46d096=async(_0x2235be,_0x471f81)=>{const _0x5fdba8=a0_0x449c,_0x593cfc=_0x42cd7e[_0x2235be][_0x5fdba8(0x1be)]?.['nats']?.[_0x5fdba8(0x204)];let _0x231fce;try{_0x231fce=await nats[_0x5fdba8(0x149)](_0x471f81);if(_0x231fce[_0x5fdba8(0x21b)][_0x5fdba8(0x15f)]!==_0x5fdba8(0x137)){_0x231fce[_0x5fdba8(0x196)]();return;}_0x42cd7e[_0x2235be]['nc']=_0x231fce,_0x5a7e9a(_0x2235be,_0x231fce);}catch(_0x35a13b){_0x4fc4b3['logger'][_0x5fdba8(0x1eb)](_0x4fc4b3[_0x5fdba8(0x138)]+'['+_0x4fc4b3['pluginName']+']\x20publisher['+_0x2235be+']['+_0x593cfc+_0x5fdba8(0x1ee)+_0x35a13b[_0x5fdba8(0x1ae)]+_0x5fdba8(0x1a3)),_0x471f81[_0x5fdba8(0x182)]=!![];try{_0x231fce=await nats[_0x5fdba8(0x149)](_0x471f81);if(_0x231fce[_0x5fdba8(0x21b)][_0x5fdba8(0x15f)]!=='SCIM\x20Stream'){_0x231fce[_0x5fdba8(0x196)]();return;}_0x42cd7e[_0x2235be]['nc']=_0x231fce,_0x5a7e9a(_0x2235be,_0x231fce);}catch(_0x361e9d){_0x4fc4b3[_0x5fdba8(0x1b8)][_0x5fdba8(0x1eb)](_0x4fc4b3['gwName']+'['+_0x4fc4b3['pluginName']+']\x20publisher['+_0x2235be+']['+_0x593cfc+']\x20connect\x20error:\x20'+_0x361e9d[_0x5fdba8(0x1ae)]);return;}}_0x4fc4b3[_0x5fdba8(0x1b8)]['debug'](_0x4fc4b3[_0x5fdba8(0x138)]+'['+_0x4fc4b3[_0x5fdba8(0x19a)]+_0x5fdba8(0x11e)+_0x2235be+']['+_0x593cfc+_0x5fdba8(0x1ef)+(_0x471f81[_0x5fdba8(0x188)]['ca']?_0x5fdba8(0x188):'')+'\x20'+_0x231fce[_0x5fdba8(0x139)]()),_0x231fce[_0x5fdba8(0x183)]()['then'](_0x33f52e=>{const _0x41b60b=_0x5fdba8;_0x33f52e&&_0x4fc4b3[_0x41b60b(0x1b8)][_0x41b60b(0x1eb)](_0x4fc4b3[_0x41b60b(0x138)]+'['+_0x4fc4b3['pluginName']+_0x41b60b(0x11e)+_0x2235be+']['+_0x593cfc+_0x41b60b(0x1a5)+_0x33f52e[_0x41b60b(0x1ae)]);});};this['add']=async(_0x208e3c,_0x1b6dcd)=>{const _0x474cd4=a0_0x449c;if(!_0x1b6dcd?.[_0x474cd4(0x1c4)]){_0x4fc4b3['logger']['error'](_0x4fc4b3[_0x474cd4(0x138)]+'['+_0x4fc4b3[_0x474cd4(0x19a)]+_0x474cd4(0x11e)+_0x208e3c+_0x474cd4(0x1c2));return;}if(!_0x1b6dcd?.[_0x474cd4(0x1c4)]?.[_0x474cd4(0x1e4)]){_0x4fc4b3['logger'][_0x474cd4(0x1eb)](_0x4fc4b3['gwName']+'['+_0x4fc4b3[_0x474cd4(0x19a)]+']\x20publisher['+_0x208e3c+']\x20initialization\x20error:\x20missing\x20configuration\x20nats.tenant');return;}if(!_0x1b6dcd?.[_0x474cd4(0x1c4)]?.[_0x474cd4(0x204)]){_0x4fc4b3[_0x474cd4(0x1b8)][_0x474cd4(0x1eb)](_0x4fc4b3[_0x474cd4(0x138)]+'['+_0x4fc4b3['pluginName']+_0x474cd4(0x11e)+_0x208e3c+']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject');return;}if(!_0x1b6dcd?.[_0x474cd4(0x1c4)]?.[_0x474cd4(0x204)][_0x474cd4(0x121)](_0x474cd4(0x12b))){_0x4fc4b3['logger'][_0x474cd4(0x1eb)](_0x4fc4b3[_0x474cd4(0x138)]+'['+_0x4fc4b3[_0x474cd4(0x19a)]+_0x474cd4(0x11e)+_0x208e3c+']\x20initialization\x20error:\x20nats.subject\x20root\x20topic\x20must\x20be\x20\x27GW\x27,\x20nats.subject\x20example:\x20GW.APP1');return;}if(!_0x1b6dcd[_0x474cd4(0x184)]||!Array[_0x474cd4(0x13b)](_0x1b6dcd[_0x474cd4(0x184)])||_0x1b6dcd[_0x474cd4(0x184)]['length']<0x1){_0x4fc4b3[_0x474cd4(0x1b8)][_0x474cd4(0x1eb)](_0x4fc4b3[_0x474cd4(0x138)]+'['+_0x4fc4b3[_0x474cd4(0x19a)]+']\x20publisher['+_0x208e3c+']\x20initialization\x20error:\x20missing\x20configuration\x20stream.baseUrls');return;}if(!_0x1b6dcd?.[_0x474cd4(0x146)]?.['ca']){_0x4fc4b3[_0x474cd4(0x1b8)][_0x474cd4(0x1eb)](_0x4fc4b3['gwName']+'['+_0x4fc4b3[_0x474cd4(0x19a)]+_0x474cd4(0x11e)+_0x208e3c+_0x474cd4(0x1f2));return;}const _0x550aab={};try{let _0x323053=path['join'](_0x4fc4b3['configDir'],'/certs/',_0x1b6dcd?.[_0x474cd4(0x146)]?.['ca']||_0x474cd4(0x1a1));(_0x1b6dcd?.[_0x474cd4(0x146)]?.['ca']?.[_0x474cd4(0x121)]('/')||_0x1b6dcd?.[_0x474cd4(0x146)]?.['ca']?.[_0x474cd4(0x1b9)]('\x5c'))&&(_0x323053=_0x1b6dcd[_0x474cd4(0x146)]['ca']),_0x550aab['ca']=[fs['readFileSync'](_0x323053)],_0x550aab['rejectUnauthorized']=!![];}catch(_0x5cefce){_0x4fc4b3['logger'][_0x474cd4(0x1eb)](_0x4fc4b3[_0x474cd4(0x138)]+'['+_0x4fc4b3[_0x474cd4(0x19a)]+_0x474cd4(0x11e)+_0x208e3c+_0x474cd4(0x16d)+_0x5cefce[_0x474cd4(0x1ae)]);return;}const _0x29ec2={},_0x74e3d9=new TextEncoder()['encode'](_0x1b6dcd?.['nats']?.[_0x474cd4(0x163)]),_0x531ea3=_0x1b6dcd?.[_0x474cd4(0x1c4)]?.[_0x474cd4(0x122)];_0x29ec2[_0x474cd4(0x18d)]=nats[_0x474cd4(0x1c5)](_0x531ea3,_0x74e3d9),_0x29ec2[_0x474cd4(0x1d2)]=_0x1b6dcd[_0x474cd4(0x184)],_0x29ec2[_0x474cd4(0x188)]=_0x550aab,_0x29ec2['waitOnFirstConnect']=![],_0x29ec2['reconnect']=!![],_0x29ec2[_0x474cd4(0x19c)]=0x3e8*0xa,_0x29ec2[_0x474cd4(0x1f0)]=-0x1,_0x29ec2['pingInterval']=0x2*0x3c*0x3e8,_0x29ec2[_0x474cd4(0x20a)]=0x5,_0x29ec2[_0x474cd4(0x112)]=![],_0x42cd7e[_0x208e3c]={},_0x42cd7e[_0x208e3c]['config']=_0x1b6dcd,_0x42cd7e[_0x208e3c]['nc']=undefined,_0x46d096(_0x208e3c,_0x29ec2);};const _0x35b882=nats[_0x5e5b21(0x1ce)]();this[_0x5e5b21(0x1b5)]=async _0x257e87=>{const _0x3eca82=_0x5e5b21;let _0xda2baa;try{if(_0x257e87[_0x3eca82(0x133)]===Object){_0xda2baa=_0x257e87['baseEntity'];if(!_0xda2baa)_0x257e87[_0x3eca82(0x17a)]=_0x3eca82(0x113);_0x257e87=JSON[_0x3eca82(0x1f6)](_0x257e87);}else{const _0x2c82a9=JSON[_0x3eca82(0x1e8)](_0x257e87);_0xda2baa=_0x2c82a9[_0x3eca82(0x17a)];}}catch(_0x4b50ee){throw new Error(_0x3eca82(0x11b)+_0xda2baa+']\x20error:\x20message\x20must\x20be\x20JSON\x20formatted');}if(!_0x42cd7e[_0xda2baa])throw new Error(_0x3eca82(0x11b)+_0xda2baa+_0x3eca82(0x18c)+_0xda2baa);const _0x5b021e=nats[_0x3eca82(0x145)]();_0x5b021e[_0x3eca82(0x150)](_0x3eca82(0x18a),crypto['randomUUID']());let _0x51ce87;try{if(!_0x42cd7e[_0xda2baa]['nc'])throw new Error('publisher\x20not\x20initialized/connected');_0x51ce87=await _0x42cd7e[_0xda2baa]['nc'][_0x3eca82(0x13f)](_0x42cd7e[_0xda2baa][_0x3eca82(0x1be)]?.['nats']?.[_0x3eca82(0x204)],_0x35b882['encode'](_0x257e87),{'headers':_0x5b021e});}catch(_0x5aaf34){if(_0x5aaf34[_0x3eca82(0x1ae)]===_0x3eca82(0x129))throw new Error('publisher['+_0xda2baa+_0x3eca82(0x19e)+_0x42cd7e[_0xda2baa][_0x3eca82(0x1be)]?.[_0x3eca82(0x1c4)]?.[_0x3eca82(0x204)]);else throw new Error(_0x3eca82(0x11b)+_0xda2baa+_0x3eca82(0x1e3)+_0x5aaf34[_0x3eca82(0x1ae)]);}let _0x2fa142;try{_0x2fa142=JSON[_0x3eca82(0x1e8)](_0x51ce87['string']());}catch(_0x12d63d){throw new Error(_0x3eca82(0x1e1)+_0x51ce87['string']());}if(_0x2fa142?.['error']){const _0xc19b65=new Error(_0x3eca82(0x19f)+_0x2fa142[_0x3eca82(0x1eb)]);_0xc19b65[_0x3eca82(0x210)]=_0x2fa142['errName'];throw _0xc19b65;}return _0x2fa142;},process['on'](_0x5e5b21(0x1e9),async()=>{const _0x464dec=_0x5e5b21;for(const _0x574eac in _0x42cd7e){_0x42cd7e[_0x574eac]['nc']&&!_0x42cd7e[_0x574eac]['nc'][_0x464dec(0x147)]()&&await _0x42cd7e[_0x574eac]['nc'][_0x464dec(0x1c9)]();}}),process['on'](_0x5e5b21(0x213),async()=>{const _0x2fca3c=_0x5e5b21;for(const _0xacec36 in _0x42cd7e){_0x42cd7e[_0xacec36]['nc']&&!_0x42cd7e[_0xacec36]['nc'][_0x2fca3c(0x147)]()&&await _0x42cd7e[_0xacec36]['nc']['drain']();}});},module['exports'][a0_0x59b720(0x115)]=async(_0x3d72a3,_0x5402b6,_0x51fae7,_0x5c9c22)=>{const _0x3edd6b=a0_0x59b720,_0x18ae16=_0x3edd6b(0x115),_0xe7b213=_0x3d72a3;_0xe7b213[_0x3edd6b(0x1b8)][_0x3edd6b(0x112)](_0xe7b213[_0x3edd6b(0x138)]+'['+_0xe7b213[_0x3edd6b(0x19a)]+']\x20handling\x20\x22'+_0x18ae16+'\x22');try{if(!fs[_0x3edd6b(0x19b)](_0xe7b213[_0x3edd6b(0x1f7)]+'/approles'))fs[_0x3edd6b(0x1e5)](_0xe7b213[_0x3edd6b(0x1f7)]+_0x3edd6b(0x17c));}catch(_0x47545d){}const _0x588dd2=path[_0x3edd6b(0x1b4)](''+_0xe7b213[_0x3edd6b(0x1f7)],_0x3edd6b(0x162),_0x3edd6b(0x180)+_0xe7b213[_0x3edd6b(0x19a)]+_0x3edd6b(0x199)),_0x2ea3af={};utils['fsExistsSync'](_0x588dd2)&&fs['readFileSync'](_0x588dd2,_0x3edd6b(0x126))[_0x3edd6b(0x169)](/\r?\n/)['forEach'](_0x27bae3=>{const _0x4f5e4f=_0x3edd6b,_0x28caca=_0x27bae3[_0x4f5e4f(0x169)]('\x20');_0x28caca['length']===0x2&&(_0x2ea3af[_0x28caca[0x0]]=_0x28caca[0x1]);});const _0x5379c1=fs[_0x3edd6b(0x1e6)](_0x588dd2,{'flags':'w','encoding':_0x3edd6b(0x12e),'mode':0x1b6,'autoClose':!![]}),_0x3d4dcf=[],_0x512ce2=await _0xe7b213[_0x3edd6b(0x1de)](_0x5402b6,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x3edd6b(0x177)]);return _0x512ce2[_0x3edd6b(0x134)][_0x3edd6b(0x20c)](_0x490606=>{const _0x433fad=_0x3edd6b;if(_0x490606['id']){let _0x169975=crypto[_0x433fad(0x19d)]();if(_0x2ea3af[_0x490606['id']])_0x169975=_0x2ea3af[_0x490606['id']];const _0x379dd7={'allowedMemberTypes':[_0x433fad(0x1f8)],'description':_0x433fad(0x128),'displayName':_0x490606['displayName']||_0x490606['id'],'id':_0x169975,'isEnabled':!![],'lang':null,'origin':_0x433fad(0x179),'value':decodeURIComponent(_0x490606['id'])};_0x3d4dcf[_0x433fad(0x214)](_0x379dd7),_0x5379c1[_0x433fad(0x159)](_0x490606['id']+'\x20'+_0x169975+'\x0a');}}),_0x5379c1['close'](),_0xe7b213[_0x3edd6b(0x1b8)][_0x3edd6b(0x112)](_0xe7b213[_0x3edd6b(0x138)]+'['+_0xe7b213[_0x3edd6b(0x19a)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x588dd2),{'Resources':[{'appRoles':_0x3d4dcf}]};};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "Using SCIM protocol as a gateway for user provisioning to other endpoints",
5
5
  "author": "Jarle Elshaug <jarle.elshaug@gmail.com> (https://elshaug.xyz)",
6
6
  "homepage": "https://elshaug.xyz",