scimgateway 4.4.1 → 4.4.3

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
@@ -339,14 +339,14 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
339
339
 
340
340
  - **port** - Gateway will listen on this port number. Clients (e.g. Provisioning Server) will be using this port number for communicating with the gateway.
341
341
 
342
- - **localhostonly** - true or false. False means gateway accepts incoming requests from all clients. True means traffic from only localhost (127.0.0.1) is accepted (gateway must then be installed on the CA Connector Server).
342
+ - **localhostonly** - true or false. False means gateway accepts incoming requests from all clients. True means traffic from only localhost (127.0.0.1) is accepted.
343
343
 
344
344
  - **payloadSize** - if not defined, default "1mb" will be used. There are cases which large groups could exceed default size and you may want to increase by setting your own size
345
345
 
346
- - **scim.version** - "1.1" or "2.0". Default is "2.0". For Symantec/Broadcom/CA Identity Manager "1.1" should be used.
346
+ - **scim.version** - "1.1" or "2.0". Default is "2.0".
347
347
 
348
348
  - **scim.customSchema** - filename of JSON file located in `<package-root>\config\schemas` containing custom schema attributes, see configuration notes
349
- **additional information**: Schemas, ServiceProviderConfig and ResourceType can be customized if `lib/scimdef-v2.js (or scimdef-v1.js)` exists. Original scimdef-v2.js/scimdef-v1.js can be copied from node_modules/scimgateway/lib to your plugin/lib and customized.
349
+ **Note, scim.customSchema is obsolete, instead use:**: Schemas, ServiceProviderConfig and ResourceType can be customized if `lib/scimdef-v2.js (or scimdef-v1.js)` exists. Original scimdef-v2.js/scimdef-v1.js can be copied from node_modules/scimgateway/lib to your plugin/lib and customized.
350
350
 
351
351
  - **scim.skipTypeConvert** - true or false, default false. Multivalue attributes supporting types e.g. emails, phoneNumbers, ims, photos, addresses, entitlements and x509Certificates (but not roles, groups and members) will be become "type converted objects" when sent to modifyUser and createUser. This for simplicity of checking attributes included and also for the endpointMapper method (used by plugin-ldap and plugin-entra-id), e.g.:
352
352
 
@@ -406,7 +406,7 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
406
406
 
407
407
  `<FQDN>` is Fully Qualified Domain Name of the host having SCIM Gateway installed
408
408
 
409
- Note, when using Broadcom/CA Provisioning, the "certificate authority - CA" also have to be imported on the Connector Server. For self-signed certificate CA and the certificate (public key) is the same.
409
+ Note, when using Symantec/Broadcom/CA Provisioning, the "certificate authority - CA" also have to be imported on the Connector Server. For self-signed certificate CA and the certificate (public key) is the same.
410
410
 
411
411
  PFX / PKCS#12 bundle can be used instead of key/cert/ca e.g:
412
412
 
@@ -453,7 +453,7 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
453
453
  - Setting environment variable `SEED` will override default password seeding logic.
454
454
  - All configuration can be set based on environment variables. Syntax will then be `"process.env.<ENVIRONMENT>"` where `<ENVIRONMENT>` is the environment variable used. E.g. scimgateway.port could have value "process.env.PORT", then using environment variable PORT.
455
455
  - All configuration can be set based on corresponding JSON-content (dot notation) in external file using plugin name as parent JSON object. Syntax will then be `"process.file.<path>"` where `<path>` is the file used. E.g. endpoint.password could have value "process.file./var/run/vault/secrets.json"
456
- - Indivudual Secrets can be contained in plain text files. Syntax will then be `"process.text.<path>"` where `<path>` is the file which contains raw (`UTF-8`) character value. E.g. endpoint.password could have value "process.text./var/run/vault/endpoint.password". This enables that the config file itself be loaded from a ConfigMap while specific values are mounted either from `secrets.json` style files as mentioned above OR from traditional secrets files mounted in the file system, one value per file.
456
+ - Also, individual secret file may be used for a plain text secret per file. Syntax will then be `"process.text.<path>"` where `<path>` is the file which contains raw (`UTF-8`) character value. E.g. endpoint.password could have value "process.text./var/run/vault/endpoint.password". This enables that the config file itself be loaded from a ConfigMap while specific values are mounted either from `secrets.json` style files as mentioned above OR from traditional secrets files mounted in the file system, one value per file.
457
457
 
458
458
  Example:
459
459
 
@@ -498,62 +498,7 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
498
498
  "plugin-soap.endpoint.password": "secret"
499
499
  }
500
500
 
501
- - Custom schema attributes can be added by plugin configuration `scim.customSchema` having value set to filename of a JSON schema-file located in `<package-root>/config/schemas` e.g:
502
-
503
- "scim": {
504
- "version": "2.0",
505
- "customSchema": "plugin-soap-schema.json"
506
- },
507
-
508
- JSON file have following syntax:
509
-
510
- [
511
- {
512
- "name": "User",
513
- "attributes": [...]
514
- },
515
- {
516
- "name": "Group",
517
- "attributes": [...]
518
- }
519
- ]
520
-
521
- Where array `attributes` contains custom attribute objects according to SCIM 1.1 or 2.0 spesification e.g:
522
-
523
- "attributes": [
524
- {
525
- "name": "musicPreference",
526
- "type": "string",
527
- "multiValued": false,
528
- "description": "Music Preferences",
529
- "readOnly": false,
530
- "required": false,
531
- "caseExact": false
532
- },
533
- {
534
- "name": "populations",
535
- "type": "complex",
536
- "multiValued": true,
537
- "multiValuedAttributeChildName": "population",
538
- "description": "Population array",
539
- "readOnly": false,
540
- "required": false,
541
- "caseExact": false,
542
- "subAttributes": [
543
- {
544
- "name": "value",
545
- "type": "string",
546
- "multiValued": false,
547
- "description": "Population value",
548
- "readOnly": false,
549
- "required": true,
550
- "caseExact": false
551
- }
552
- ]
553
- }
554
- ]
555
-
556
- Note, custom schema attributes will be merged into core:1.0/2.0 schema, and names must not conflict with standard SCIM attribute names.
501
+ - Custom Schemas, ServiceProviderConfig and ResourceType will be used if `lib/scimdef-v2.js or scimdef-v1.js` exists. Original scimdef-v2.js/scimdef-v1.js can be copied from node_modules/scimgateway/lib to your plugin/lib and customized.
557
502
 
558
503
 
559
504
  ## Manual startup
@@ -745,7 +690,7 @@ Some notes related to Entra ID:
745
690
 
746
691
  ## CA Identity Manager as IdP using SCIM Gateway
747
692
 
748
- Using Symantec/Broadcom/CA Identity Manger, plugin configuration file must include **SCIM Version "1.1"** (scimgateway.scim.version).
693
+ Using Symantec/Broadcom/CA Identity Manger, plugin configuration might have to use **SCIM Version "1.1"** (scimgateway.scim.version).
749
694
 
750
695
  In the Provisioning Manager we have to use
751
696
 
@@ -1199,6 +1144,21 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1199
1144
 
1200
1145
  ## Change log
1201
1146
 
1147
+ ### v4.4.3
1148
+
1149
+ [Added]
1150
+
1151
+ - Dependencies bump
1152
+
1153
+ ### v4.4.2
1154
+
1155
+ [Added]
1156
+
1157
+ - scim-stream subscriber configuration have been changed:
1158
+ old: `"convertRolesToGroups": false`
1159
+ new: `"skipConvertRolesToGroups": false`
1160
+ This means convert roles to groups is default behavior unless skipConvertRolesToGroups=true
1161
+
1202
1162
  ### v4.4.1
1203
1163
 
1204
1164
  [Added]
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -109,7 +109,7 @@
109
109
  "secret": null
110
110
  },
111
111
  "deleteUserOnLastGroupRoleRemoval": false,
112
- "convertRolesToGroups": false,
112
+ "skipConvertRolesToGroups": false,
113
113
  "generateUserPassword": false,
114
114
  "modifyOnly": false,
115
115
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -116,7 +116,7 @@
116
116
  "secret": null
117
117
  },
118
118
  "deleteUserOnLastGroupRoleRemoval": false,
119
- "convertRolesToGroups": false,
119
+ "skipConvertRolesToGroups": false,
120
120
  "generateUserPassword": false,
121
121
  "modifyOnly": false,
122
122
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -10,4 +10,4 @@
10
10
  // for details see: https://elshaug.xyz/docs/scim-stream
11
11
  //
12
12
  // ================================================================
13
- 'use strict';const a0_0x2b18c7=a0_0x485a;(function(_0x2cad0c,_0x1253e6){const _0x297f57=a0_0x485a,_0x4e5f53=_0x2cad0c();while(!![]){try{const _0x2b7bff=-parseInt(_0x297f57(0x1fa))/0x1*(parseInt(_0x297f57(0x1a0))/0x2)+-parseInt(_0x297f57(0x1e5))/0x3+parseInt(_0x297f57(0x218))/0x4*(parseInt(_0x297f57(0x1ba))/0x5)+parseInt(_0x297f57(0x20b))/0x6*(-parseInt(_0x297f57(0x20e))/0x7)+-parseInt(_0x297f57(0x1e0))/0x8+-parseInt(_0x297f57(0x21a))/0x9*(-parseInt(_0x297f57(0x201))/0xa)+parseInt(_0x297f57(0x234))/0xb;if(_0x2b7bff===_0x1253e6)break;else _0x4e5f53['push'](_0x4e5f53['shift']());}catch(_0x7dfb68){_0x4e5f53['push'](_0x4e5f53['shift']());}}}(a0_0x3831,0x9362f));function a0_0x485a(_0x1421bf,_0x20f3d6){const _0x3831c4=a0_0x3831();return a0_0x485a=function(_0x485a10,_0x15f8d4){_0x485a10=_0x485a10-0x180;let _0x42de61=_0x3831c4[_0x485a10];return _0x42de61;},a0_0x485a(_0x1421bf,_0x20f3d6);}function a0_0x3831(){const _0x201a67=['password','configDir','readFileSync','Error','getuniquevalue','\x20message:\x20user\x20does\x20not\x20exist','level','decode','delete','\x20roles\x20converted\x20to\x20groups\x20message:\x20','subscribe','Disconnect','AckPolicy','headers','isArray','waitOnFirstConnect','description','maxPingOut','data','value',']\x20connected\x20','connect','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','getServer','pingInterval','Reconnecting','maxReconnectAttempts','\x20Delete\x20User\x20id=','\x20should\x20have\x20syntax:\x20<collector>.<channel>','\x20convertedScim20\x20error:\x20','Msg-Id','replace','toLowerCase','drain','\x20missing\x20user\x20object\x20in\x20message:\x20','User','consumerInfo','roles',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','join','substring','1003396hqFtib','getUsers()\x20getObj=',']\x20subscriber[','existsSync','subject','length','activityOperation','userName','write','getGroups','fsExistsSync','authenticator','trim','ConsumerNotFound','\x20Create\x20userName=','replaceAll','StringCodec',']\x20error:\x20subject\x20','modifyUser','\x20error:\x20missing\x20result','deleteUser','Resources','string','true','createWriteStream','filter_subject','5bECcui','\x20done','doIncrement',']\x20subscriber\x20error:\x20missing\x20certificate\x20configuration','Operations','startsWith','display','\x20-\x20','transports',']\x20handling\x20\x22',']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20','Errors','originalUrl',']\x20closed\x20with\x20error:\x20','\x20createUser()\x20obj=','jetstream','push',']\x20client\x20disconnected\x20','hasOwnProperty','add','lowercase','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false','utf8','operation','active','certificate','prototype','config','consumers','\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration','\x20Delete\x20User\x20userName=','approles_','\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}','convertedScim20','mkdirSync',']\x20subscriber\x20certificate\x20error:\x20','body','SCIM\x20Stream\x20-\x20Autogenerated','8528152vcNqUV','onCreate','debug','New','pluginName','2972889qzDvCr','consume','../lib/utils','Events','SIGTERM','\x20message\x20json\x20parsing\x20error:\x20','typeId',']\x20error:\x20','close','durable_','get','\x20count=','toUpperCase','getAppRoles','crypto','\x20handling\x20message:\x20','baseUrls',']\x20approle\x20uuid\x20file\x20created:\x20','message','status','approles','1VKNZdL',']\x20client\x20consumer\x20error:\x20','set','ConsumerEvents','\x20Create\x20User\x20userName=','request','normalize','1215310qpusXu','then','\x20error:\x20missing\x20id}','type','split',']\x20connect\x20error:\x20','displayName','logger','replaceDomains','update','95838hWwfEp',']\x20client\x20has\x20a\x20stale\x20connection\x20','\x20Replace\x20User\x20id=','91ddtLAo',']\x20subscriber\x20stopped\x20error:\x20','stringify','\x20error:\x20','increment','detail','Explicit','copyObj','params','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available','3071256mPrlbu','parse','18RythPR','Reconnect','toString','path','info','SIGINT','forEach','groups','ack','gwName','createRandomPassword','createUser','firstn','exports','from','\x20result=','jwtAuthenticator',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','jwt','tenant','utf-8','DebugEvents','generateUserPassword','nats','modifyOnly','unsubscribe','25950628vrgSNu','\x20getUserId()\x20error:\x20','fold-to-ascii','error','foldReplacing','\x20(count=','\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true','queueGroup','Application','includes','closed','secret','reconnect','indexOf','tls','_info'];a0_0x3831=function(){return _0x201a67;};return a0_0x3831();}const nats=require('nats'),ascii127=require(a0_0x2b18c7(0x236)),fs=require('fs'),utils=require(a0_0x2b18c7(0x1e7)),path=require(a0_0x2b18c7(0x21d)),crypto=require(a0_0x2b18c7(0x1f3));module[a0_0x2b18c7(0x227)]['Subscriber']=function(_0x4fd2f0,_0x27c986,_0x5f2569,_0x5675f0){const _0x11841c=a0_0x2b18c7,_0x270119=_0x4fd2f0,_0x179084=_0x27c986,_0x5c87b4=_0x5f2569,_0x4f1028=_0x5675f0;if(!_0x179084[_0x11841c(0x1d3)]||!_0x179084[_0x11841c(0x1d3)]['ca']){_0x270119[_0x11841c(0x208)][_0x11841c(0x237)](_0x270119[_0x11841c(0x223)]+'['+_0x270119[_0x11841c(0x1e4)]+_0x11841c(0x1bd));return;}if(!_0x179084['usePutSoftSync']){_0x270119[_0x11841c(0x208)][_0x11841c(0x237)](_0x270119[_0x11841c(0x223)]+'['+_0x270119[_0x11841c(0x1e4)]+']\x20subscriber\x20error:\x20configuration\x20scim.usePutSoftSync\x20must\x20be\x20set\x20to\x20true');return;}let _0x291f12='';for(let _0x39b89f=0x0;_0x39b89f<_0x270119[_0x11841c(0x208)][_0x11841c(0x1c2)]['length'];_0x39b89f++){if(_0x270119[_0x11841c(0x208)][_0x11841c(0x1c2)][_0x39b89f]['name']==='file'){_0x291f12=_0x270119[_0x11841c(0x208)][_0x11841c(0x1c2)][_0x39b89f][_0x11841c(0x24a)];break;}}const _0x24597f=''+(_0x291f12===_0x11841c(0x1e2)?'\x0a':''),_0x212b3b={};try{_0x212b3b['ca']=[fs[_0x11841c(0x246)](_0x270119[_0x11841c(0x245)]+'/certs/'+_0x179084[_0x11841c(0x1d3)]['ca'])];}catch(_0x15bcd0){_0x270119[_0x11841c(0x208)]['error'](_0x270119[_0x11841c(0x223)]+'['+_0x270119[_0x11841c(0x1e4)]+_0x11841c(0x1dd)+_0x15bcd0[_0x11841c(0x1f7)]);return;}const _0x43687d={},_0x574f21=new TextEncoder()['encode'](_0x179084[_0x11841c(0x231)][_0x11841c(0x23f)]),_0x1abc7b=_0x179084[_0x11841c(0x231)][_0x11841c(0x22c)];_0x43687d[_0x11841c(0x1ab)]=nats[_0x11841c(0x22a)](_0x1abc7b,_0x574f21),_0x43687d['servers']=_0x179084[_0x11841c(0x1f5)],_0x43687d[_0x11841c(0x242)]=_0x212b3b,_0x43687d[_0x11841c(0x186)]=![],_0x43687d[_0x11841c(0x240)]=!![],_0x43687d['reconnectTimeWait']=0x3e8*0xa,_0x43687d[_0x11841c(0x191)]=-0x1,_0x43687d[_0x11841c(0x18f)]=0x2*0x3c*0x3e8,_0x43687d[_0x11841c(0x188)]=0x5,_0x43687d[_0x11841c(0x1e2)]=![];let _0x455a85;this[_0x11841c(0x18c)]=async()=>{const _0x2081ea=_0x11841c;try{_0x455a85=await nats['connect'](_0x43687d);}catch(_0x37d009){_0x270119[_0x2081ea(0x208)][_0x2081ea(0x237)](_0x270119['gwName']+'['+_0x270119[_0x2081ea(0x1e4)]+_0x2081ea(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x2081ea(0x206)+_0x37d009[_0x2081ea(0x1f7)]+_0x2081ea(0x1d7)),_0x43687d[_0x2081ea(0x186)]=!![];try{_0x455a85=await nats['connect'](_0x43687d);}catch(_0x2a8b5e){_0x270119[_0x2081ea(0x208)][_0x2081ea(0x237)](_0x270119[_0x2081ea(0x223)]+'['+_0x270119[_0x2081ea(0x1e4)]+_0x2081ea(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x2081ea(0x206)+_0x2a8b5e[_0x2081ea(0x1f7)]);return;}}_0x270119[_0x2081ea(0x208)][_0x2081ea(0x21e)](_0x270119[_0x2081ea(0x223)]+'['+_0x270119[_0x2081ea(0x1e4)]+_0x2081ea(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x2081ea(0x18b)+(_0x43687d[_0x2081ea(0x242)]['ca']?_0x2081ea(0x242):'')+'\x20'+_0x455a85[_0x2081ea(0x18e)]()),_0x455a85[_0x2081ea(0x23e)]()[_0x2081ea(0x202)](_0x53b501=>{const _0x672ca5=_0x2081ea;_0x53b501&&_0x270119['logger']['error'](_0x270119[_0x672ca5(0x223)]+'['+_0x270119['pluginName']+_0x672ca5(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x672ca5(0x1c7)+_0x53b501[_0x672ca5(0x1f7)]);});},this[_0x11841c(0x181)]=async()=>{const _0x2927e1=_0x11841c;if(!_0x4f1028||!_0x179084[_0x2927e1(0x1f5)]||!_0x179084[_0x2927e1(0x1d3)]||!_0x179084[_0x2927e1(0x1d3)]['ca']||!_0x179084[_0x2927e1(0x231)]||!_0x179084[_0x2927e1(0x231)][_0x2927e1(0x22d)]||!_0x179084[_0x2927e1(0x231)]['secret']||!_0x179084[_0x2927e1(0x231)][_0x2927e1(0x22c)]){_0x270119[_0x2927e1(0x208)][_0x2927e1(0x237)](_0x270119[_0x2927e1(0x223)]+'['+_0x270119['pluginName']+_0x2927e1(0x1a2)+_0x5c87b4+']['+_0x4f1028+']\x20error:\x20missing\x20one\x20or\x20more\x20mandatory\x20configurations\x20e.g.\x20stream.baseUrls,\x20stream.certificate.ca,\x20nats.tenant,\x20nats.subject,\x20nats.secret\x20and\x20nats.jwt');return;}if(_0x4f1028[_0x2927e1(0x205)]('.')[_0x2927e1(0x1a5)]<0x2){_0x270119[_0x2927e1(0x208)][_0x2927e1(0x237)](_0x270119[_0x2927e1(0x223)]+'['+_0x270119[_0x2927e1(0x1e4)]+_0x2927e1(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x2927e1(0x1b1)+_0x4f1028+_0x2927e1(0x193));return;}if(_0x4f1028['includes'](',')){_0x270119[_0x2927e1(0x208)][_0x2927e1(0x237)](_0x270119[_0x2927e1(0x223)]+'['+_0x270119[_0x2927e1(0x1e4)]+_0x2927e1(0x1a2)+_0x5c87b4+']['+_0x4f1028+']\x20error:\x20subject\x20not\x20allowing\x20comma\x20separated\x20multiples');return;}if(!_0x455a85){_0x270119[_0x2927e1(0x208)][_0x2927e1(0x237)](_0x270119[_0x2927e1(0x223)]+'['+_0x270119['pluginName']+_0x2927e1(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x2927e1(0x19d));return;}const _0x293d39=async(_0xe21f07,_0x5ac980)=>{const _0x147f04=_0x2927e1;try{_0x270119[_0x147f04(0x208)][_0x147f04(0x21e)](_0xe21f07+_0x147f04(0x1f4)+_0x5ac980);let _0x5bc74a;try{if(_0x179084[_0x147f04(0x209)]&&Array[_0x147f04(0x185)](_0x179084[_0x147f04(0x209)]))for(let _0x245965=0x0;_0x245965<_0x179084[_0x147f04(0x209)]['length'];_0x245965++){const _0x5bb326=_0x179084[_0x147f04(0x209)][_0x245965];if(!_0x5bb326['from']||!_0x5bb326[_0x147f04(0x228)]['includes']('.')||!_0x5bb326['to']||!_0x5bb326['to'][_0x147f04(0x23d)]('.'))continue;const _0x5c2518=new RegExp('@'+_0x5bb326[_0x147f04(0x228)]+'\x22','gi');_0x5ac980=_0x5ac980['replace'](_0x5c2518,'@'+_0x5bb326['to']+'\x22');}_0x5bc74a=JSON[_0x147f04(0x219)](_0x5ac980);}catch(_0x3cd727){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x1ea)+_0x3cd727['message']+'\x20message:\x20'+_0x5ac980),_0x270119['logger'][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}const _0x574d46=_0x5bc74a['user'];if(!_0x574d46){_0x270119['logger'][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x199)+JSON[_0x147f04(0x210)](_0x5bc74a)),_0x270119[_0x147f04(0x208)]['debug'](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}if(!_0x574d46[_0x147f04(0x1a7)]){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x18d)+JSON[_0x147f04(0x210)](_0x5bc74a)),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}delete _0x574d46['schemas'];let _0x18ea73;_0x574d46['id']&&(_0x18ea73=_0x574d46['id'],delete _0x574d46['id']);let _0xdf6232;_0x574d46[_0x147f04(0x1e1)]&&(_0xdf6232=utils[_0x147f04(0x215)](_0x574d46[_0x147f04(0x1e1)]),delete _0x574d46[_0x147f04(0x1e1)]);await _0x513d67(_0x574d46);const _0x542a8e=_0x574d46['userName'];let _0x2a4ebd,_0x26b857;try{_0x2a4ebd=await _0x140a47(_0x147f04(0x1a7),_0x542a8e);}catch(_0x507442){_0x270119[_0x147f04(0x208)]['error'](_0xe21f07+_0x147f04(0x235)+_0x507442[_0x147f04(0x1f7)]),_0x270119[_0x147f04(0x208)]['debug'](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}if(_0x179084['convertRolesToGroups']){let _0x823192=![];if(_0x5bc74a[_0x147f04(0x1be)]&&Array[_0x147f04(0x185)](_0x5bc74a[_0x147f04(0x1be)]))for(let _0x45c670=0x0;_0x45c670<_0x5bc74a['Operations']['length'];_0x45c670++){const _0x1fadb1=_0x5bc74a['Operations'][_0x45c670];_0x1fadb1[_0x147f04(0x21d)][_0x147f04(0x1bf)]('roles')&&(_0x1fadb1['path']=_0x147f04(0x221),Array[_0x147f04(0x185)](_0x1fadb1[_0x147f04(0x18a)])?(_0x1fadb1[_0x147f04(0x18a)][0x0]['id']=_0x1fadb1[_0x147f04(0x18a)][0x0][_0x147f04(0x18a)],_0x1fadb1['value'][0x0][_0x147f04(0x1c0)]=_0x1fadb1[_0x147f04(0x18a)][0x0][_0x147f04(0x204)]+_0x147f04(0x1c1)+_0x1fadb1['value'][0x0][_0x147f04(0x18a)],delete _0x1fadb1['value'][0x0]['value'],delete _0x1fadb1[_0x147f04(0x18a)][0x0][_0x147f04(0x204)]):_0x1fadb1['value']=[{'id':_0x1fadb1['value'],'display':_0x1fadb1['value']}],delete _0x1fadb1[_0x147f04(0x1eb)],_0x823192=!![]);}if(_0x574d46[_0x147f04(0x19c)]&&Array[_0x147f04(0x185)](_0x574d46[_0x147f04(0x19c)])&&_0x574d46[_0x147f04(0x19c)][_0x147f04(0x1a5)]>0x0){if(!_0x574d46['groups'])_0x574d46[_0x147f04(0x221)]=[];if(!Array[_0x147f04(0x185)](_0x574d46[_0x147f04(0x221)]))_0x574d46['groups']=[];for(let _0x580f59=0x0;_0x580f59<_0x574d46['roles'][_0x147f04(0x1a5)];_0x580f59++){const _0x4f2e22={},_0x47a1f8=_0x574d46[_0x147f04(0x19c)][_0x580f59];_0x4f2e22['value']=_0x47a1f8[_0x147f04(0x18a)],_0x4f2e22[_0x147f04(0x1c0)]=_0x47a1f8[_0x147f04(0x204)]+_0x147f04(0x1c1)+_0x47a1f8[_0x147f04(0x1c0)],_0x574d46[_0x147f04(0x221)][_0x147f04(0x1ca)](_0x4f2e22);}delete _0x574d46['roles'],_0x823192=!![];}if(_0x823192)_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x180)+JSON[_0x147f04(0x210)](_0x5bc74a));}if(_0x179084['deleteUserOnLastGroupRoleRemoval']&&_0x5bc74a['activityOperation']===_0x147f04(0x1b2)){if(_0x574d46[_0x147f04(0x221)]&&Array[_0x147f04(0x185)](_0x574d46[_0x147f04(0x221)])&&_0x574d46['groups']['length']===0x0){if(_0x574d46['roles']&&Array[_0x147f04(0x185)](_0x574d46['roles'])&&_0x574d46[_0x147f04(0x19c)]['length']===0x0){if(_0x5bc74a[_0x147f04(0x1be)]&&Array['isArray'](_0x5bc74a[_0x147f04(0x1be)])&&_0x5bc74a['Operations'][_0x147f04(0x1a5)]>0x0)for(let _0x130f59=0x0;_0x130f59<_0x5bc74a[_0x147f04(0x1be)][_0x147f04(0x1a5)];_0x130f59++){const _0x1169d6=_0x5bc74a[_0x147f04(0x1be)][_0x130f59];if(_0x1169d6['op']==='remove'){if(_0x1169d6[_0x147f04(0x21d)]){if(_0x1169d6[_0x147f04(0x21d)][_0x147f04(0x1bf)]('roles')&&_0x1169d6['typeId'])_0x5bc74a[_0x147f04(0x1a6)]=_0x147f04(0x1b4);else _0x1169d6[_0x147f04(0x21d)]==='groups'&&(_0x5bc74a[_0x147f04(0x1a6)]=_0x147f04(0x1b4));}}}}}}if(!_0x2a4ebd){if(_0x5bc74a['activityOperation']===_0x147f04(0x1b4)){_0x270119['logger'][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1d8)+_0x542a8e+_0x147f04(0x249)),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+'\x20done'+_0x24597f);return;}if(_0x179084['modifyOnly']&&_0x179084[_0x147f04(0x232)]===!![]){_0x270119[_0x147f04(0x208)]['debug'](_0xe21f07+'\x20Create\x20userName='+_0x542a8e+'\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true'),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+'\x20done'+_0x24597f);return;}if(Object[_0x147f04(0x1d4)][_0x147f04(0x1cc)]['call'](_0x574d46,'active')){if(typeof _0x574d46[_0x147f04(0x1d2)]===_0x147f04(0x1b6)){const _0x1b788f=_0x574d46[_0x147f04(0x1d2)][_0x147f04(0x197)]();if(_0x1b788f===_0x147f04(0x1b7))_0x574d46[_0x147f04(0x1d2)]=!![];else{if(_0x1b788f==='false')_0x574d46['active']=![];}}if(_0x574d46[_0x147f04(0x1d2)]===![]){_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1ae)+_0x542a8e+_0x147f04(0x1cf)),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}}_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1fe)+_0x542a8e);const _0x16f6ff=utils[_0x147f04(0x215)](_0x574d46);try{delete _0x16f6ff[_0x147f04(0x221)];!_0x16f6ff['password']&&_0x179084['generateUserPassword']&&_0x179084[_0x147f04(0x230)]===!![]&&(_0x16f6ff[_0x147f04(0x244)]=utils[_0x147f04(0x224)](0xf));if(_0xdf6232||_0x18ea73){if(_0xdf6232)for(const _0x49d686 in _0xdf6232){_0x16f6ff[_0x49d686]=_0xdf6232[_0x49d686];}if(_0x18ea73)_0x16f6ff['id']=_0x18ea73;await _0x513d67(_0x16f6ff);}await _0x270119[_0x147f04(0x225)](_0x5c87b4,_0x16f6ff),_0x574d46['groups']&&Array[_0x147f04(0x185)](_0x574d46['groups'])&&_0x574d46[_0x147f04(0x221)]['length']>0x0&&(_0x26b857=await _0x140a47(_0x147f04(0x1a7),_0x542a8e));}catch(_0x54880d){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x1c8)+JSON[_0x147f04(0x210)](_0x16f6ff)+_0x147f04(0x211)+_0x54880d['message']+'}'),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+'\x20done'+_0x24597f);return;}}if(_0x2a4ebd||_0x26b857){if(_0x5bc74a[_0x147f04(0x1a6)]===_0x147f04(0x1b4)){if(_0x179084['modifyOnly']&&_0x179084[_0x147f04(0x232)]===!![]){_0x270119[_0x147f04(0x208)]['debug'](_0xe21f07+'\x20Delete\x20User\x20id='+_0x2a4ebd+_0x147f04(0x23a)),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+'\x20Delete\x20User\x20id='+_0x2a4ebd);try{await _0x270119[_0x147f04(0x1b4)](_0x5c87b4,_0x2a4ebd);}catch(_0x11f6b7){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x192)+_0x2a4ebd+_0x147f04(0x211)+_0x11f6b7[_0x147f04(0x1f7)]+'}'),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}}else{if(_0x26b857)_0x2a4ebd=_0x26b857;_0x270119['logger']['debug'](_0xe21f07+'\x20Replace\x20User\x20id='+_0x2a4ebd);const _0x155353={};_0x155353[_0x147f04(0x1fc)]=()=>{},_0x155353[_0x147f04(0x1c6)]=_0x5c87b4?'/'+_0x5c87b4+'/Users/'+_0x2a4ebd:'/Users/'+_0x2a4ebd,_0x155353[_0x147f04(0x216)]={},_0x155353['params']['id']=_0x2a4ebd,_0x155353['request']={},_0x155353[_0x147f04(0x1ff)][_0x147f04(0x1de)]=_0x574d46;try{await _0x270119['replaceUsrGrp'](_0x155353);}catch(_0x441364){_0x270119['logger'][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x20d)+_0x2a4ebd+_0x147f04(0x211)+_0x441364[_0x147f04(0x1f7)]),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+_0x147f04(0x1bb)+_0x24597f);return;}if(_0x155353['status']&&_0x155353[_0x147f04(0x1f8)]!==0xc8){if(_0x155353[_0x147f04(0x1de)]){if(_0x155353[_0x147f04(0x1de)][_0x147f04(0x213)]){let _0x685ba=_0x155353[_0x147f04(0x1de)]['detail'];_0x685ba=_0x685ba['replace'](_0x270119[_0x147f04(0x223)]+'['+_0x270119[_0x147f04(0x1e4)]+']',''+_0xe21f07),_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](''+_0x685ba);}else{if(_0x155353['body'][_0x147f04(0x1c5)]&&Array[_0x147f04(0x185)](_0x155353[_0x147f04(0x1de)][_0x147f04(0x1c5)])&&_0x155353[_0x147f04(0x1de)][_0x147f04(0x1c5)][_0x147f04(0x1a5)]>0x0){let _0x3c6f28=_0x155353[_0x147f04(0x1de)][_0x147f04(0x1c5)][0x0][_0x147f04(0x187)];_0x3c6f28=_0x3c6f28[_0x147f04(0x196)](_0x270119[_0x147f04(0x223)]+'['+_0x270119[_0x147f04(0x1e4)]+']',''+_0xe21f07),_0x270119['logger'][_0x147f04(0x237)](''+_0x3c6f28);}}}}if(_0x179084['usePutSoftSync']){const [_0x270184,_0x1d7bc6]=_0x270119[_0x147f04(0x1db)]({'Operations':_0x5bc74a[_0x147f04(0x1be)]});if(_0x1d7bc6){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x20d)+_0x2a4ebd+_0x147f04(0x194)+_0x1d7bc6[_0x147f04(0x1f7)]),_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+'\x20done'+_0x24597f);return;}const _0x26e295=[];if(_0x270184['roles']&&Array[_0x147f04(0x185)](_0x270184[_0x147f04(0x19c)]))for(let _0x2e7106=0x0;_0x2e7106<_0x270184['roles'][_0x147f04(0x1a5)];_0x2e7106++){_0x270184[_0x147f04(0x19c)][_0x2e7106]['operation']&&_0x270184[_0x147f04(0x19c)][_0x2e7106]['operation']===_0x147f04(0x24c)&&_0x26e295[_0x147f04(0x1ca)](_0x270184['roles'][_0x2e7106]);}if(_0x26e295[_0x147f04(0x1a5)]>0x0)try{await _0x270119[_0x147f04(0x1b2)](_0x5c87b4,_0x2a4ebd,{'roles':_0x26e295});}catch(_0x2d1973){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x20d)+_0x2a4ebd+'\x20role\x20removal\x20error:\x20'+_0x2d1973[_0x147f04(0x1f7)]);}const _0x5aafd1=[];if(_0x270184[_0x147f04(0x221)]&&Array['isArray'](_0x270184[_0x147f04(0x221)]))for(let _0x1e3447=0x0;_0x1e3447<_0x270184['groups'][_0x147f04(0x1a5)];_0x1e3447++){_0x270184[_0x147f04(0x221)][_0x1e3447][_0x147f04(0x1d1)]&&_0x270184['groups'][_0x1e3447][_0x147f04(0x1d1)]===_0x147f04(0x24c)&&_0x5aafd1['push'](_0x270184['groups'][_0x1e3447]);}if(_0x5aafd1[_0x147f04(0x1a5)]>0x0)for(let _0x2f99fc=0x0;_0x2f99fc<_0x5aafd1[_0x147f04(0x1a5)];_0x2f99fc++){try{await _0x270119['modifyGroup'](_0x5c87b4,_0x5aafd1[_0x2f99fc]['id'],{'members':[{'operation':_0x147f04(0x24c),'value':_0x2a4ebd}]});}catch(_0x5a601c){_0x270119['logger'][_0x147f04(0x237)](_0xe21f07+_0x147f04(0x20d)+_0x2a4ebd+'\x20group\x20removal\x20error:\x20'+_0x5a601c[_0x147f04(0x1f7)]);}}}}}_0x270119[_0x147f04(0x208)][_0x147f04(0x1e2)](_0xe21f07+'\x20done'+_0x24597f);}catch(_0x18ab6d){_0x270119[_0x147f04(0x208)][_0x147f04(0x237)](_0x270119['gwName']+'['+_0x270119[_0x147f04(0x1e4)]+_0x147f04(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x147f04(0x1ec)+_0x18ab6d['message']+'\x20=>\x20subscriber\x20not\x20activated'+_0x24597f);}},_0x5269bc=nats[_0x2927e1(0x1b0)](),_0x43dcbc=_0x455a85[_0x2927e1(0x1c9)](),_0x2514a5=(_0x2927e1(0x1ee)+_0x270119['pluginName']+'_'+_0x5c87b4)['replaceAll']('*','#')[_0x2927e1(0x1af)]('>','##')[_0x2927e1(0x1af)]('.','_');let _0x54faee;const _0x3390f5=async()=>{const _0x4c9e3f=_0x2927e1;try{const _0x45e5e2=''+_0x179084[_0x4c9e3f(0x231)][_0x4c9e3f(0x22d)],_0x182983=await _0x455a85['jetstreamManager'](),_0x15db67=async()=>{const _0x29a41b=_0x4c9e3f;let _0x5d5dbe;try{_0x5d5dbe=await _0x43dcbc[_0x29a41b(0x1d6)][_0x29a41b(0x1ef)](_0x45e5e2,_0x2514a5);}catch(_0x48a505){await _0x182983[_0x29a41b(0x1d6)][_0x29a41b(0x1cd)](_0x45e5e2,{'durable_name':_0x2514a5,'ack_policy':nats[_0x29a41b(0x183)][_0x29a41b(0x214)],'deliver_policy':nats['DeliverPolicy'][_0x29a41b(0x1e3)],'deliver_group':_0x179084?.[_0x29a41b(0x231)]?.[_0x29a41b(0x23b)]||null,'filter_subject':_0x4f1028}),_0x5d5dbe=await _0x43dcbc['consumers'][_0x29a41b(0x1ef)](_0x45e5e2,_0x2514a5);}(_0x4f1028!==_0x5d5dbe?.[_0x29a41b(0x243)]?.[_0x29a41b(0x1d5)]?.[_0x29a41b(0x1b9)]||_0x179084?.['nats']?.[_0x29a41b(0x23b)]!==_0x5d5dbe?.[_0x29a41b(0x243)]?.[_0x29a41b(0x1d5)]?.['deliver_group'])&&(await _0x182983['consumers'][_0x29a41b(0x20a)](_0x45e5e2,_0x2514a5,{'deliver_group':_0x179084?.[_0x29a41b(0x231)]?.[_0x29a41b(0x23b)]||null,'filter_subject':_0x4f1028}),_0x5d5dbe=await _0x43dcbc[_0x29a41b(0x1d6)]['get'](_0x45e5e2,_0x2514a5)),_0x54faee=await _0x5d5dbe[_0x29a41b(0x1e6)]({'max_messages':0x64});};await _0x15db67();const _0x2ff8e4=async()=>{const _0x33d7f7=_0x4c9e3f;for await(const _0x2f240e of await _0x54faee[_0x33d7f7(0x1f8)]()){switch(_0x2f240e[_0x33d7f7(0x204)]){case nats[_0x33d7f7(0x1fd)][_0x33d7f7(0x1ad)]:if(_0x2f240e['data']===0x1)_0x270119['logger'][_0x33d7f7(0x21e)](_0x270119[_0x33d7f7(0x223)]+'['+_0x270119[_0x33d7f7(0x1e4)]+_0x33d7f7(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x33d7f7(0x1c4)+_0x2f240e[_0x33d7f7(0x204)]),_0x15db67();else _0x2f240e[_0x33d7f7(0x189)]%0xa===0x0&&_0x270119[_0x33d7f7(0x208)][_0x33d7f7(0x237)](_0x270119[_0x33d7f7(0x223)]+'['+_0x270119['pluginName']+_0x33d7f7(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x33d7f7(0x1fb)+_0x2f240e[_0x33d7f7(0x204)]+_0x33d7f7(0x1f0)+_0x2f240e[_0x33d7f7(0x189)]);break;}}};_0x2ff8e4();for await(const _0x3c1892 of _0x54faee){if(!_0x3c1892[_0x4c9e3f(0x184)]||!_0x3c1892[_0x4c9e3f(0x184)][_0x4c9e3f(0x1ef)](_0x4c9e3f(0x195))){_0x3c1892[_0x4c9e3f(0x222)]();continue;}const _0x447307=_0x270119[_0x4c9e3f(0x223)]+'['+_0x270119['pluginName']+_0x4c9e3f(0x1a2)+_0x5c87b4+']['+_0x3c1892[_0x4c9e3f(0x1a4)]+']['+_0x54faee['getProcessed']()+']['+(_0x3c1892[_0x4c9e3f(0x184)]?_0x3c1892[_0x4c9e3f(0x184)][_0x4c9e3f(0x1ef)](_0x4c9e3f(0x195)):'')+']',_0x45593d=_0x5269bc[_0x4c9e3f(0x24b)](_0x3c1892['data']);await _0x293d39(_0x447307,_0x45593d),_0x3c1892[_0x4c9e3f(0x222)]();}}catch(_0x29e7d4){_0x270119[_0x4c9e3f(0x208)]['error'](_0x270119[_0x4c9e3f(0x223)]+'['+_0x270119[_0x4c9e3f(0x1e4)]+_0x4c9e3f(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x4c9e3f(0x20f)+_0x29e7d4[_0x4c9e3f(0x1f7)]);}};_0x3390f5();const _0x20ee35=async()=>{const _0x4d3003=_0x2927e1;let _0x4df74b=0x0;for await(const _0x2e159b of _0x455a85[_0x4d3003(0x1f8)]()){switch(_0x2e159b[_0x4d3003(0x204)]){case nats[_0x4d3003(0x1e8)][_0x4d3003(0x182)]:_0x270119[_0x4d3003(0x208)][_0x4d3003(0x237)](_0x270119[_0x4d3003(0x223)]+'['+_0x270119[_0x4d3003(0x1e4)]+']\x20subscriber['+_0x5c87b4+']['+_0x4f1028+_0x4d3003(0x1cb)+_0x2e159b[_0x4d3003(0x189)]+_0x4d3003(0x217)),_0x4df74b=0x0;break;case nats[_0x4d3003(0x1e8)][_0x4d3003(0x21b)]:_0x270119[_0x4d3003(0x208)][_0x4d3003(0x21e)](_0x270119[_0x4d3003(0x223)]+'['+_0x270119[_0x4d3003(0x1e4)]+_0x4d3003(0x1a2)+_0x5c87b4+']['+_0x4f1028+']\x20client\x20reconnected\x20'+_0x2e159b[_0x4d3003(0x189)]);try{if(_0x54faee[_0x4d3003(0x19b)])await _0x54faee[_0x4d3003(0x19b)]();}catch(_0x310a44){if(_0x54faee[_0x4d3003(0x233)])_0x54faee[_0x4d3003(0x233)]();}break;case nats[_0x4d3003(0x1e8)][_0x4d3003(0x247)]:_0x270119[_0x4d3003(0x208)][_0x4d3003(0x237)](_0x270119['gwName']+'['+_0x270119[_0x4d3003(0x1e4)]+_0x4d3003(0x1a2)+_0x5c87b4+']['+_0x4f1028+']\x20client\x20error\x20'+_0x2e159b[_0x4d3003(0x189)]);break;case nats[_0x4d3003(0x22f)][_0x4d3003(0x190)]:_0x4df74b+=0x1;_0x4df74b%0x1e===0x0&&_0x270119[_0x4d3003(0x208)][_0x4d3003(0x1e2)](_0x270119[_0x4d3003(0x223)]+'['+_0x270119[_0x4d3003(0x1e4)]+']\x20subscriber['+_0x5c87b4+']['+_0x4f1028+_0x4d3003(0x22b)+_0x2e159b['data']+_0x4d3003(0x239)+_0x4df74b+')');break;case nats[_0x4d3003(0x22f)]['StaleConnection']:_0x270119[_0x4d3003(0x208)][_0x4d3003(0x1e2)](_0x270119['gwName']+'['+_0x270119[_0x4d3003(0x1e4)]+_0x4d3003(0x1a2)+_0x5c87b4+']['+_0x4f1028+_0x4d3003(0x20c)+_0x2e159b[_0x4d3003(0x189)]);break;}}};_0x20ee35(),process['on'](_0x2927e1(0x1e9),async()=>{const _0x4c96b4=_0x2927e1;_0x455a85&&await _0x455a85[_0x4c96b4(0x198)]();}),process['on'](_0x2927e1(0x21f),async()=>{const _0x16a9c5=_0x2927e1;_0x455a85&&await _0x455a85[_0x16a9c5(0x198)]();});};const _0x140a47=async(_0x43b9d0,_0x2adec8)=>{const _0x5df30d=_0x11841c,_0x1f39cb={'attribute':_0x43b9d0,'operator':'eq','value':_0x2adec8,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x88216f=[_0x43b9d0];if(_0x43b9d0!=='id')_0x88216f[_0x5df30d(0x1ca)]('id');try{const _0x392cba=await _0x270119['getUsers'](_0x5c87b4,_0x1f39cb,_0x88216f);if(!_0x392cba||!_0x392cba[_0x5df30d(0x1b5)]||!Array[_0x5df30d(0x185)](_0x392cba[_0x5df30d(0x1b5)]))throw new Error(_0x5df30d(0x1a1)+JSON[_0x5df30d(0x210)](_0x1f39cb)+_0x5df30d(0x1b3));if(_0x392cba['Resources']['length']===0x0)return null;else{if(_0x392cba[_0x5df30d(0x1b5)][_0x5df30d(0x1a5)]>0x2)throw new Error(_0x5df30d(0x1a1)+JSON[_0x5df30d(0x210)](_0x1f39cb)+_0x5df30d(0x1da));else{const _0x133e9d=_0x392cba[_0x5df30d(0x1b5)][0x0];if(!_0x133e9d['id'])throw new Error(_0x5df30d(0x1a1)+JSON[_0x5df30d(0x210)](_0x1f39cb)+_0x5df30d(0x229)+JSON[_0x5df30d(0x210)](_0x133e9d)+_0x5df30d(0x203));return decodeURIComponent(_0x133e9d['id']);}}}catch(_0x16c0d8){throw new Error('getUsers()\x20getObj='+JSON[_0x5df30d(0x210)](_0x1f39cb)+_0x5df30d(0x211)+_0x16c0d8['message']+'}');}},_0x3dc666=_0x1b9b0f=>{const _0x2be6b3=_0x11841c;if(!_0x1b9b0f||typeof _0x1b9b0f!==_0x2be6b3(0x1b6))return[null,null];_0x1b9b0f=_0x1b9b0f[_0x2be6b3(0x1ac)]();const _0x14ac72=_0x1b9b0f[_0x2be6b3(0x241)]('(');if(_0x14ac72<0x1)return[null,null];if(_0x1b9b0f[_0x2be6b3(0x19f)](_0x1b9b0f[_0x2be6b3(0x1a5)]-0x1)!==')')return[null,null];if(_0x2dc145(_0x1b9b0f,'(')!==_0x2dc145(_0x1b9b0f,')'))return[null,null];const _0x415daf=_0x1b9b0f[_0x2be6b3(0x19f)](0x0,_0x14ac72),_0x31fa6e=_0x1b9b0f[_0x2be6b3(0x19f)](_0x14ac72+0x1,_0x1b9b0f['length']-0x1);let _0x384111=[];const _0x2ca6e5=_0x31fa6e['split'](',');let _0x54a963='';for(let _0xd47ed9=0x0;_0xd47ed9<_0x2ca6e5[_0x2be6b3(0x1a5)];_0xd47ed9++){const _0x4c8670=_0x54a963?_0x54a963+','+_0x2ca6e5[_0xd47ed9]:_0x2ca6e5[_0xd47ed9],_0x431edf=_0x2dc145(_0x4c8670,'('),_0xf7eba=_0x2dc145(_0x4c8670,')');if(_0x431edf===_0xf7eba)_0x384111[_0x2be6b3(0x1ca)](_0x496c04(_0x4c8670,'\x22')),_0x54a963='';else{if(_0x54a963)_0x54a963+=','+_0x2ca6e5[_0xd47ed9];else _0x54a963+=_0x2ca6e5[_0xd47ed9];}}if(_0x384111[_0x2be6b3(0x1a5)]===0x0)_0x384111=null;return[_0x415daf,_0x384111];};function _0x2dc145(_0x1dbe35,_0x37381f){const _0x276db9=_0x11841c;let _0x596259=0x0;for(let _0x4cea34=0x0;_0x4cea34<_0x1dbe35[_0x276db9(0x1a5)];_0x4cea34++){_0x1dbe35['charAt'](_0x4cea34)===_0x37381f&&(_0x596259+=0x1);}return _0x596259;}const _0x496c04=(_0x288c5c,_0x12c3b5)=>{const _0x319a84=_0x11841c;if(typeof _0x288c5c!==_0x319a84(0x1b6)||typeof _0x12c3b5!==_0x319a84(0x1b6))return _0x288c5c;if(_0x288c5c[_0x319a84(0x1a5)]===0x1)return _0x288c5c;if(_0x12c3b5['length']!==0x1)return _0x288c5c;return _0x288c5c=_0x288c5c[_0x319a84(0x1ac)](),_0x288c5c[_0x319a84(0x19f)](0x0,0x1)===_0x12c3b5&&(_0x288c5c=_0x288c5c[_0x319a84(0x19f)](0x1)),_0x288c5c['substring'](_0x288c5c[_0x319a84(0x1a5)]-0x1)===_0x12c3b5&&(_0x288c5c=_0x288c5c['substring'](0x0,_0x288c5c[_0x319a84(0x1a5)]-0x1)),_0x288c5c;},_0x1769e8=async(_0x164954,_0x4f7ba7,_0x31d7da)=>{const _0x51f466=_0x11841c;if(!_0x164954||!_0x4f7ba7||!_0x31d7da)return null;const [_0x23dc63,_0x379b1b]=_0x3dc666(_0x31d7da);if(!_0x23dc63||!_0x379b1b){const _0x238335=_0x31d7da[_0x51f466(0x205)]('(');if(_0x238335[_0x51f466(0x1a5)]>0x1){const _0x528c7d=[_0x51f466(0x1ce),'uppercase',_0x51f466(0x226),'elementnumber',_0x51f466(0x19e),'replace',_0x51f466(0x200),_0x51f466(0x212),'getuniquevalue'],_0x5da65a=_0x238335[0x0]['toLowerCase']();if(_0x528c7d['includes'](_0x5da65a))return null;}return _0x31d7da;}for(let _0xde8306=0x0;_0xde8306<_0x379b1b[_0x51f466(0x1a5)];_0xde8306++){if(_0x379b1b[_0xde8306][_0x51f466(0x19f)](0x0,0x1)==='['){const _0x131d13=_0x379b1b[_0xde8306][_0x51f466(0x241)](']');if(_0x131d13<0x0)return null;const _0xa82ee2=_0x379b1b[_0xde8306][_0x51f466(0x19f)](0x1,_0x131d13),_0x4d80fc=_0xa82ee2[_0x51f466(0x205)]('.');let _0x3ff463;for(let _0x37933a=0x0;_0x37933a<_0x4d80fc[_0x51f466(0x1a5)];_0x37933a++){if(_0x37933a===0x0)_0x3ff463=_0x164954[_0x4d80fc[_0x37933a]];else{if(!_0x3ff463)return null;_0x3ff463=_0x3ff463[_0x4d80fc[_0x37933a]];}}if(!_0x3ff463)return null;_0x379b1b[_0xde8306]=_0x3ff463;}}for(let _0x5642ed=0x0;_0x5642ed<_0x379b1b[_0x51f466(0x1a5)];_0x5642ed++){const [_0x151f19]=_0x3dc666(_0x379b1b[_0x5642ed]);_0x151f19&&(_0x379b1b[_0x5642ed]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x379b1b[_0x5642ed]));}if(_0x379b1b[0x0]===null)return null;switch(_0x23dc63[_0x51f466(0x197)]()){case'lowercase':{if(_0x379b1b[_0x51f466(0x1a5)]!==0x1)return null;const [_0x2b0c42]=_0x3dc666(_0x379b1b[0x0]);if(_0x2b0c42)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x2b0c42);if(_0x379b1b[0x0]===null)return null;return _0x379b1b[0x0][_0x51f466(0x197)]();}case'uppercase':{if(_0x379b1b['length']!==0x1)return null;const [_0x12ce82]=_0x3dc666(_0x379b1b[0x0]);if(_0x12ce82)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x12ce82);if(_0x379b1b[0x0]===null)return null;return _0x379b1b[0x0][_0x51f466(0x1f1)]();}case _0x51f466(0x226):{if(_0x379b1b[_0x51f466(0x1a5)]!==0x2)return null;const [_0x106c94]=_0x3dc666(_0x379b1b[0x0]);if(_0x106c94)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x106c94);if(_0x379b1b[0x0]===null)return null;if(isNaN(_0x379b1b[0x1]))return null;return _0x379b1b[0x0][_0x51f466(0x19f)](0x0,_0x379b1b[0x1]);}case'elementnumber':{const [_0x8e99ec]=_0x3dc666(_0x379b1b[0x0]);if(_0x379b1b[_0x51f466(0x1a5)]<0x2)return null;if(_0x8e99ec)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x8e99ec);if(_0x379b1b[0x0]===null)return null;const _0x46e453=_0x379b1b[0x1];if(isNaN(_0x46e453))return null;let _0x1accea;if(_0x379b1b[_0x51f466(0x1a5)]===0x3)_0x1accea=_0x379b1b[0x0]['split'](_0x379b1b[0x2]);else _0x1accea=_0x1accea=_0x379b1b[0x0][_0x51f466(0x205)]('\x20');if(_0x46e453<=_0x1accea[_0x51f466(0x1a5)])return _0x1accea[_0x46e453-0x1];else return'';}case _0x51f466(0x196):{const [_0x158479]=_0x3dc666(_0x379b1b[0x0]);if(_0x158479)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x158479);if(_0x379b1b[0x0]===null)return null;if(_0x379b1b['length']!==0x3)return null;return _0x379b1b[0x0][_0x51f466(0x1af)](_0x379b1b[0x1],_0x379b1b[0x2]);}case _0x51f466(0x200):{if(_0x379b1b['length']!==0x1)return null;const [_0x167062]=_0x3dc666(_0x379b1b[0x0]);if(_0x167062)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x167062);if(_0x379b1b[0x0]===null)return null;return ascii127[_0x51f466(0x238)](_0x379b1b[0x0]);}case'join':{let _0x3c79f3='';for(let _0x5687b7=0x0;_0x5687b7<_0x379b1b[_0x51f466(0x1a5)];_0x5687b7++){const [_0x9aaeb]=_0x3dc666(_0x379b1b[_0x5687b7]);if(_0x9aaeb)_0x379b1b[_0x5687b7]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x9aaeb);if(_0x379b1b[_0x5687b7]===null)return null;_0x3c79f3+=_0x379b1b[_0x5687b7];}return _0x3c79f3;}case _0x51f466(0x212):{if(_0x379b1b[_0x51f466(0x1a5)]>0x2)return null;const [_0x496a66]=_0x3dc666(_0x379b1b[0x0]);if(_0x496a66)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x496a66);if(_0x379b1b[0x0]===null)return null;const _0xf347f4=parseInt(_0x379b1b[0x0]);if(isNaN(_0xf347f4))return null;let _0x2cfcb5='##doIncrement';_0x2cfcb5+=','+_0x379b1b[0x0];if(_0x379b1b[_0x51f466(0x1a5)]===0x2&&_0x379b1b[0x1][_0x51f466(0x197)]()===_0x51f466(0x1b7))_0x2cfcb5+=',true';else _0x2cfcb5+=',false';return _0x2cfcb5+='##',_0x2cfcb5;}case _0x51f466(0x248):{if(_0x379b1b[_0x51f466(0x1a5)]!==0x1)return null;const [_0x216ebd]=_0x3dc666(_0x379b1b[0x0]);if(_0x216ebd)_0x379b1b[0x0]=await _0x1769e8(_0x164954,_0x4f7ba7,_0x216ebd);if(_0x379b1b[0x0]===null)return null;let _0x5766ee,_0xf19c74=![],_0x215a87='';const _0x3fb752=_0x379b1b[0x0][_0x51f466(0x205)]('##');if(_0x3fb752[_0x51f466(0x1a5)]>0x2)for(let _0x3f7fe8=0x0;_0x3f7fe8<_0x3fb752[_0x51f466(0x1a5)];_0x3f7fe8++){if(_0x3fb752[_0x3f7fe8][_0x51f466(0x1bf)](_0x51f466(0x1bc))){const _0x3af7dd=_0x3fb752[_0x3f7fe8][_0x51f466(0x205)](',');if(_0x3af7dd[_0x51f466(0x1a5)]<0x2)return null;const _0x335ea6=parseInt(_0x3af7dd[0x1]);if(isNaN(_0x335ea6))return null;_0x215a87='##'+_0x3fb752[_0x3f7fe8]+'##',_0x5766ee=_0x3af7dd[0x1],_0x3af7dd[_0x51f466(0x1a5)]>0x2&&(_0xf19c74=_0x3af7dd[0x2][_0x51f466(0x197)]()===_0x51f466(0x1b7));}}let _0x9a4a95,_0x5cf87e=0x0,_0x192ce8=0x0;if(_0x5766ee){_0x192ce8=_0x5766ee['length'],_0x5cf87e=0xa;for(let _0x2aaafd=0x1;_0x2aaafd<_0x192ce8;_0x2aaafd++){_0x5cf87e*=0xa;}_0x5cf87e-=0x1,_0x9a4a95=parseInt(_0x5766ee);if(isNaN(_0x9a4a95))return null;_0x9a4a95-=0x1;}else _0x9a4a95=0x0;do{_0x9a4a95+=0x1;let _0x54b5ec=_0x379b1b[0x0];if(_0x5766ee!==undefined&&_0x215a87){let _0x1ce28d=_0x9a4a95[_0x51f466(0x21c)]();while(_0x1ce28d['length']<_0x192ce8){_0x1ce28d='0'+_0x1ce28d;}_0xf19c74?_0x54b5ec=_0x54b5ec[_0x51f466(0x196)](_0x215a87,_0x1ce28d):(_0x54b5ec=_0x54b5ec[_0x51f466(0x196)](_0x215a87,''),_0xf19c74=!![],_0x9a4a95-=0x1);}try{const _0x1254da=await _0x140a47(_0x4f7ba7,_0x54b5ec);if(!_0x1254da)return _0x54b5ec;}catch(_0x245a0b){return _0x270119[_0x51f466(0x208)][_0x51f466(0x237)](_0x270119[_0x51f466(0x223)]+'['+_0x270119[_0x51f466(0x1e4)]+']\x20'+_0x23dc63+_0x51f466(0x235)+_0x245a0b[_0x51f466(0x1f7)]),null;}}while(_0x9a4a95<_0x5cf87e);return null;}default:}return null;},_0x513d67=async _0x5ca414=>{const _0xb822c2=_0x11841c;for(const _0x3ce37c in _0x5ca414){const _0x39d781=_0x5ca414[_0x3ce37c],[_0x3fb779,_0x366843]=_0x3dc666(_0x39d781);if(_0x3fb779){const _0x584059=''+_0x3ce37c,_0x180a68=_0x3fb779+'('+_0x366843[_0xb822c2(0x19e)](',')+')',_0x37f905=await _0x1769e8(_0x5ca414,_0x584059,_0x180a68);if(_0x37f905===null)delete _0x5ca414[_0x3ce37c];else _0x5ca414[_0x3ce37c]=_0x37f905;}for(const _0x12604f in _0x39d781){const _0x4c0a9c=_0x39d781[_0x12604f],[_0x1e85d1,_0x471518]=_0x3dc666(_0x4c0a9c);if(_0x1e85d1){const _0x2e2f91=_0x3ce37c+'.'+_0x12604f,_0x1d6808=_0x1e85d1+'('+_0x471518[_0xb822c2(0x19e)](',')+')',_0x5a9dec=await _0x1769e8(_0x5ca414,_0x2e2f91,_0x1d6808);if(_0x5a9dec===null)delete _0x39d781[_0x12604f];else _0x39d781[_0x12604f]=_0x5a9dec;}}}return _0x5ca414;};},module[a0_0x2b18c7(0x227)][a0_0x2b18c7(0x1f2)]=async(_0x428e7e,_0x2258be,_0x1f978f,_0x73189b)=>{const _0x229578=a0_0x2b18c7,_0x1bbdec=_0x229578(0x1f2),_0x4ec794=_0x428e7e;_0x4ec794[_0x229578(0x208)][_0x229578(0x1e2)](_0x4ec794[_0x229578(0x223)]+'['+_0x4ec794[_0x229578(0x1e4)]+_0x229578(0x1c3)+_0x1bbdec+'\x22');try{if(!fs[_0x229578(0x1a3)](_0x4ec794[_0x229578(0x245)]+'/approles'))fs[_0x229578(0x1dc)](_0x4ec794[_0x229578(0x245)]+'/approles');}catch(_0x59b984){}const _0x27d13c=path['join'](''+_0x4ec794[_0x229578(0x245)],_0x229578(0x1f9),_0x229578(0x1d9)+_0x4ec794[_0x229578(0x1e4)]+'_autogenerated.cfg'),_0x5c1ed4={};utils[_0x229578(0x1aa)](_0x27d13c)&&fs[_0x229578(0x246)](_0x27d13c,_0x229578(0x22e))[_0x229578(0x205)](/\r?\n/)[_0x229578(0x220)](_0x3a5724=>{const _0x46a032=_0x229578,_0x3a03c4=_0x3a5724[_0x46a032(0x205)]('\x20');_0x3a03c4[_0x46a032(0x1a5)]===0x2&&(_0x5c1ed4[_0x3a03c4[0x0]]=_0x3a03c4[0x1]);});const _0x5bda79=fs[_0x229578(0x1b8)](_0x27d13c,{'flags':'w','encoding':_0x229578(0x1d0),'mode':0x1b6,'autoClose':!![]}),_0x4e1daf=[],_0x3967b0=await _0x4ec794[_0x229578(0x1a9)](_0x2258be,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x229578(0x207)]);return _0x3967b0[_0x229578(0x1b5)][_0x229578(0x220)](_0x2193fb=>{const _0x25b375=_0x229578;if(_0x2193fb['id']){let _0x1619a0=crypto['randomUUID']();if(_0x5c1ed4[_0x2193fb['id']])_0x1619a0=_0x5c1ed4[_0x2193fb['id']];const _0x366137={'allowedMemberTypes':[_0x25b375(0x19a)],'description':_0x25b375(0x1df),'displayName':_0x2193fb[_0x25b375(0x207)]||_0x2193fb['id'],'id':_0x1619a0,'isEnabled':!![],'lang':null,'origin':_0x25b375(0x23c),'value':decodeURIComponent(_0x2193fb['id'])};_0x4e1daf[_0x25b375(0x1ca)](_0x366137),_0x5bda79[_0x25b375(0x1a8)](_0x2193fb['id']+'\x20'+_0x1619a0+'\x0a');}}),_0x5bda79[_0x229578(0x1ed)](),_0x4ec794[_0x229578(0x208)][_0x229578(0x1e2)](_0x4ec794[_0x229578(0x223)]+'['+_0x4ec794[_0x229578(0x1e4)]+_0x229578(0x1f6)+_0x27d13c),{'Resources':[{'appRoles':_0x4e1daf}]};};
13
+ 'use strict';const a0_0x20b93f=a0_0xd87a;(function(_0x2c966a,_0x15f3d8){const _0x12dfc3=a0_0xd87a,_0x587b2f=_0x2c966a();while(!![]){try{const _0x3fb573=parseInt(_0x12dfc3(0x1eb))/0x1*(-parseInt(_0x12dfc3(0x241))/0x2)+parseInt(_0x12dfc3(0x223))/0x3+-parseInt(_0x12dfc3(0x212))/0x4+parseInt(_0x12dfc3(0x1ef))/0x5+parseInt(_0x12dfc3(0x1d7))/0x6+-parseInt(_0x12dfc3(0x249))/0x7*(parseInt(_0x12dfc3(0x1d5))/0x8)+-parseInt(_0x12dfc3(0x296))/0x9;if(_0x3fb573===_0x15f3d8)break;else _0x587b2f['push'](_0x587b2f['shift']());}catch(_0x20fc51){_0x587b2f['push'](_0x587b2f['shift']());}}}(a0_0x3168,0xeb320));function a0_0x3168(){const _0x522ced=['subscribe','6178968ncQJwa','\x20Delete\x20User\x20userName=','filter_subject','\x20Create\x20User\x20userName=','\x20error:\x20missing\x20result','error','info','onCreate','trim','\x20message:\x20','jwtAuthenticator','ConsumerNotFound','pluginName','displayName','getServer','toLowerCase','mkdirSync',',true','delete','startsWith','1553TASALv','\x20message\x20json\x20parsing\x20error:\x20','prototype','convertedScim20','5909495FqtYSN',',false','active',']\x20subscriber[','authenticator',']\x20handling\x20\x22',']\x20closed\x20with\x20error:\x20','getUsers','substring','getUsers()\x20getObj=','\x20Replace\x20User\x20id=','\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}','from','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','tls',']\x20connect\x20error:\x20','indexOf','false',']\x20client\x20has\x20a\x20stale\x20connection\x20','SIGINT','parse',']\x20subscriber\x20error:\x20missing\x20certificate\x20configuration','crypto','path','\x20message:\x20user\x20does\x20not\x20exist','uppercase','nats',']\x20client\x20disconnected\x20','randomUUID','consume','encode','durable_','join','\x20group\x20removal\x20error:\x20','set','336084jNhsdi','secret','level','replaceAll','connect','jwt','configDir',']\x20error:\x20subject\x20not\x20allowing\x20comma\x20separated\x20multiples','\x20role\x20removal\x20error:\x20','createWriteStream','Events','push','getuniquevalue','approles_','unsubscribe','baseUrls','closed','5567868osKgrD','modifyUser','message','then','/approles','\x20error:\x20missing\x20id}','replaceUsrGrp','certificate','Msg-Id','true','increment','\x20error:\x20','Operations','modifyGroup','subject','reconnectTimeWait','userName','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available','\x20count=','\x20Create\x20userName=','password','_info','generateUserPassword','value','replace','getGroups','deliver_group','request','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','\x20result=','654BjPcWY','display','##doIncrement',']\x20client\x20reconnected\x20','maxReconnectAttempts','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false',']\x20error:\x20missing\x20one\x20or\x20more\x20mandatory\x20configurations\x20e.g.\x20stream.baseUrls,\x20stream.certificate.ca,\x20nats.tenant,\x20nats.subject,\x20nats.secret\x20and\x20nats.jwt','\x20should\x20have\x20syntax:\x20<collector>.<channel>','7wRAXbW','gwName','createRandomPassword',']\x20error:\x20','\x20Delete\x20User\x20id=','getProcessed',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','\x20convertedScim20\x20error:\x20',']\x20client\x20error\x20','replaceDomains','Resources','utf8','deleteUser','transports','consumers','\x20handling\x20message:\x20',']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20','config','remove','tenant','approles','description',']\x20subscriber\x20error:\x20configuration\x20scim.usePutSoftSync\x20must\x20be\x20set\x20to\x20true','foldReplacing','lowercase','\x20missing\x20user\x20object\x20in\x20message:\x20','detail','length','firstn','body','isArray',']\x20client\x20consumer\x20error:\x20','usePutSoftSync','pingInterval','fold-to-ascii','consumerInfo','ack','Application','activityOperation','../lib/utils','params','groups','Reconnecting','normalize','name','roles','\x20done','string',']\x20connected\x20','split','fsExistsSync','includes','\x20roles\x20converted\x20to\x20groups\x20message:\x20','\x20getUserId()\x20error:\x20','debug','status','typeId','data','update','createUser','New','Explicit','headers','Error','logger','add','\x20-\x20','StringCodec','queueGroup','toUpperCase',']\x20subscriber\x20certificate\x20error:\x20','exports','charAt','get','hasOwnProperty','Errors',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','13499397BWyXDI','operation','modifyOnly','servers','forEach','Disconnect','doIncrement','User','readFileSync','skipConvertRolesToGroups','type','stringify','waitOnFirstConnect','getAppRoles','write','8100304YXqbQL'];a0_0x3168=function(){return _0x522ced;};return a0_0x3168();}const nats=require(a0_0x20b93f(0x209)),ascii127=require(a0_0x20b93f(0x26b)),fs=require('fs'),utils=require(a0_0x20b93f(0x270)),path=require('path'),crypto=require(a0_0x20b93f(0x205));function a0_0xd87a(_0xde0db0,_0x4614f1){const _0x31689f=a0_0x3168();return a0_0xd87a=function(_0xd87ab8,_0x3be7cd){_0xd87ab8=_0xd87ab8-0x1c9;let _0x3e6d12=_0x31689f[_0xd87ab8];return _0x3e6d12;},a0_0xd87a(_0xde0db0,_0x4614f1);}module[a0_0x20b93f(0x290)]['Subscriber']=function(_0x491c9b,_0x53dbfe,_0x1ee34c,_0x13118a){const _0x461b07=a0_0x20b93f,_0x2d0b29=_0x491c9b,_0xc3dcd4=_0x53dbfe,_0x4a7335=_0x1ee34c,_0x5a7645=_0x13118a;if(!_0xc3dcd4['certificate']||!_0xc3dcd4[_0x461b07(0x22a)]['ca']){_0x2d0b29['logger'][_0x461b07(0x1dc)](_0x2d0b29[_0x461b07(0x24a)]+'['+_0x2d0b29[_0x461b07(0x1e3)]+_0x461b07(0x204));return;}if(!_0xc3dcd4[_0x461b07(0x269)]){_0x2d0b29[_0x461b07(0x289)][_0x461b07(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x461b07(0x1e3)]+_0x461b07(0x25f));return;}let _0x2758e0='';for(let _0x2cef03=0x0;_0x2cef03<_0x2d0b29[_0x461b07(0x289)]['transports'][_0x461b07(0x264)];_0x2cef03++){if(_0x2d0b29[_0x461b07(0x289)]['transports'][_0x2cef03][_0x461b07(0x275)]==='file'){_0x2758e0=_0x2d0b29[_0x461b07(0x289)][_0x461b07(0x256)][_0x2cef03][_0x461b07(0x214)];break;}}const _0x2d5297=''+(_0x2758e0===_0x461b07(0x27f)?'\x0a':''),_0x2af603={};try{_0x2af603['ca']=[fs[_0x461b07(0x1ce)](_0x2d0b29[_0x461b07(0x218)]+'/certs/'+_0xc3dcd4['certificate']['ca'])];}catch(_0x49bbd5){_0x2d0b29[_0x461b07(0x289)][_0x461b07(0x1dc)](_0x2d0b29[_0x461b07(0x24a)]+'['+_0x2d0b29[_0x461b07(0x1e3)]+_0x461b07(0x28f)+_0x49bbd5[_0x461b07(0x225)]);return;}const _0x504e71={},_0x50a8dd=new TextEncoder()[_0x461b07(0x20d)](_0xc3dcd4[_0x461b07(0x209)][_0x461b07(0x213)]),_0x138f91=_0xc3dcd4[_0x461b07(0x209)][_0x461b07(0x217)];_0x504e71[_0x461b07(0x1f3)]=nats[_0x461b07(0x1e1)](_0x138f91,_0x50a8dd),_0x504e71[_0x461b07(0x1c9)]=_0xc3dcd4['baseUrls'],_0x504e71[_0x461b07(0x1fd)]=_0x2af603,_0x504e71['waitOnFirstConnect']=![],_0x504e71['reconnect']=!![],_0x504e71[_0x461b07(0x232)]=0x3e8*0xa,_0x504e71[_0x461b07(0x245)]=-0x1,_0x504e71[_0x461b07(0x26a)]=0x2*0x3c*0x3e8,_0x504e71['maxPingOut']=0x5,_0x504e71[_0x461b07(0x27f)]=![];let _0x276714;this[_0x461b07(0x216)]=async()=>{const _0xf6e54c=_0x461b07;try{_0x276714=await nats['connect'](_0x504e71);}catch(_0x5a17e5){_0x2d0b29['logger']['error'](_0x2d0b29[_0xf6e54c(0x24a)]+'['+_0x2d0b29[_0xf6e54c(0x1e3)]+_0xf6e54c(0x1f2)+_0x4a7335+']['+_0x5a7645+_0xf6e54c(0x1fe)+_0x5a17e5[_0xf6e54c(0x225)]+'\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration'),_0x504e71[_0xf6e54c(0x1d2)]=!![];try{_0x276714=await nats['connect'](_0x504e71);}catch(_0x21c0fa){_0x2d0b29[_0xf6e54c(0x289)]['error'](_0x2d0b29[_0xf6e54c(0x24a)]+'['+_0x2d0b29[_0xf6e54c(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+']\x20connect\x20error:\x20'+_0x21c0fa[_0xf6e54c(0x225)]);return;}}_0x2d0b29['logger']['info'](_0x2d0b29[_0xf6e54c(0x24a)]+'['+_0x2d0b29[_0xf6e54c(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0xf6e54c(0x279)+(_0x504e71[_0xf6e54c(0x1fd)]['ca']?'tls':'')+'\x20'+_0x276714[_0xf6e54c(0x1e5)]()),_0x276714[_0xf6e54c(0x222)]()[_0xf6e54c(0x226)](_0x54e036=>{const _0x1ff8de=_0xf6e54c;_0x54e036&&_0x2d0b29[_0x1ff8de(0x289)][_0x1ff8de(0x1dc)](_0x2d0b29[_0x1ff8de(0x24a)]+'['+_0x2d0b29['pluginName']+_0x1ff8de(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x1ff8de(0x1f5)+_0x54e036['message']);});},this[_0x461b07(0x1d6)]=async()=>{const _0x43d7eb=_0x461b07;if(!_0x5a7645||!_0xc3dcd4[_0x43d7eb(0x221)]||!_0xc3dcd4[_0x43d7eb(0x22a)]||!_0xc3dcd4[_0x43d7eb(0x22a)]['ca']||!_0xc3dcd4[_0x43d7eb(0x209)]||!_0xc3dcd4[_0x43d7eb(0x209)][_0x43d7eb(0x25c)]||!_0xc3dcd4[_0x43d7eb(0x209)][_0x43d7eb(0x213)]||!_0xc3dcd4['nats'][_0x43d7eb(0x217)]){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x43d7eb(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x43d7eb(0x247));return;}if(_0x5a7645[_0x43d7eb(0x27a)]('.')[_0x43d7eb(0x264)]<0x2){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29[_0x43d7eb(0x24a)]+'['+_0x2d0b29['pluginName']+_0x43d7eb(0x1f2)+_0x4a7335+']['+_0x5a7645+']\x20error:\x20subject\x20'+_0x5a7645+_0x43d7eb(0x248));return;}if(_0x5a7645[_0x43d7eb(0x27c)](',')){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x43d7eb(0x1e3)]+_0x43d7eb(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x43d7eb(0x219));return;}if(!_0x276714){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29[_0x43d7eb(0x24a)]+'['+_0x2d0b29[_0x43d7eb(0x1e3)]+_0x43d7eb(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x43d7eb(0x295));return;}const _0x5637ab=async(_0x555590,_0x2a63c5)=>{const _0x5e7c91=_0x43d7eb;try{_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dd)](_0x555590+_0x5e7c91(0x258)+_0x2a63c5);let _0x3b7d8c;try{if(_0xc3dcd4[_0x5e7c91(0x252)]&&Array[_0x5e7c91(0x267)](_0xc3dcd4['replaceDomains']))for(let _0x241f77=0x0;_0x241f77<_0xc3dcd4['replaceDomains'][_0x5e7c91(0x264)];_0x241f77++){const _0x2c8509=_0xc3dcd4[_0x5e7c91(0x252)][_0x241f77];if(!_0x2c8509[_0x5e7c91(0x1fb)]||!_0x2c8509['from'][_0x5e7c91(0x27c)]('.')||!_0x2c8509['to']||!_0x2c8509['to']['includes']('.'))continue;const _0x3a2873=new RegExp('@'+_0x2c8509['from']+'\x22','gi');_0x2a63c5=_0x2a63c5[_0x5e7c91(0x23b)](_0x3a2873,'@'+_0x2c8509['to']+'\x22');}_0x3b7d8c=JSON[_0x5e7c91(0x203)](_0x2a63c5);}catch(_0x127352){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1ec)+_0x127352[_0x5e7c91(0x225)]+_0x5e7c91(0x1e0)+_0x2a63c5),_0x2d0b29[_0x5e7c91(0x289)]['debug'](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}const _0x3a4a23=_0x3b7d8c['user'];if(!_0x3a4a23){_0x2d0b29[_0x5e7c91(0x289)]['error'](_0x555590+_0x5e7c91(0x262)+JSON[_0x5e7c91(0x1d1)](_0x3b7d8c)),_0x2d0b29['logger']['debug'](_0x555590+'\x20done'+_0x2d5297);return;}if(!_0x3a4a23['userName']){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1fc)+JSON[_0x5e7c91(0x1d1)](_0x3b7d8c)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}delete _0x3a4a23['schemas'];let _0x509d16;_0x3a4a23['id']&&(_0x509d16=_0x3a4a23['id'],delete _0x3a4a23['id']);let _0x330090;_0x3a4a23[_0x5e7c91(0x1de)]&&(_0x330090=utils['copyObj'](_0x3a4a23[_0x5e7c91(0x1de)]),delete _0x3a4a23[_0x5e7c91(0x1de)]);await _0x32f9e0(_0x3a4a23);const _0x4b2517=_0x3a4a23['userName'];let _0x5804ad,_0x2856f2;try{_0x5804ad=await _0x593801(_0x5e7c91(0x233),_0x4b2517);}catch(_0x14ad2f){_0x2d0b29['logger']['error'](_0x555590+_0x5e7c91(0x27e)+_0x14ad2f[_0x5e7c91(0x225)]),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}if(!_0xc3dcd4[_0x5e7c91(0x1cf)]){let _0x2d90b8=![];if(_0x3b7d8c[_0x5e7c91(0x22f)]&&Array['isArray'](_0x3b7d8c['Operations']))for(let _0x2870d3=0x0;_0x2870d3<_0x3b7d8c[_0x5e7c91(0x22f)]['length'];_0x2870d3++){const _0x4b4edd=_0x3b7d8c[_0x5e7c91(0x22f)][_0x2870d3];_0x4b4edd['path'][_0x5e7c91(0x1ea)](_0x5e7c91(0x276))&&(_0x4b4edd[_0x5e7c91(0x206)]=_0x5e7c91(0x272),Array[_0x5e7c91(0x267)](_0x4b4edd[_0x5e7c91(0x23a)])?(_0x4b4edd['value'][0x0]['id']=_0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x23a)],_0x4b4edd['value'][0x0][_0x5e7c91(0x242)]=_0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x1d0)]+_0x5e7c91(0x28b)+_0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x23a)],delete _0x4b4edd['value'][0x0][_0x5e7c91(0x23a)],delete _0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x1d0)]):_0x4b4edd[_0x5e7c91(0x23a)]=[{'id':_0x4b4edd[_0x5e7c91(0x23a)],'display':_0x4b4edd[_0x5e7c91(0x23a)]}],delete _0x4b4edd[_0x5e7c91(0x281)],_0x2d90b8=!![]);}if(_0x3a4a23['roles']&&Array[_0x5e7c91(0x267)](_0x3a4a23['roles'])&&_0x3a4a23[_0x5e7c91(0x276)][_0x5e7c91(0x264)]>0x0){if(!_0x3a4a23[_0x5e7c91(0x272)])_0x3a4a23[_0x5e7c91(0x272)]=[];if(!Array['isArray'](_0x3a4a23['groups']))_0x3a4a23[_0x5e7c91(0x272)]=[];for(let _0x1b9190=0x0;_0x1b9190<_0x3a4a23[_0x5e7c91(0x276)][_0x5e7c91(0x264)];_0x1b9190++){const _0xa54747={},_0x51380c=_0x3a4a23[_0x5e7c91(0x276)][_0x1b9190];_0xa54747[_0x5e7c91(0x23a)]=_0x51380c[_0x5e7c91(0x23a)],_0xa54747[_0x5e7c91(0x242)]=_0x51380c[_0x5e7c91(0x1d0)]+'\x20-\x20'+_0x51380c['display'],_0x3a4a23['groups'][_0x5e7c91(0x21d)](_0xa54747);}delete _0x3a4a23[_0x5e7c91(0x276)],_0x2d90b8=!![];}if(_0x2d90b8)_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x27d)+JSON[_0x5e7c91(0x1d1)](_0x3b7d8c));}if(_0xc3dcd4['deleteUserOnLastGroupRoleRemoval']&&_0x3b7d8c['activityOperation']===_0x5e7c91(0x224)){if(_0x3a4a23[_0x5e7c91(0x272)]&&Array['isArray'](_0x3a4a23['groups'])&&_0x3a4a23[_0x5e7c91(0x272)][_0x5e7c91(0x264)]===0x0){if(_0x3a4a23[_0x5e7c91(0x276)]&&Array[_0x5e7c91(0x267)](_0x3a4a23[_0x5e7c91(0x276)])&&_0x3a4a23['roles'][_0x5e7c91(0x264)]===0x0){if(_0x3b7d8c[_0x5e7c91(0x22f)]&&Array[_0x5e7c91(0x267)](_0x3b7d8c['Operations'])&&_0x3b7d8c['Operations'][_0x5e7c91(0x264)]>0x0)for(let _0x3e14cc=0x0;_0x3e14cc<_0x3b7d8c['Operations'][_0x5e7c91(0x264)];_0x3e14cc++){const _0x5c128c=_0x3b7d8c[_0x5e7c91(0x22f)][_0x3e14cc];if(_0x5c128c['op']===_0x5e7c91(0x25b)){if(_0x5c128c[_0x5e7c91(0x206)]){if(_0x5c128c[_0x5e7c91(0x206)][_0x5e7c91(0x1ea)](_0x5e7c91(0x276))&&_0x5c128c['typeId'])_0x3b7d8c[_0x5e7c91(0x26f)]=_0x5e7c91(0x255);else _0x5c128c[_0x5e7c91(0x206)]===_0x5e7c91(0x272)&&(_0x3b7d8c['activityOperation']=_0x5e7c91(0x255));}}}}}}if(!_0x5804ad){if(_0x3b7d8c['activityOperation']===_0x5e7c91(0x255)){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1d8)+_0x4b2517+_0x5e7c91(0x207)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}if(_0xc3dcd4[_0x5e7c91(0x298)]&&_0xc3dcd4['modifyOnly']===!![]){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+'\x20Create\x20userName='+_0x4b2517+_0x5e7c91(0x23f)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+'\x20done'+_0x2d5297);return;}if(Object[_0x5e7c91(0x1ed)][_0x5e7c91(0x293)]['call'](_0x3a4a23,_0x5e7c91(0x1f1))){if(typeof _0x3a4a23[_0x5e7c91(0x1f1)]==='string'){const _0x8fc482=_0x3a4a23[_0x5e7c91(0x1f1)][_0x5e7c91(0x1e6)]();if(_0x8fc482===_0x5e7c91(0x22c))_0x3a4a23[_0x5e7c91(0x1f1)]=!![];else{if(_0x8fc482===_0x5e7c91(0x200))_0x3a4a23['active']=![];}}if(_0x3a4a23[_0x5e7c91(0x1f1)]===![]){_0x2d0b29['logger'][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x236)+_0x4b2517+_0x5e7c91(0x246)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}}_0x2d0b29['logger'][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1da)+_0x4b2517);const _0x4eb6bb=utils['copyObj'](_0x3a4a23);try{delete _0x4eb6bb[_0x5e7c91(0x272)];!_0x4eb6bb[_0x5e7c91(0x237)]&&_0xc3dcd4[_0x5e7c91(0x239)]&&_0xc3dcd4[_0x5e7c91(0x239)]===!![]&&(_0x4eb6bb['password']=utils[_0x5e7c91(0x24b)](0xf));if(_0x330090||_0x509d16){if(_0x330090)for(const _0x3a5604 in _0x330090){_0x4eb6bb[_0x3a5604]=_0x330090[_0x3a5604];}if(_0x509d16)_0x4eb6bb['id']=_0x509d16;await _0x32f9e0(_0x4eb6bb);}await _0x2d0b29[_0x5e7c91(0x284)](_0x4a7335,_0x4eb6bb),_0x3a4a23[_0x5e7c91(0x272)]&&Array[_0x5e7c91(0x267)](_0x3a4a23['groups'])&&_0x3a4a23['groups']['length']>0x0&&(_0x2856f2=await _0x593801(_0x5e7c91(0x233),_0x4b2517));}catch(_0x4da87b){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+'\x20createUser()\x20obj='+JSON[_0x5e7c91(0x1d1)](_0x4eb6bb)+_0x5e7c91(0x22e)+_0x4da87b[_0x5e7c91(0x225)]+'}'),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}}if(_0x5804ad||_0x2856f2){if(_0x3b7d8c['activityOperation']===_0x5e7c91(0x255)){if(_0xc3dcd4['modifyOnly']&&_0xc3dcd4['modifyOnly']===!![]){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x24d)+_0x5804ad+'\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true'),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+'\x20done'+_0x2d5297);return;}_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x24d)+_0x5804ad);try{await _0x2d0b29[_0x5e7c91(0x255)](_0x4a7335,_0x5804ad);}catch(_0x5695fb){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x24d)+_0x5804ad+_0x5e7c91(0x22e)+_0x5695fb[_0x5e7c91(0x225)]+'}'),_0x2d0b29['logger'][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}}else{if(_0x2856f2)_0x5804ad=_0x2856f2;_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad);const _0xdc6421={};_0xdc6421[_0x5e7c91(0x211)]=()=>{},_0xdc6421['originalUrl']=_0x4a7335?'/'+_0x4a7335+'/Users/'+_0x5804ad:'/Users/'+_0x5804ad,_0xdc6421[_0x5e7c91(0x271)]={},_0xdc6421[_0x5e7c91(0x271)]['id']=_0x5804ad,_0xdc6421['request']={},_0xdc6421[_0x5e7c91(0x23e)][_0x5e7c91(0x266)]=_0x3a4a23;try{await _0x2d0b29[_0x5e7c91(0x229)](_0xdc6421);}catch(_0x2c4762){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad+'\x20error:\x20'+_0x2c4762[_0x5e7c91(0x225)]),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}if(_0xdc6421[_0x5e7c91(0x280)]&&_0xdc6421['status']!==0xc8){if(_0xdc6421[_0x5e7c91(0x266)]){if(_0xdc6421[_0x5e7c91(0x266)][_0x5e7c91(0x263)]){let _0x59b389=_0xdc6421[_0x5e7c91(0x266)]['detail'];_0x59b389=_0x59b389[_0x5e7c91(0x23b)](_0x2d0b29[_0x5e7c91(0x24a)]+'['+_0x2d0b29[_0x5e7c91(0x1e3)]+']',''+_0x555590),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](''+_0x59b389);}else{if(_0xdc6421['body'][_0x5e7c91(0x294)]&&Array['isArray'](_0xdc6421[_0x5e7c91(0x266)][_0x5e7c91(0x294)])&&_0xdc6421['body'][_0x5e7c91(0x294)][_0x5e7c91(0x264)]>0x0){let _0x4222fc=_0xdc6421['body']['Errors'][0x0][_0x5e7c91(0x25e)];_0x4222fc=_0x4222fc[_0x5e7c91(0x23b)](_0x2d0b29[_0x5e7c91(0x24a)]+'['+_0x2d0b29['pluginName']+']',''+_0x555590),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](''+_0x4222fc);}}}}if(_0xc3dcd4['usePutSoftSync']){const [_0x14ec2e,_0x441fa5]=_0x2d0b29[_0x5e7c91(0x1ee)]({'Operations':_0x3b7d8c['Operations']});if(_0x441fa5){_0x2d0b29['logger'][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad+_0x5e7c91(0x250)+_0x441fa5[_0x5e7c91(0x225)]),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}const _0x1320d1=[];if(_0x14ec2e[_0x5e7c91(0x276)]&&Array[_0x5e7c91(0x267)](_0x14ec2e['roles']))for(let _0x5d6cea=0x0;_0x5d6cea<_0x14ec2e['roles'][_0x5e7c91(0x264)];_0x5d6cea++){_0x14ec2e['roles'][_0x5d6cea]['operation']&&_0x14ec2e[_0x5e7c91(0x276)][_0x5d6cea]['operation']===_0x5e7c91(0x1e9)&&_0x1320d1[_0x5e7c91(0x21d)](_0x14ec2e[_0x5e7c91(0x276)][_0x5d6cea]);}if(_0x1320d1[_0x5e7c91(0x264)]>0x0)try{await _0x2d0b29['modifyUser'](_0x4a7335,_0x5804ad,{'roles':_0x1320d1});}catch(_0x44e999){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+'\x20Replace\x20User\x20id='+_0x5804ad+_0x5e7c91(0x21a)+_0x44e999[_0x5e7c91(0x225)]);}const _0x574f68=[];if(_0x14ec2e[_0x5e7c91(0x272)]&&Array[_0x5e7c91(0x267)](_0x14ec2e[_0x5e7c91(0x272)]))for(let _0x359e17=0x0;_0x359e17<_0x14ec2e[_0x5e7c91(0x272)]['length'];_0x359e17++){_0x14ec2e[_0x5e7c91(0x272)][_0x359e17][_0x5e7c91(0x297)]&&_0x14ec2e['groups'][_0x359e17][_0x5e7c91(0x297)]===_0x5e7c91(0x1e9)&&_0x574f68[_0x5e7c91(0x21d)](_0x14ec2e[_0x5e7c91(0x272)][_0x359e17]);}if(_0x574f68[_0x5e7c91(0x264)]>0x0)for(let _0x2f063a=0x0;_0x2f063a<_0x574f68['length'];_0x2f063a++){try{await _0x2d0b29[_0x5e7c91(0x230)](_0x4a7335,_0x574f68[_0x2f063a]['id'],{'members':[{'operation':_0x5e7c91(0x1e9),'value':_0x5804ad}]});}catch(_0x53883f){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad+_0x5e7c91(0x210)+_0x53883f[_0x5e7c91(0x225)]);}}}}}_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);}catch(_0x162a1b){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x5e7c91(0x1e3)]+_0x5e7c91(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x5e7c91(0x24c)+_0x162a1b['message']+'\x20=>\x20subscriber\x20not\x20activated'+_0x2d5297);}},_0x1d5e97=nats[_0x43d7eb(0x28c)](),_0x59553c=_0x276714['jetstream'](),_0x1eb9d5=(_0x43d7eb(0x20e)+_0x2d0b29[_0x43d7eb(0x1e3)]+'_'+_0x4a7335)[_0x43d7eb(0x215)]('*','#')['replaceAll']('>','##')['replaceAll']('.','_');let _0x40eaf5;const _0x59bfa0=async()=>{const _0x2b89da=_0x43d7eb;try{const _0x2bafe7=''+_0xc3dcd4[_0x2b89da(0x209)][_0x2b89da(0x25c)],_0x5180f2=await _0x276714['jetstreamManager'](),_0x32f581=async()=>{const _0x899af=_0x2b89da;let _0x5f45ca;try{_0x5f45ca=await _0x59553c[_0x899af(0x257)][_0x899af(0x292)](_0x2bafe7,_0x1eb9d5);}catch(_0xf0fbc4){await _0x5180f2[_0x899af(0x257)][_0x899af(0x28a)](_0x2bafe7,{'durable_name':_0x1eb9d5,'ack_policy':nats['AckPolicy'][_0x899af(0x286)],'deliver_policy':nats['DeliverPolicy'][_0x899af(0x285)],'deliver_group':_0xc3dcd4?.[_0x899af(0x209)]?.[_0x899af(0x28d)]||null,'filter_subject':_0x5a7645}),_0x5f45ca=await _0x59553c[_0x899af(0x257)]['get'](_0x2bafe7,_0x1eb9d5);}(_0x5a7645!==_0x5f45ca?.['_info']?.[_0x899af(0x25a)]?.[_0x899af(0x1d9)]||_0xc3dcd4?.[_0x899af(0x209)]?.[_0x899af(0x28d)]!==_0x5f45ca?.[_0x899af(0x238)]?.['config']?.[_0x899af(0x23d)])&&(await _0x5180f2[_0x899af(0x257)][_0x899af(0x283)](_0x2bafe7,_0x1eb9d5,{'deliver_group':_0xc3dcd4?.[_0x899af(0x209)]?.['queueGroup']||null,'filter_subject':_0x5a7645}),_0x5f45ca=await _0x59553c['consumers']['get'](_0x2bafe7,_0x1eb9d5)),_0x40eaf5=await _0x5f45ca[_0x899af(0x20c)]({'max_messages':0x64});};await _0x32f581();const _0x415dc1=async()=>{const _0x45f757=_0x2b89da;for await(const _0x575e51 of await _0x40eaf5['status']()){switch(_0x575e51[_0x45f757(0x1d0)]){case nats['ConsumerEvents'][_0x45f757(0x1e2)]:if(_0x575e51[_0x45f757(0x282)]===0x1)_0x2d0b29[_0x45f757(0x289)]['info'](_0x2d0b29[_0x45f757(0x24a)]+'['+_0x2d0b29[_0x45f757(0x1e3)]+_0x45f757(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x45f757(0x259)+_0x575e51[_0x45f757(0x1d0)]),_0x32f581();else _0x575e51[_0x45f757(0x282)]%0xa===0x0&&_0x2d0b29[_0x45f757(0x289)]['error'](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x45f757(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x45f757(0x268)+_0x575e51[_0x45f757(0x1d0)]+_0x45f757(0x235)+_0x575e51[_0x45f757(0x282)]);break;}}};_0x415dc1();for await(const _0x46b3e3 of _0x40eaf5){if(!_0x46b3e3[_0x2b89da(0x287)]||!_0x46b3e3[_0x2b89da(0x287)]['get'](_0x2b89da(0x22b))){_0x46b3e3['ack']();continue;}const _0x245ba8=_0x2d0b29[_0x2b89da(0x24a)]+'['+_0x2d0b29['pluginName']+']\x20subscriber['+_0x4a7335+']['+_0x46b3e3[_0x2b89da(0x231)]+']['+_0x40eaf5[_0x2b89da(0x24e)]()+']['+(_0x46b3e3[_0x2b89da(0x287)]?_0x46b3e3[_0x2b89da(0x287)]['get'](_0x2b89da(0x22b)):'')+']',_0x1dbe1b=_0x1d5e97['decode'](_0x46b3e3[_0x2b89da(0x282)]);await _0x5637ab(_0x245ba8,_0x1dbe1b),_0x46b3e3[_0x2b89da(0x26d)]();}}catch(_0x4afe87){_0x2d0b29['logger']['error'](_0x2d0b29[_0x2b89da(0x24a)]+'['+_0x2d0b29['pluginName']+_0x2b89da(0x1f2)+_0x4a7335+']['+_0x5a7645+']\x20subscriber\x20stopped\x20error:\x20'+_0x4afe87[_0x2b89da(0x225)]);}};_0x59bfa0();const _0x5a50e8=async()=>{const _0x53eda2=_0x43d7eb;let _0x7531bc=0x0;for await(const _0x2bc5ca of _0x276714[_0x53eda2(0x280)]()){switch(_0x2bc5ca[_0x53eda2(0x1d0)]){case nats[_0x53eda2(0x21c)][_0x53eda2(0x1cb)]:_0x2d0b29[_0x53eda2(0x289)][_0x53eda2(0x1dc)](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29[_0x53eda2(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x20a)+_0x2bc5ca['data']+_0x53eda2(0x234)),_0x7531bc=0x0;break;case nats['Events']['Reconnect']:_0x2d0b29[_0x53eda2(0x289)][_0x53eda2(0x1dd)](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29['pluginName']+_0x53eda2(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x244)+_0x2bc5ca['data']);try{if(_0x40eaf5[_0x53eda2(0x26c)])await _0x40eaf5['consumerInfo']();}catch(_0x4a0cb8){if(_0x40eaf5[_0x53eda2(0x220)])_0x40eaf5['unsubscribe']();}break;case nats[_0x53eda2(0x21c)][_0x53eda2(0x288)]:_0x2d0b29['logger']['error'](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29[_0x53eda2(0x1e3)]+_0x53eda2(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x251)+_0x2bc5ca['data']);break;case nats['DebugEvents'][_0x53eda2(0x273)]:_0x7531bc+=0x1;_0x7531bc%0x1e===0x0&&_0x2d0b29[_0x53eda2(0x289)][_0x53eda2(0x27f)](_0x2d0b29['gwName']+'['+_0x2d0b29['pluginName']+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x24f)+_0x2bc5ca[_0x53eda2(0x282)]+'\x20(count='+_0x7531bc+')');break;case nats['DebugEvents']['StaleConnection']:_0x2d0b29[_0x53eda2(0x289)]['debug'](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29['pluginName']+_0x53eda2(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x201)+_0x2bc5ca['data']);break;}}};_0x5a50e8(),process['on']('SIGTERM',async()=>{_0x276714&&await _0x276714['drain']();}),process['on'](_0x43d7eb(0x202),async()=>{_0x276714&&await _0x276714['drain']();});};const _0x593801=async(_0x382d36,_0x2d3277)=>{const _0x27ab3f=_0x461b07,_0x99938f={'attribute':_0x382d36,'operator':'eq','value':_0x2d3277,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x15b0d7=[_0x382d36];if(_0x382d36!=='id')_0x15b0d7[_0x27ab3f(0x21d)]('id');try{const _0x786c1c=await _0x2d0b29[_0x27ab3f(0x1f6)](_0x4a7335,_0x99938f,_0x15b0d7);if(!_0x786c1c||!_0x786c1c[_0x27ab3f(0x253)]||!Array['isArray'](_0x786c1c['Resources']))throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+_0x27ab3f(0x1db));if(_0x786c1c[_0x27ab3f(0x253)][_0x27ab3f(0x264)]===0x0)return null;else{if(_0x786c1c[_0x27ab3f(0x253)][_0x27ab3f(0x264)]>0x2)throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+_0x27ab3f(0x1fa));else{const _0x165373=_0x786c1c[_0x27ab3f(0x253)][0x0];if(!_0x165373['id'])throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+_0x27ab3f(0x240)+JSON[_0x27ab3f(0x1d1)](_0x165373)+_0x27ab3f(0x228));return decodeURIComponent(_0x165373['id']);}}}catch(_0x5da8eb){throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+'\x20error:\x20'+_0x5da8eb[_0x27ab3f(0x225)]+'}');}},_0x5a0b97=_0xfbfd24=>{const _0x2b1962=_0x461b07;if(!_0xfbfd24||typeof _0xfbfd24!==_0x2b1962(0x278))return[null,null];_0xfbfd24=_0xfbfd24[_0x2b1962(0x1df)]();const _0x5d863d=_0xfbfd24[_0x2b1962(0x1ff)]('(');if(_0x5d863d<0x1)return[null,null];if(_0xfbfd24['substring'](_0xfbfd24[_0x2b1962(0x264)]-0x1)!==')')return[null,null];if(_0x100ffa(_0xfbfd24,'(')!==_0x100ffa(_0xfbfd24,')'))return[null,null];const _0x335b3f=_0xfbfd24[_0x2b1962(0x1f7)](0x0,_0x5d863d),_0x5b0aab=_0xfbfd24[_0x2b1962(0x1f7)](_0x5d863d+0x1,_0xfbfd24[_0x2b1962(0x264)]-0x1);let _0x367d59=[];const _0x3899ff=_0x5b0aab[_0x2b1962(0x27a)](',');let _0x3b692c='';for(let _0x4096b9=0x0;_0x4096b9<_0x3899ff[_0x2b1962(0x264)];_0x4096b9++){const _0x5a59cc=_0x3b692c?_0x3b692c+','+_0x3899ff[_0x4096b9]:_0x3899ff[_0x4096b9],_0x4c2b1d=_0x100ffa(_0x5a59cc,'('),_0x12ee6b=_0x100ffa(_0x5a59cc,')');if(_0x4c2b1d===_0x12ee6b)_0x367d59['push'](_0x5bfb85(_0x5a59cc,'\x22')),_0x3b692c='';else{if(_0x3b692c)_0x3b692c+=','+_0x3899ff[_0x4096b9];else _0x3b692c+=_0x3899ff[_0x4096b9];}}if(_0x367d59[_0x2b1962(0x264)]===0x0)_0x367d59=null;return[_0x335b3f,_0x367d59];};function _0x100ffa(_0x271210,_0xdfe5bb){const _0x1f8b05=_0x461b07;let _0x30a213=0x0;for(let _0x302246=0x0;_0x302246<_0x271210[_0x1f8b05(0x264)];_0x302246++){_0x271210[_0x1f8b05(0x291)](_0x302246)===_0xdfe5bb&&(_0x30a213+=0x1);}return _0x30a213;}const _0x5bfb85=(_0x151f43,_0x20fdb6)=>{const _0x215f04=_0x461b07;if(typeof _0x151f43!=='string'||typeof _0x20fdb6!==_0x215f04(0x278))return _0x151f43;if(_0x151f43[_0x215f04(0x264)]===0x1)return _0x151f43;if(_0x20fdb6[_0x215f04(0x264)]!==0x1)return _0x151f43;return _0x151f43=_0x151f43[_0x215f04(0x1df)](),_0x151f43[_0x215f04(0x1f7)](0x0,0x1)===_0x20fdb6&&(_0x151f43=_0x151f43[_0x215f04(0x1f7)](0x1)),_0x151f43[_0x215f04(0x1f7)](_0x151f43['length']-0x1)===_0x20fdb6&&(_0x151f43=_0x151f43[_0x215f04(0x1f7)](0x0,_0x151f43['length']-0x1)),_0x151f43;},_0x41a21b=async(_0x45ab7a,_0x1d2460,_0x5b0890)=>{const _0x52907c=_0x461b07;if(!_0x45ab7a||!_0x1d2460||!_0x5b0890)return null;const [_0x41fadf,_0x3f6db3]=_0x5a0b97(_0x5b0890);if(!_0x41fadf||!_0x3f6db3){const _0x4e9001=_0x5b0890['split']('(');if(_0x4e9001['length']>0x1){const _0x40f640=[_0x52907c(0x261),'uppercase',_0x52907c(0x265),'elementnumber',_0x52907c(0x20f),_0x52907c(0x23b),_0x52907c(0x274),_0x52907c(0x22d),_0x52907c(0x21e)],_0x55b90a=_0x4e9001[0x0][_0x52907c(0x1e6)]();if(_0x40f640[_0x52907c(0x27c)](_0x55b90a))return null;}return _0x5b0890;}for(let _0x3f83a3=0x0;_0x3f83a3<_0x3f6db3['length'];_0x3f83a3++){if(_0x3f6db3[_0x3f83a3][_0x52907c(0x1f7)](0x0,0x1)==='['){const _0x3e578a=_0x3f6db3[_0x3f83a3][_0x52907c(0x1ff)](']');if(_0x3e578a<0x0)return null;const _0x4926bf=_0x3f6db3[_0x3f83a3][_0x52907c(0x1f7)](0x1,_0x3e578a),_0x32032d=_0x4926bf[_0x52907c(0x27a)]('.');let _0x29a30c;for(let _0x1882cc=0x0;_0x1882cc<_0x32032d[_0x52907c(0x264)];_0x1882cc++){if(_0x1882cc===0x0)_0x29a30c=_0x45ab7a[_0x32032d[_0x1882cc]];else{if(!_0x29a30c)return null;_0x29a30c=_0x29a30c[_0x32032d[_0x1882cc]];}}if(!_0x29a30c)return null;_0x3f6db3[_0x3f83a3]=_0x29a30c;}}for(let _0x1779b0=0x0;_0x1779b0<_0x3f6db3['length'];_0x1779b0++){const [_0x312d40]=_0x5a0b97(_0x3f6db3[_0x1779b0]);_0x312d40&&(_0x3f6db3[_0x1779b0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x3f6db3[_0x1779b0]));}if(_0x3f6db3[0x0]===null)return null;switch(_0x41fadf[_0x52907c(0x1e6)]()){case _0x52907c(0x261):{if(_0x3f6db3[_0x52907c(0x264)]!==0x1)return null;const [_0x1c8bed]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x1c8bed)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x1c8bed);if(_0x3f6db3[0x0]===null)return null;return _0x3f6db3[0x0][_0x52907c(0x1e6)]();}case _0x52907c(0x208):{if(_0x3f6db3[_0x52907c(0x264)]!==0x1)return null;const [_0x2b59c1]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x2b59c1)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x2b59c1);if(_0x3f6db3[0x0]===null)return null;return _0x3f6db3[0x0][_0x52907c(0x28e)]();}case _0x52907c(0x265):{if(_0x3f6db3[_0x52907c(0x264)]!==0x2)return null;const [_0x20d91c]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x20d91c)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x20d91c);if(_0x3f6db3[0x0]===null)return null;if(isNaN(_0x3f6db3[0x1]))return null;return _0x3f6db3[0x0][_0x52907c(0x1f7)](0x0,_0x3f6db3[0x1]);}case'elementnumber':{const [_0x2964d9]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x3f6db3[_0x52907c(0x264)]<0x2)return null;if(_0x2964d9)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x2964d9);if(_0x3f6db3[0x0]===null)return null;const _0x278ede=_0x3f6db3[0x1];if(isNaN(_0x278ede))return null;let _0x58c155;if(_0x3f6db3[_0x52907c(0x264)]===0x3)_0x58c155=_0x3f6db3[0x0][_0x52907c(0x27a)](_0x3f6db3[0x2]);else _0x58c155=_0x58c155=_0x3f6db3[0x0]['split']('\x20');if(_0x278ede<=_0x58c155[_0x52907c(0x264)])return _0x58c155[_0x278ede-0x1];else return'';}case _0x52907c(0x23b):{const [_0xe9c5db]=_0x5a0b97(_0x3f6db3[0x0]);if(_0xe9c5db)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0xe9c5db);if(_0x3f6db3[0x0]===null)return null;if(_0x3f6db3[_0x52907c(0x264)]!==0x3)return null;return _0x3f6db3[0x0][_0x52907c(0x215)](_0x3f6db3[0x1],_0x3f6db3[0x2]);}case _0x52907c(0x274):{if(_0x3f6db3[_0x52907c(0x264)]!==0x1)return null;const [_0x2cb869]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x2cb869)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x2cb869);if(_0x3f6db3[0x0]===null)return null;return ascii127[_0x52907c(0x260)](_0x3f6db3[0x0]);}case _0x52907c(0x20f):{let _0xe9561f='';for(let _0x5d2ba0=0x0;_0x5d2ba0<_0x3f6db3['length'];_0x5d2ba0++){const [_0x588017]=_0x5a0b97(_0x3f6db3[_0x5d2ba0]);if(_0x588017)_0x3f6db3[_0x5d2ba0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x588017);if(_0x3f6db3[_0x5d2ba0]===null)return null;_0xe9561f+=_0x3f6db3[_0x5d2ba0];}return _0xe9561f;}case _0x52907c(0x22d):{if(_0x3f6db3['length']>0x2)return null;const [_0x3b8de9]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x3b8de9)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x3b8de9);if(_0x3f6db3[0x0]===null)return null;const _0x1df101=parseInt(_0x3f6db3[0x0]);if(isNaN(_0x1df101))return null;let _0x4c3bc2=_0x52907c(0x243);_0x4c3bc2+=','+_0x3f6db3[0x0];if(_0x3f6db3[_0x52907c(0x264)]===0x2&&_0x3f6db3[0x1][_0x52907c(0x1e6)]()==='true')_0x4c3bc2+=_0x52907c(0x1e8);else _0x4c3bc2+=_0x52907c(0x1f0);return _0x4c3bc2+='##',_0x4c3bc2;}case'getuniquevalue':{if(_0x3f6db3['length']!==0x1)return null;const [_0x3f5c8e]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x3f5c8e)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x3f5c8e);if(_0x3f6db3[0x0]===null)return null;let _0x4a466b,_0x2a03aa=![],_0x2c24e7='';const _0x33ae9e=_0x3f6db3[0x0]['split']('##');if(_0x33ae9e[_0x52907c(0x264)]>0x2)for(let _0x10bf63=0x0;_0x10bf63<_0x33ae9e['length'];_0x10bf63++){if(_0x33ae9e[_0x10bf63][_0x52907c(0x1ea)](_0x52907c(0x1cc))){const _0x57b1b6=_0x33ae9e[_0x10bf63][_0x52907c(0x27a)](',');if(_0x57b1b6[_0x52907c(0x264)]<0x2)return null;const _0x5f1985=parseInt(_0x57b1b6[0x1]);if(isNaN(_0x5f1985))return null;_0x2c24e7='##'+_0x33ae9e[_0x10bf63]+'##',_0x4a466b=_0x57b1b6[0x1],_0x57b1b6[_0x52907c(0x264)]>0x2&&(_0x2a03aa=_0x57b1b6[0x2]['toLowerCase']()==='true');}}let _0x31ede8,_0x4125dc=0x0,_0x283e64=0x0;if(_0x4a466b){_0x283e64=_0x4a466b['length'],_0x4125dc=0xa;for(let _0x5cdade=0x1;_0x5cdade<_0x283e64;_0x5cdade++){_0x4125dc*=0xa;}_0x4125dc-=0x1,_0x31ede8=parseInt(_0x4a466b);if(isNaN(_0x31ede8))return null;_0x31ede8-=0x1;}else _0x31ede8=0x0;do{_0x31ede8+=0x1;let _0x12ce62=_0x3f6db3[0x0];if(_0x4a466b!==undefined&&_0x2c24e7){let _0x3d0cd8=_0x31ede8['toString']();while(_0x3d0cd8[_0x52907c(0x264)]<_0x283e64){_0x3d0cd8='0'+_0x3d0cd8;}_0x2a03aa?_0x12ce62=_0x12ce62[_0x52907c(0x23b)](_0x2c24e7,_0x3d0cd8):(_0x12ce62=_0x12ce62[_0x52907c(0x23b)](_0x2c24e7,''),_0x2a03aa=!![],_0x31ede8-=0x1);}try{const _0x56e7fb=await _0x593801(_0x1d2460,_0x12ce62);if(!_0x56e7fb)return _0x12ce62;}catch(_0x5163ae){return _0x2d0b29[_0x52907c(0x289)][_0x52907c(0x1dc)](_0x2d0b29[_0x52907c(0x24a)]+'['+_0x2d0b29['pluginName']+']\x20'+_0x41fadf+_0x52907c(0x27e)+_0x5163ae['message']),null;}}while(_0x31ede8<_0x4125dc);return null;}default:}return null;},_0x32f9e0=async _0x3528d2=>{const _0x3c76b8=_0x461b07;for(const _0x193735 in _0x3528d2){const _0x98e83c=_0x3528d2[_0x193735],[_0x591d5d,_0x49b98c]=_0x5a0b97(_0x98e83c);if(_0x591d5d){const _0x5a282b=''+_0x193735,_0x1d805c=_0x591d5d+'('+_0x49b98c[_0x3c76b8(0x20f)](',')+')',_0x30cb79=await _0x41a21b(_0x3528d2,_0x5a282b,_0x1d805c);if(_0x30cb79===null)delete _0x3528d2[_0x193735];else _0x3528d2[_0x193735]=_0x30cb79;}for(const _0x47da91 in _0x98e83c){const _0x2c5d4f=_0x98e83c[_0x47da91],[_0x3c08ea,_0x3f9fdc]=_0x5a0b97(_0x2c5d4f);if(_0x3c08ea){const _0x2be80e=_0x193735+'.'+_0x47da91,_0x25475d=_0x3c08ea+'('+_0x3f9fdc[_0x3c76b8(0x20f)](',')+')',_0x7953f1=await _0x41a21b(_0x3528d2,_0x2be80e,_0x25475d);if(_0x7953f1===null)delete _0x98e83c[_0x47da91];else _0x98e83c[_0x47da91]=_0x7953f1;}}}return _0x3528d2;};},module[a0_0x20b93f(0x290)][a0_0x20b93f(0x1d3)]=async(_0x5c6853,_0x2f5c49,_0x26adbe,_0x42a22a)=>{const _0x4f4f1f=a0_0x20b93f,_0x51f644=_0x4f4f1f(0x1d3),_0x178a2f=_0x5c6853;_0x178a2f[_0x4f4f1f(0x289)][_0x4f4f1f(0x27f)](_0x178a2f[_0x4f4f1f(0x24a)]+'['+_0x178a2f[_0x4f4f1f(0x1e3)]+_0x4f4f1f(0x1f4)+_0x51f644+'\x22');try{if(!fs['existsSync'](_0x178a2f['configDir']+'/approles'))fs[_0x4f4f1f(0x1e7)](_0x178a2f[_0x4f4f1f(0x218)]+_0x4f4f1f(0x227));}catch(_0x24c2ec){}const _0x4573d8=path['join'](''+_0x178a2f['configDir'],_0x4f4f1f(0x25d),_0x4f4f1f(0x21f)+_0x178a2f[_0x4f4f1f(0x1e3)]+'_autogenerated.cfg'),_0x548cfb={};utils[_0x4f4f1f(0x27b)](_0x4573d8)&&fs[_0x4f4f1f(0x1ce)](_0x4573d8,'utf-8')['split'](/\r?\n/)[_0x4f4f1f(0x1ca)](_0x5e2e97=>{const _0x2abe45=_0x4f4f1f,_0x26d292=_0x5e2e97['split']('\x20');_0x26d292[_0x2abe45(0x264)]===0x2&&(_0x548cfb[_0x26d292[0x0]]=_0x26d292[0x1]);});const _0x346ae4=fs[_0x4f4f1f(0x21b)](_0x4573d8,{'flags':'w','encoding':_0x4f4f1f(0x254),'mode':0x1b6,'autoClose':!![]}),_0xe65087=[],_0x39b1ae=await _0x178a2f[_0x4f4f1f(0x23c)](_0x2f5c49,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x4f4f1f(0x1e4)]);return _0x39b1ae[_0x4f4f1f(0x253)][_0x4f4f1f(0x1ca)](_0x21fa7b=>{const _0x47e197=_0x4f4f1f;if(_0x21fa7b['id']){let _0x438aac=crypto[_0x47e197(0x20b)]();if(_0x548cfb[_0x21fa7b['id']])_0x438aac=_0x548cfb[_0x21fa7b['id']];const _0x308738={'allowedMemberTypes':[_0x47e197(0x1cd)],'description':'SCIM\x20Stream\x20-\x20Autogenerated','displayName':_0x21fa7b[_0x47e197(0x1e4)]||_0x21fa7b['id'],'id':_0x438aac,'isEnabled':!![],'lang':null,'origin':_0x47e197(0x26e),'value':decodeURIComponent(_0x21fa7b['id'])};_0xe65087[_0x47e197(0x21d)](_0x308738),_0x346ae4[_0x47e197(0x1d4)](_0x21fa7b['id']+'\x20'+_0x438aac+'\x0a');}}),_0x346ae4['close'](),_0x178a2f['logger']['debug'](_0x178a2f[_0x4f4f1f(0x24a)]+'['+_0x178a2f[_0x4f4f1f(0x1e3)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x4573d8),{'Resources':[{'appRoles':_0xe65087}]};};
@@ -36,7 +36,8 @@ const ScimGateway = function () {
36
36
  const startTime = utils.timestamp()
37
37
  const stack = callsite()
38
38
  const requester = stack[1].getFileName()
39
- const pluginName = path.basename(requester, '.js')
39
+ let pluginName = path.basename(requester)
40
+ pluginName = pluginName.substring(0, pluginName.lastIndexOf('.')) || pluginName
40
41
  const pluginDir = path.dirname(requester)
41
42
  const configDir = path.join(pluginDir, '..', 'config')
42
43
  const configFile = path.join(`${configDir}`, `${pluginName}.json`) // config name prefix same as pluging name prefix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "4.4.1",
3
+ "version": "4.4.3",
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",
@@ -43,9 +43,9 @@
43
43
  "ldapjs": "^3.0.7",
44
44
  "lokijs": "^1.5.12",
45
45
  "mongodb": "^6.3.0",
46
- "nats": "^2.18.0",
46
+ "nats": "^2.19.0",
47
47
  "node-machine-id": "1.1.9",
48
- "nodemailer": "^6.9.8",
48
+ "nodemailer": "^6.9.9",
49
49
  "passport": "^0.7.0",
50
50
  "passport-azure-ad": "^4.3.5",
51
51
  "tedious": "^16.6.1",