@sava-info-systems/api-maker-with-extensions 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/4575.584a2fd6d6505e7a.js +1 -0
- package/dist/6393.bff610fd50c307e8.js +1 -0
- package/dist/7368.102769b19d40d3e0.js +1 -0
- package/dist/assets/schema-types/types.ts +9 -0
- package/dist/index.html +1 -1
- package/dist/main.40b9c805b1ee0fc1.js +1 -0
- package/dist/{runtime.553fe0e243e03c0a.js → runtime.94df8f20f115da3f.js} +1 -1
- package/main.js +1 -1
- package/package.json +8 -4
- package/sandbox.js +1 -1
- package/src/assets/schema-types/types.ts +9 -0
- package/src/tools/.github/copilot-instructions.md +4 -4
- package/src/tools/local-client.js +1 -1
- package/dist/4575.a69d55da7b6dc4de.js +0 -1
- package/dist/6393.958d3e53cb6f8226.js +0 -1
- package/dist/7368.fa9ed2cea7c284b8.js +0 -1
- package/dist/main.d876eb0d409c6ceb.js +0 -1
|
@@ -4083,6 +4083,7 @@ export enum EDBMasterConfigGridColumnVisibilityStatus {
|
|
|
4083
4083
|
* Form field configuration for UI controls.
|
|
4084
4084
|
* Defines the appearance, behavior, and validation of individual form inputs.
|
|
4085
4085
|
*/
|
|
4086
|
+
// genericConfig : start
|
|
4086
4087
|
export interface IDBMasterConfigFormField {
|
|
4087
4088
|
/**
|
|
4088
4089
|
* Unique identifier for programmatic element access.
|
|
@@ -4166,6 +4167,7 @@ export interface IDBMasterConfigFormField {
|
|
|
4166
4167
|
/**
|
|
4167
4168
|
* Multi-line text input configuration.
|
|
4168
4169
|
*/
|
|
4170
|
+
// textAreaSettings : start
|
|
4169
4171
|
textAreaSettings?: {
|
|
4170
4172
|
/** Inline style object (Angular style binding format). */
|
|
4171
4173
|
style?: any;
|
|
@@ -4222,6 +4224,7 @@ export interface IDBMasterConfigFormField {
|
|
|
4222
4224
|
code: string | (($scope: IDBMasterUIPageUtilsScope) => any),
|
|
4223
4225
|
}[],
|
|
4224
4226
|
};
|
|
4227
|
+
// textAreaSettings : end
|
|
4225
4228
|
|
|
4226
4229
|
// editorSettings : start
|
|
4227
4230
|
editorSettings?: {
|
|
@@ -5235,6 +5238,7 @@ export interface IDBMasterConfigFormField {
|
|
|
5235
5238
|
* Dropdown (select) control configuration.
|
|
5236
5239
|
* Supports static data, database queries, and custom API calls.
|
|
5237
5240
|
*/
|
|
5241
|
+
// dropdownSettings : start
|
|
5238
5242
|
dropdownSettings?: {
|
|
5239
5243
|
/** Inline style object (Angular style binding format). */
|
|
5240
5244
|
style?: any;
|
|
@@ -5369,6 +5373,7 @@ export interface IDBMasterConfigFormField {
|
|
|
5369
5373
|
*/
|
|
5370
5374
|
apiCallOverrides?: IDBMasterAPICallOverrides;
|
|
5371
5375
|
};
|
|
5376
|
+
// dropdownSettings : end
|
|
5372
5377
|
|
|
5373
5378
|
/**
|
|
5374
5379
|
* Autocomplete control configuration.
|
|
@@ -6504,6 +6509,7 @@ export interface IDBMasterConfigFormField {
|
|
|
6504
6509
|
* Validation rules for schema properties and form fields.
|
|
6505
6510
|
* Define constraints that values must satisfy before being saved.
|
|
6506
6511
|
*/
|
|
6512
|
+
// genericConfig : start
|
|
6507
6513
|
export interface IPropertyValidation {
|
|
6508
6514
|
/**
|
|
6509
6515
|
* Field is mandatory and must have a non-null, non-empty value.
|
|
@@ -6554,6 +6560,8 @@ export interface IPropertyValidation {
|
|
|
6554
6560
|
enum?: any[];
|
|
6555
6561
|
}
|
|
6556
6562
|
|
|
6563
|
+
// genericConfig : end
|
|
6564
|
+
|
|
6557
6565
|
// dropdownSettings : start
|
|
6558
6566
|
export enum EDBMasterDropdownAppendTo {
|
|
6559
6567
|
visible = 'visible',
|
|
@@ -6948,6 +6956,7 @@ export enum EDBMasterConfigAppendTo {
|
|
|
6948
6956
|
* Available form control types for UI generation.
|
|
6949
6957
|
* Each control type has specific settings and behavior.
|
|
6950
6958
|
*/
|
|
6959
|
+
// genericConfig : start
|
|
6951
6960
|
export enum EDBMasterFormControl {
|
|
6952
6961
|
/** Single-line text input. */
|
|
6953
6962
|
input = 'input',
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## What Is This Project?
|
|
4
4
|
|
|
5
|
-
This is a repository for [API Maker](https://api-maker.com) — a custom backend framework. The local client syncs code between your IDE and the API Maker server in real time via WebSocket. All files under `src
|
|
5
|
+
This is a repository for [API Maker](https://api-maker.com) — a custom backend framework. The local client syncs code between your IDE and the API Maker server in real time via WebSocket. All files under `src/` are mirrored to and from the live server.
|
|
6
6
|
|
|
7
7
|
- `localClient.js` — Main sync process (WebSocket connection, file watcher, full-sync logic)
|
|
8
8
|
- `local-client.config.js` — Runtime configuration (`webSocketURL`, `syncToken`, `adminUserPath`)
|
|
9
9
|
- `am-types/types.ts` — Core TypeScript interfaces and enums used in all custom code
|
|
10
10
|
- `am-types/store-types.ts` — Type definitions specific to Third Party API config files
|
|
11
|
-
- `src
|
|
11
|
+
- `src/` — All API Maker entities, organized by category.
|
|
12
12
|
|
|
13
13
|
## Common notes
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ This is a repository for [API Maker](https://api-maker.com) — a custom backend
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
## Directory Structure: `src
|
|
24
|
+
## Directory Structure: `src/`
|
|
25
25
|
|
|
26
26
|
| Folder | Description |
|
|
27
27
|
|---|---|
|
|
@@ -643,7 +643,7 @@ find: { "ages": { "$elemMatch": { "age": { "$gte": 30 }, "birth_year": { "$lte":
|
|
|
643
643
|
|
|
644
644
|
## Schema: Validations & Conversions
|
|
645
645
|
|
|
646
|
-
-- Schema files (in `src/
|
|
646
|
+
-- Schema files (in `src/Schemas/`) define TypeScript configuration used for validation, conversion, and type definitions.
|
|
647
647
|
-- Do not create empty object. You can go nested for nested properties when database type is mongodb.
|
|
648
648
|
-- For mongodb type, use "_id: EType.objectId" as primary key and as a unique identifier. Do not generate any other id.
|
|
649
649
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a0_0x104f(){const _0x507b=['Connection\x20closed.','onmessage','shutdownAndExit','database-hooks','push','startWatch','\x20The\x20local\x20client\x20will\x20pull\x20the\x20latest\x20changes\x20from\x20the\x20server\x20and\x20keep\x20them\x20synchronized\x20between\x20the\x20IDE\x20and\x20the\x20server.','nodeModulesInstalled','unlinkSync','onclose','am_groups','am_tp_api_settings','readdir','length','resolve','\x1b[0m','types','Events','EVENTS','72960PDTHHQ','fsMkDir','DB_MASTERS','Error\x20while\x20connecting\x20to\x20WS\x20server.','GROUPS','addDir','ProcessInitializers','Node.js\x2022+\x20is\x20required.\x20Current\x20version:\x20','addProcessHooks','Schemas','listeners','checkForNodeVersion','275289RGTkkt','watch\x20handler\x20error','mkdir','fsIsFileContentSame','padStart','getCategoryOfPath','COLLECTION_HOOKS','——————————————————————————————————————\x20Note\x20——————————————————————————————————————','18vkMXGU','src','getSeconds','LOG_PROFILES','——————————————————————————————————————————————————————————————————————————————————','⏳\x20node_modules\x20installation\x20process\x20started','getMinutes','Watcher\x20error:','collection-hooks','chokidar@4.0.3','2116590jiSYkB','base64','normalizePath','executeNpmRun','89190FUemSy','SYSTEM_API_HOOKS','removeEmptyDirsSync','LC_FOLDER_CHANGED_ON_LOCAL_SYSTEM','connectToServerViaWS','npm','replace','16lRBdUy','exports','INSTANCES','relative','printNotesToProvideLocalClient','writeMemfsJsonToDisk','entries','WEB_SOCKET_EVENT','process-initializers','am_tp_installed_apis','message','✅\x20Dependencies\x20installed','am_system_api_hooks','CustomApis','\x1b[36m','WebSocket\x20events','onopen','Failed\x20to\x20start\x20the\x20npm\x20process:\x20','Third\x20party\x20APIs','getChangedFolder','processReceivedEvent','am_system_api_settings','WebSocketEvents','stringify','performFullSync','Collection\x20hooks','getCurrentTime','DELETE_ALL','toString','am_log_profiles','SIGTERM','SystemApiHooks','Database\x20migrations','fsRemoveFile','am_database_hooks','webSocketURL','rmdirSync','am_database_migrations','existsSync','LC_DATA_REQ_RES','cyanStart','versions','config','SystemApiSettings','CONNECTED','PROCESS_INITIALIZERS','filter','serializeFolderWithBinary','Instance\x20hooks','Failed\x20to\x20restart\x20watcher\x20after\x20full\x20sync','start','change','6nFgTmG','content','join','unlink','SYSTEM_APIS','buildUnixPathMap','tests','name','instance-api-hooks','onerror','./local-client.config','am_schemas','LC_DATA_MODIFIED_IN_DATABASE','endsWith','API_USERS','schedulers','Error\x20closing\x20watcher\x20before\x20full\x20sync','projectDirectory','Schedulers','6421LgLnGF','shuttingDown','am_utility_classes','1503441VehTHF','repo','.js','startsWith','THIRD_PARTY_API_SETTINGS','instance-hooks','LC_SEND_ALL_DATA','am_web_socket_events','getChangedFolderForDeleted','readdirSync','system-api-hooks','am_api_users','watcher','UNKNOWN','NOTIFICATION','\x20Current\x20Dir\x20:\x20','slice','chokidar','Log\x20profiles','\x20Please\x20provide\x20settings\x20in\x20:\x20','\x1b[38;2;255;165;0m','response','uncaughtException','UIMakerUtils','Instances','InstanceHooks','ui-maker-pages','InstanceApiSettings','warn','AmEvents','am_instance_api_hooks','DB\x20master\x20utils','DB\x20masters','db-migrations','invalidOnEvents','statSync','third-party-apis','PUT','UTILITY_CLASSES','then','apply','DELETE','sendToServer','937224lfwYQX','all','--force','INSTANCE_HOOKS','data','API\x20users','SYSTEM_API_SETTINGS','printNotes','spawn','events','split','am_ui_maker_styles','✓\x20Send\x20:\x20[','am_custom_apis','add','✓\x20Receive\x20:\x20[','✅\x20node_modules\x20installed','Test\x20cases','skipWatchInputs','debounce','POST','close','System\x20API\x20hooks','Utility\x20classes','CollectionHooks','watch','11GusxAA','beforeExit','am_db_masters','skipFileWritingForLocal','custom-apis','bind','orangeStart','syncAllDataWithServer',']\x20:\x20','pre-hooks','db-interfaces.d.ts','?authTokenInfo=ws-local-client-sync&authorization=','link','DATABASE_HOOKS','TOKEN_VALIDATION','syncToken','DatabaseHooks','TEST_CASES','colorEnd','--no-save','sendDeletedEventToServerInternal','undefined','ApiUsers','mkdirSync','am-types','fsWriteFile','SCHEMAS','sendDeletedEventToServerDebounce','AmTestCases','errors','am_collection_hooks','promises','am_events','web-socket-events','UNREGISTER','unlinkDir','am_ui_maker_utils','✓\x20Remove\x20:\x20[','readDirCustom','eventData','CUSTOM_APIS','THIRD_PARTY_APIS','normalize','unhandledRejection','connected','localClientPath','eventType','Instance\x20API\x20hooks','PUT_REPLACE','DB_MIGRATIONS','log','REGISTER','error','appRoot','INSTANCE_API_HOOKS','Process\x20initializers','sep','install','INSTANCE_API_SETTINGS','am_tp_api_versions','parse','System\x20API\x20settings','installRequiredPackages','schemas','fsExistsSync','adminUserPath','DBMasters','Third\x20party\x20API\x20settings','\x27\x20exited\x20with\x20code\x20','exit','Custom\x20APIs','ui-maker-styles','i18ns','✅\x20Local\x20client\x20started...','fullSyncCounter','Groups','child_process','→\x20Skip\x20(unchanged)\x20:\x20[','validOnEvents','am_instances','⏳\x20Connecting\x20to\x20server...','isDirectory','EVENTS_WS','send','type','Database\x20hooks','fsReadDir','from'];a0_0x104f=function(){return _0x507b;};return a0_0x104f();}function a0_0x44bf(_0x3b6ea0,_0x113180){_0x3b6ea0=_0x3b6ea0-0x134;const _0x104fa6=a0_0x104f();let _0x44bf7e=_0x104fa6[_0x3b6ea0];return _0x44bf7e;}(function(_0x3709cd,_0x367e0a){const _0x45e8bb=a0_0x44bf,_0x1f41a0=_0x3709cd();while(!![]){try{const _0x3779d3=-parseInt(_0x45e8bb(0x172))/0x1*(-parseInt(_0x45e8bb(0x239))/0x2)+parseInt(_0x45e8bb(0x225))/0x3*(parseInt(_0x45e8bb(0x24e))/0x4)+-parseInt(_0x45e8bb(0x247))/0x5+parseInt(_0x45e8bb(0x15f))/0x6*(parseInt(_0x45e8bb(0x231))/0x7)+-parseInt(_0x45e8bb(0x1a0))/0x8+-parseInt(_0x45e8bb(0x175))/0x9+parseInt(_0x45e8bb(0x243))/0xa*(parseInt(_0x45e8bb(0x1ba))/0xb);if(_0x3779d3===_0x367e0a)break;else _0x1f41a0['push'](_0x1f41a0['shift']());}catch(_0x6114ad){_0x1f41a0['push'](_0x1f41a0['shift']());}}}(a0_0x104f,0x1964f),((()=>{'use strict';var _0x439bb9={0x3(_0x430782){_0x430782['exports']=require('path');},0xe7(_0x594671){const _0x1420d8=a0_0x44bf;_0x594671[_0x1420d8(0x24f)]=require(_0x1420d8(0x186));},0x13d(_0x5426c4){const _0x42c465=a0_0x44bf;_0x5426c4[_0x42c465(0x24f)]=require(_0x42c465(0x206));},0x380(_0x3d4cf7){const _0x2724e1=a0_0x44bf;_0x3d4cf7[_0x2724e1(0x24f)]=require('fs');}},_0x37e0a9={};function _0x7e3d1d(_0x51d457){const _0x3b82b7=a0_0x44bf;var _0x4d4ea0=_0x37e0a9[_0x51d457];if(void 0x0!==_0x4d4ea0)return _0x4d4ea0[_0x3b82b7(0x24f)];var _0x4dbacb=_0x37e0a9[_0x51d457]={'exports':{}};return _0x439bb9[_0x51d457](_0x4dbacb,_0x4dbacb['exports'],_0x7e3d1d),_0x4dbacb[_0x3b82b7(0x24f)];}((()=>{const _0x2fd277=a0_0x44bf,_0x192f1e=_0x7e3d1d(0x380),_0x28c35e=_0x7e3d1d(0x3),_0x5b527d=_0x7e3d1d(0x13d);var _0x55e0e1,_0x1f0bf7,_0x5b3907,_0x2eee99,_0x3f7ae8,_0x182f0c;new class{constructor(){const _0x1e4165=a0_0x44bf;this['EL']=!0x0,this[_0x1e4165(0x1ef)]=_0x28c35e[_0x1e4165(0x220)](''),this[_0x1e4165(0x170)]='',this['C']={'localClientPath':_0x1e4165(0x169),'src':_0x1e4165(0x23a),'repo':_0x1e4165(0x176),'types':_0x1e4165(0x222),'amTypes':_0x1e4165(0x1d2),'versions':_0x1e4165(0x154),'apis':'apis','listeners':_0x1e4165(0x22f),'postHooks':'post-hooks','preHooks':_0x1e4165(0x1c3),'dbInterfacesFile':_0x1e4165(0x1c4),'UtilityClassesReadF':_0x1e4165(0x1b7),'CustomApiReadF':_0x1e4165(0x200),'SchedulersReadF':_0x1e4165(0x171),'WebSocketEventsReadF':_0x1e4165(0x13a),'SchemaReadF':'Schemas','DBMigrationsReadF':_0x1e4165(0x14b),'ProcessInitializersReadF':_0x1e4165(0x1f1),'ProcessI18NReadF':_0x1e4165(0x202),'DBMastersReadF':'DB\x20masters','DBMasterStylesReadF':'UI\x20maker\x20styles','DBMasterUtilsReadF':_0x1e4165(0x194),'TestCasesReadF':_0x1e4165(0x1b1),'ThirdPartyApiReadF':'Third\x20party\x20APIs','EventsReadF':_0x1e4165(0x223),'InstanceApiHooksReadF':_0x1e4165(0x1e9),'SystemApiHooksReadF':_0x1e4165(0x1b6),'CollectionHooksReadF':_0x1e4165(0x144),'DatabaseHooksReadF':_0x1e4165(0x20f),'InstanceHooksReadF':_0x1e4165(0x15b),'CustomApisWriteF':_0x1e4165(0x1be),'SchedulersWriteF':_0x1e4165(0x16e),'WebSocketEventsWriteF':_0x1e4165(0x1db),'SchemaWriteF':_0x1e4165(0x1f9),'DBMigrationsWriteF':_0x1e4165(0x196),'ProcessInitializersWriteF':_0x1e4165(0x256),'ProcessI18NWriteF':'i18ns','DBMastersWriteF':_0x1e4165(0x18f),'DBMasterStylesWriteF':_0x1e4165(0x201),'DBMasterUtilsWriteF':'ui-maker-utils','TestCasesWriteF':_0x1e4165(0x165),'ThirdPartyApiWriteF':_0x1e4165(0x199),'EventsWriteF':_0x1e4165(0x1a9),'InstanceApiHooksWriteF':_0x1e4165(0x167),'SystemApiHooksWriteF':_0x1e4165(0x17f),'CollectionHooksWriteF':_0x1e4165(0x241),'DatabaseHooksWriteF':_0x1e4165(0x215),'InstanceHooksWriteF':_0x1e4165(0x17a)},this[_0x1e4165(0x1b2)]=!0x1,this[_0x1e4165(0x1bd)]={},this['nodeModulesInstalled']=!0x1,this['orangeStart']=_0x1e4165(0x189),this[_0x1e4165(0x153)]=_0x1e4165(0x139),this[_0x1e4165(0x1cc)]=_0x1e4165(0x221),this[_0x1e4165(0x204)]=0x0,this[_0x1e4165(0x1d5)]=this[_0x1e4165(0x1b3)](this[_0x1e4165(0x1ce)],0x1f4);}async[_0x2fd277(0x15d)](){const _0x5e7bbe=_0x2fd277;this[_0x5e7bbe(0x22d)](),this[_0x5e7bbe(0x230)](),this[_0x5e7bbe(0x1fa)](this['C'][_0x5e7bbe(0x1e7)]+'.js')||(this[_0x5e7bbe(0x252)](),this[_0x5e7bbe(0x214)](0x1)[_0x5e7bbe(0x19c)]()),this[_0x5e7bbe(0x155)]=require(this['C'][_0x5e7bbe(0x1e7)])(),await this[_0x5e7bbe(0x1a7)](),this[_0x5e7bbe(0x249)](_0x28c35e[_0x5e7bbe(0x161)](this[_0x5e7bbe(0x1ef)],this['C'][_0x5e7bbe(0x23a)])),await this[_0x5e7bbe(0x24b)]();}['checkForNodeVersion'](){const _0x209693=_0x2fd277,_0xff4dd=process['version'];parseInt(_0xff4dd[_0x209693(0x1aa)]('.')[0x0][_0x209693(0x24d)]('v',''),0xa)<0x16&&(console[_0x209693(0x1ee)](this[_0x209693(0x1c0)]+_0x209693(0x22c)+_0xff4dd+this['colorEnd']),this['shutdownAndExit'](0x1)[_0x209693(0x19c)]());}async[_0x2fd277(0x1a7)](){const _0x1ce268=_0x2fd277;console['log'](this[_0x1ce268(0x1c0)]),console[_0x1ce268(0x1ec)](_0x1ce268(0x238)),console['log'](_0x1ce268(0x218)),console[_0x1ce268(0x1ec)](_0x1ce268(0x184)+this[_0x1ce268(0x1ef)]),console['log'](_0x1ce268(0x23d)),console[_0x1ce268(0x1ec)](this[_0x1ce268(0x1cc)]),console['log']('');}['printNotesToProvideLocalClient'](){const _0x3194cf=_0x2fd277;console['log'](_0x3194cf(0x189)),console[_0x3194cf(0x1ec)](_0x3194cf(0x188)+this['C']['localClientPath']+_0x3194cf(0x177)),console[_0x3194cf(0x1ec)](_0x3194cf(0x221)),console[_0x3194cf(0x1ec)]('');}async[_0x2fd277(0x1f8)](){const _0x50d48d=_0x2fd277;console[_0x50d48d(0x1ec)]('⏳\x20Dependencies\x20installation\x20process\x20started');try{_0x192f1e[_0x50d48d(0x21a)](_0x28c35e[_0x50d48d(0x161)](this['appRoot'],'package-lock.json'));}catch(_0x5a47a2){}await this[_0x50d48d(0x246)](_0x50d48d(0x24c),[_0x50d48d(0x1f3),_0x50d48d(0x1cd),_0x50d48d(0x242)]),this[_0x50d48d(0x219)]=!0x0,console['log'](_0x50d48d(0x136));}async[_0x2fd277(0x246)](_0x415026,_0x1a9bd9){return new Promise((_0x771135,_0x576d0e)=>{const _0xa0137a=a0_0x44bf,_0x61493c=(0x0,_0x5b527d[_0xa0137a(0x1a8)])(_0x415026,_0x1a9bd9,{'shell':!0x0,'cwd':this['appRoot']});_0x61493c['on'](_0xa0137a(0x1b5),_0x547ba8=>{const _0xdc204a=_0xa0137a;if(0x0===_0x547ba8)setTimeout(_0x771135,0x3e8);else{const _0x46d68d='\x27'+_0x415026+'\x20'+_0x1a9bd9[_0xdc204a(0x161)]('\x20')+_0xdc204a(0x1fe)+_0x547ba8+'.';_0x576d0e(new Error(_0x46d68d));}}),_0x61493c['on']('error',_0x30c94d=>{const _0x3cbf8b=_0xa0137a;console[_0x3cbf8b(0x1ee)](_0x3cbf8b(0x13c)+_0x30c94d[_0x3cbf8b(0x135)]),_0x576d0e(_0x30c94d);});});}async[_0x2fd277(0x217)](){const _0x32f0a1=_0x2fd277;this[_0x32f0a1(0x219)]||await this[_0x32f0a1(0x1f8)]();const _0x49f9e9=await Promise[_0x32f0a1(0x220)]()['then'](()=>_0x7e3d1d(0xe7)),_0x75436=_0x28c35e['join'](this[_0x32f0a1(0x1ef)]),_0x21002f=_0x28c35e[_0x32f0a1(0x161)](this[_0x32f0a1(0x1ef)],this['C'][_0x32f0a1(0x23a)]),_0x318146=_0x3ff6bb=>{const _0x1868a4=_0x32f0a1,_0x5c6914=_0x28c35e[_0x1868a4(0x251)](_0x75436,_0x3ff6bb);return!(_0x5c6914&&!_0x5c6914[_0x1868a4(0x178)]('.')&&!_0x5c6914[_0x1868a4(0x16c)]('~')&&_0x5c6914['startsWith'](this['C'][_0x1868a4(0x23a)]));},_0x467605=_0x49f9e9[_0x32f0a1(0x1b9)](_0x21002f,{'persistent':!0x0,'ignoreInitial':!0x0,'depth':0x1/0x0,'awaitWriteFinish':{'stabilityThreshold':0xc8,'pollInterval':0x64}}),_0x5d95c0=async(_0x4ad8fb,_0x36f463)=>{const _0x5e5b89=_0x32f0a1;try{if(this[_0x5e5b89(0x1b2)])return;const _0x288341=_0x28c35e[_0x5e5b89(0x251)](_0x75436,_0x36f463);if(!_0x36f463||_0x318146(_0x36f463))return;console[_0x5e5b89(0x1ec)](_0x5e5b89(0x1ac)+this[_0x5e5b89(0x145)]()+']\x20:\x20['+_0x4ad8fb+_0x5e5b89(0x1c2)+_0x288341);const _0x284f66=this[_0x5e5b89(0x236)](_0x288341),_0x29cd7f=this[_0x5e5b89(0x13e)](_0x284f66,_0x288341);if(!_0x29cd7f)return;let _0x225fde,_0x1b1b99=!0x1;if(this[_0x5e5b89(0x1fa)](_0x29cd7f)){if(this[_0x5e5b89(0x1fa)](_0x28c35e[_0x5e5b89(0x161)](_0x75436,_0x288341))){const _0x5c61bb=_0x28c35e[_0x5e5b89(0x161)](_0x28c35e[_0x5e5b89(0x1f2)]+this['C'][_0x5e5b89(0x176)],_0x29cd7f);_0x225fde=await this[_0x5e5b89(0x15a)](_0x29cd7f,_0x5c61bb),this[_0x5e5b89(0x19f)]({'objType':_0x1f0bf7[_0x5e5b89(0x152)],'localClientWSReqRes':{'eventType':_0x5b3907[_0x5e5b89(0x24a)],'folderChangedOnLocalSystem':_0x225fde,'category':_0x284f66,'shouldReplaceAllItemsOfCategory':_0x1b1b99}});}else this[_0x5e5b89(0x1c1)]();}else{const _0x5209fa=this[_0x5e5b89(0x17d)](_0x284f66,_0x288341),_0x392241=_0x28c35e[_0x5e5b89(0x161)](_0x28c35e[_0x5e5b89(0x1f2)]+this['C']['repo'],_0x5209fa);_0x225fde=await this[_0x5e5b89(0x15a)](_0x5209fa,_0x392241),_0x1b1b99=!0x0,this[_0x5e5b89(0x1d5)](_0x225fde,_0x284f66,_0x1b1b99);}}catch(_0x408edc){console[_0x5e5b89(0x1ee)](_0x5e5b89(0x232),_0x408edc);}};_0x467605['on'](_0x32f0a1(0x1ae),_0x298d2c=>_0x5d95c0(_0x32f0a1(0x1ae),_0x298d2c))['on']('change',_0x17d87d=>_0x5d95c0(_0x32f0a1(0x15e),_0x17d87d))['on'](_0x32f0a1(0x162),_0x58f58a=>_0x5d95c0('unlink',_0x58f58a))['on'](_0x32f0a1(0x22a),_0x47071d=>_0x5d95c0(_0x32f0a1(0x22a),_0x47071d))['on'](_0x32f0a1(0x1dd),_0x19cc2e=>_0x5d95c0(_0x32f0a1(0x1dd),_0x19cc2e))['on']('error',_0x261994=>console[_0x32f0a1(0x1ee)](_0x32f0a1(0x240),_0x261994)),this['watcher']=_0x467605,0x1===this[_0x32f0a1(0x204)]&&console[_0x32f0a1(0x1ec)](_0x32f0a1(0x203));}[_0x2fd277(0x145)](){const _0x522755=_0x2fd277,_0xe6e7d5=new Date();return String(_0xe6e7d5['getHours']())['padStart'](0x2,'0')+':'+String(_0xe6e7d5[_0x522755(0x23f)]())[_0x522755(0x235)](0x2,'0')+':'+String(_0xe6e7d5[_0x522755(0x23b)]())[_0x522755(0x235)](0x2,'0');}['sendDeletedEventToServerInternal'](_0x9ea6bc,_0x1ba2db,_0x245989){const _0x300172=_0x2fd277;this[_0x300172(0x19f)]({'objType':_0x1f0bf7['LC_DATA_REQ_RES'],'localClientWSReqRes':{'eventType':_0x5b3907[_0x300172(0x24a)],'folderChangedOnLocalSystem':_0x9ea6bc,'category':_0x1ba2db,'shouldReplaceAllItemsOfCategory':_0x245989}});}[_0x2fd277(0x1b3)](_0x5f16f9,_0x224c7e){let _0x314819=null;return function(..._0x49e9fa){clearTimeout(_0x314819),_0x314819=setTimeout(()=>{const _0x2d7dab=a0_0x44bf;_0x5f16f9[_0x2d7dab(0x19d)](this,_0x49e9fa);},_0x224c7e);};}[_0x2fd277(0x236)](_0x55d919){const _0x5c4ce5=_0x2fd277,_0x11c7b0=_0x28c35e[_0x5c4ce5(0x161)](this['C'][_0x5c4ce5(0x23a)],this[_0x5c4ce5(0x155)][_0x5c4ce5(0x1fb)]);if(!_0x55d919[_0x5c4ce5(0x178)](_0x11c7b0))return;const _0x30ee59=_0x55d919['split'](_0x28c35e[_0x5c4ce5(0x1f2)])[_0x5c4ce5(0x159)](_0x330b60=>!!_0x330b60)[0x2];for(const _0x248b49 in _0x182f0c)if(_0x182f0c[_0x248b49]===_0x30ee59)return _0x30ee59;}['getChangedFolder'](_0x48b7d8,_0xc7d722){const _0x1ffc84=_0x2fd277,_0x3b44eb=_0xc7d722[_0x1ffc84(0x1aa)](_0x28c35e[_0x1ffc84(0x1f2)]);let _0x2bca5d='';return _0x2bca5d=_0x48b7d8===_0x182f0c[_0x1ffc84(0x1e3)]?_0x3b44eb[_0x1ffc84(0x185)](0x0,0x6)[_0x1ffc84(0x161)](_0x28c35e['sep']):_0x3b44eb['slice'](0x0,0x4)[_0x1ffc84(0x161)](_0x28c35e[_0x1ffc84(0x1f2)]),_0x2bca5d;}['getChangedFolderForDeleted'](_0x335910,_0x18328c){const _0x45ff68=_0x2fd277;return _0x18328c[_0x45ff68(0x1aa)](_0x28c35e['sep'])[_0x45ff68(0x185)](0x0,0x3)[_0x45ff68(0x161)](_0x28c35e['sep']);}async[_0x2fd277(0x15a)](_0x379125,_0x1ce64d){const _0x2e014e={},_0x34948a=this;return await async function _0xae254b(_0x32a965){const _0x212edf=a0_0x44bf,_0x2d1d0b=await _0x34948a['readDirCustom'](_0x32a965,{'withFileTypes':!0x0});for(const _0x99e4f5 of _0x2d1d0b){const _0x2f150e=_0x28c35e[_0x212edf(0x161)](_0x32a965,_0x99e4f5['name']),_0x782b24=_0x28c35e[_0x212edf(0x1e4)](_0x2f150e);if(_0x99e4f5[_0x212edf(0x20b)]())await _0xae254b(_0x782b24);else{const _0x1e5adf=_0x192f1e['readFileSync'](_0x782b24),_0x5baaae=_0x28c35e['relative'](_0x379125,_0x782b24),_0x2329e4=_0x28c35e[_0x212edf(0x161)](_0x1ce64d,_0x5baaae)[_0x212edf(0x1aa)](_0x28c35e['sep'])[_0x212edf(0x161)](_0x28c35e['posix']['sep']);_0x2e014e[_0x2329e4]={'encoding':_0x212edf(0x244),'content':_0x1e5adf['toString'](_0x212edf(0x244))};}}}(_0x379125),_0x2e014e;}['sendToServer'](_0x44bd22){const _0x4de4d7=_0x2fd277;try{this['ws'][_0x4de4d7(0x20d)](JSON[_0x4de4d7(0x142)](_0x44bd22));}catch(_0x27e503){console['log'](_0x27e503);}}async[_0x2fd277(0x24b)](){const _0x1e3eb6=_0x2fd277;console['log'](_0x1e3eb6(0x20a));const _0x5a0825=this[_0x1e3eb6(0x155)][_0x1e3eb6(0x1c9)],_0x5332d8=this[_0x1e3eb6(0x155)][_0x1e3eb6(0x1fb)],_0x843218=this[_0x1e3eb6(0x155)][_0x1e3eb6(0x14e)];this['ws']=new WebSocket(_0x843218+_0x1e3eb6(0x1c5)+_0x5a0825+'&user-path='+_0x5332d8);const _0x2091db=[],_0x397d9b=()=>{const _0x5a86e6=_0x1e3eb6;this[_0x5a86e6(0x19f)]({'objType':_0x1f0bf7[_0x5a86e6(0x1ed)],'onEvents':[{'eventType':'LOCAL_CLIENT_SYNC_EVENTS'}]});};function _0x3091e3(_0x1b69f3){const _0x1d2ed0=_0x1e3eb6;_0x1b69f3[_0x1d2ed0(0x13b)]=null,_0x1b69f3[_0x1d2ed0(0x213)]=null,_0x1b69f3[_0x1d2ed0(0x168)]=null,_0x1b69f3['onclose']=null,_0x1b69f3[_0x1d2ed0(0x1b5)]();}this['ws'][_0x1e3eb6(0x213)]=async _0x204109=>{const _0x35d6ac=_0x1e3eb6,_0x2268ea=JSON[_0x35d6ac(0x1f6)](_0x204109[_0x35d6ac(0x1a4)]);if(_0x2268ea[_0x35d6ac(0x20e)]===_0x1f0bf7[_0x35d6ac(0x157)]&&_0x2268ea['response'][_0x35d6ac(0x1e6)])_0x397d9b();else{if(_0x2268ea[_0x35d6ac(0x20e)]===_0x1f0bf7[_0x35d6ac(0x1ed)]){if(_0x2268ea?.[_0x35d6ac(0x18a)]?.[_0x35d6ac(0x208)]?.['length']){for(const _0xb04d27 of _0x2268ea['response']['validOnEvents'])_0x2091db[_0x35d6ac(0x216)](_0xb04d27);console[_0x35d6ac(0x1ec)]('✅\x20Connected\x20to\x20server\x20via\x20WS'),this['watcher']||await this[_0x35d6ac(0x217)](),this[_0x35d6ac(0x1c1)]();}else{const _0x18a614=_0x2268ea['response']?.[_0x35d6ac(0x197)]?.[0x0]?.[_0x35d6ac(0x1d7)]?.[0x0]?.[_0x35d6ac(0x135)]||_0x35d6ac(0x228);console['log']('❌\x20'+_0x18a614),await this[_0x35d6ac(0x214)](0x1);}}else await this['processReceivedEvent'](_0x2268ea);}},this['ws'][_0x1e3eb6(0x21b)]=_0x332806=>{const _0x9eb7d8=_0x1e3eb6;console[_0x9eb7d8(0x1ec)](_0x9eb7d8(0x212)),_0x3091e3(this['ws']),setTimeout(this[_0x9eb7d8(0x24b)][_0x9eb7d8(0x1bf)](this),0xbb8);},this['ws'][_0x1e3eb6(0x168)]=()=>{const _0x4ac8fd=_0x1e3eb6;_0x3091e3(this['ws']),setTimeout(this['connectToServerViaWS'][_0x4ac8fd(0x1bf)](this),0xbb8);};}[_0x2fd277(0x1c1)](){const _0x4e13ef=_0x2fd277;this[_0x4e13ef(0x19f)]({'objType':_0x1f0bf7[_0x4e13ef(0x152)],'localClientWSReqRes':{'eventType':_0x5b3907[_0x4e13ef(0x17b)]}});}async[_0x2fd277(0x13f)](_0x1f271e){const _0x48c4c0=_0x2fd277;if(this['EL']&&_0x1f271e['response'][_0x48c4c0(0x1e8)]!==_0x5b3907['LC_SEND_ALL_DATA']&&console[_0x48c4c0(0x1ec)](_0x1f271e),_0x1f271e['type']===_0x1f0bf7[_0x48c4c0(0x152)]){if(_0x1f271e[_0x48c4c0(0x1d7)]?.[_0x48c4c0(0x21f)])return void console[_0x48c4c0(0x1ee)](_0x1f271e[_0x48c4c0(0x1d7)]);if(_0x1f271e[_0x48c4c0(0x18a)][_0x48c4c0(0x1e8)]===_0x5b3907[_0x48c4c0(0x17b)]){console[_0x48c4c0(0x1ec)]('✅\x20Full\x20Sync\x20:\x20['+this['getCurrentTime']()+']'),this['fullSyncCounter']++;try{this[_0x48c4c0(0x181)]&&(await this[_0x48c4c0(0x181)][_0x48c4c0(0x1b5)](),this[_0x48c4c0(0x181)]=null);}catch(_0x4d35f4){console['warn'](_0x48c4c0(0x16f),_0x4d35f4);}await this['performFullSync'](_0x1f271e);try{await this[_0x48c4c0(0x217)]();}catch(_0x582a8c){console[_0x48c4c0(0x1ee)](_0x48c4c0(0x15c),_0x582a8c);}}else{if(_0x1f271e[_0x48c4c0(0x18a)][_0x48c4c0(0x1e8)]===_0x5b3907[_0x48c4c0(0x16b)]){const _0x1a1943=_0x1f271e['response'][_0x48c4c0(0x1e1)];await this[_0x48c4c0(0x253)](_0x1a1943[_0x48c4c0(0x1a4)],this[_0x48c4c0(0x1ef)]);}}!0x1===this[_0x48c4c0(0x219)]&&(console['log'](_0x48c4c0(0x23e)),await this[_0x48c4c0(0x246)](_0x48c4c0(0x24c),['install',_0x48c4c0(0x1a2)]),console[_0x48c4c0(0x1ec)](_0x48c4c0(0x1b0)),this[_0x48c4c0(0x219)]=!0x0);}}async[_0x2fd277(0x143)](_0x29b46a){const _0x137f11=_0x2fd277,_0x4bd679=await this[_0x137f11(0x164)](_0x28c35e[_0x137f11(0x161)](this[_0x137f11(0x1ef)],this['C'][_0x137f11(0x23a)])),_0x18611d=_0x29b46a['response']['eventData'],_0xd0bd80='/'+this['C'][_0x137f11(0x176)];for(const [_0x19f7de,_0x5d0898]of _0x4bd679){const _0x55ef57=_0x19f7de[_0x137f11(0x24d)](this[_0x137f11(0x1ef)],_0xd0bd80);if(!_0x18611d[_0x55ef57]){const _0x860ca2=_0x55ef57['replace']('/'+this['C']['repo'],''),_0x35171e=_0x28c35e[_0x137f11(0x161)](this[_0x137f11(0x1ef)],_0x860ca2[_0x137f11(0x24d)](/^\//,''));await this['fsRemoveFile'](_0x35171e),this['EL']&&console[_0x137f11(0x1ec)](_0x137f11(0x1df)+this['getCurrentTime']()+_0x137f11(0x1c2)+_0x35171e[_0x137f11(0x24d)](this[_0x137f11(0x1ef)],''));}}await this[_0x137f11(0x253)](_0x18611d,this[_0x137f11(0x1ef)]),this[_0x137f11(0x249)](_0x28c35e[_0x137f11(0x161)](this['appRoot'],this['C'][_0x137f11(0x23a)]));}async[_0x2fd277(0x253)](_0x245388,_0x1a4043){const _0x35cd8a=_0x2fd277;this[_0x35cd8a(0x1b2)]=!0x0;let _0x2da501=[];const _0x351478=async()=>{const _0x5297b1=_0x35cd8a;_0x2da501[_0x5297b1(0x21f)]>0x0&&(await Promise[_0x5297b1(0x1a1)](_0x2da501),_0x2da501=[]);};for(const [_0x365d30,_0xae82ec]of Object[_0x35cd8a(0x254)](_0x245388)){if(!_0x365d30[_0x35cd8a(0x178)]('/'+this['C'][_0x35cd8a(0x176)]+'/'+this['C'][_0x35cd8a(0x23a)])&&!_0x365d30[_0x35cd8a(0x16c)]('tsconfig.json'))continue;const _0x5eda34=_0xae82ec,_0xd6b85=_0x365d30['replace']('/'+this['C'][_0x35cd8a(0x176)],'');if(this[_0x35cd8a(0x1bd)][_0xd6b85])continue;const _0xd5e34b=_0x28c35e[_0x35cd8a(0x161)](_0x1a4043,_0xd6b85['replace'](/^\//,'')),_0xb2319d=_0x28c35e['dirname'](_0xd5e34b),_0x27382a=async()=>{const _0x24c5f=_0x35cd8a;await this[_0x24c5f(0x226)](_0xb2319d,{'recursive':!0x0}),await this[_0x24c5f(0x234)](_0x1a4043,_0xd5e34b,_0x5eda34[_0x24c5f(0x160)])||(await this['fsWriteFile'](_0xd5e34b,_0x5eda34['content'],{'encoding':_0x24c5f(0x244)}),this['EL']&&console[_0x24c5f(0x1ec)](_0x24c5f(0x1af)+this[_0x24c5f(0x145)]()+_0x24c5f(0x1c2)+_0xd5e34b[_0x24c5f(0x24d)](_0x1a4043,'')));};_0x2da501[_0x35cd8a(0x216)](_0x27382a()),_0x2da501[_0x35cd8a(0x21f)]>=0x3e8&&await _0x351478();}await _0x351478(),setTimeout(()=>{const _0xff5a69=_0x35cd8a;this[_0xff5a69(0x1b2)]=!0x1;},0x3e8);}[_0x2fd277(0x249)](_0x4c0eff){const _0x317b5b=_0x2fd277,_0x8fad6=this[_0x317b5b(0x245)](_0x4c0eff);if(!this[_0x317b5b(0x1fa)](_0x8fad6))return!0x1;const _0x5941d8=_0x192f1e[_0x317b5b(0x17e)](_0x8fad6);let _0x2cfe4c=!0x0;for(const _0x423494 of _0x5941d8){const _0x3bc2e0=_0x28c35e[_0x317b5b(0x161)](_0x8fad6,_0x423494);_0x192f1e[_0x317b5b(0x198)](_0x3bc2e0)[_0x317b5b(0x20b)]()&&this[_0x317b5b(0x249)](_0x3bc2e0)||(_0x2cfe4c=!0x1);}return!!_0x2cfe4c&&(_0x192f1e[_0x317b5b(0x14f)](_0x8fad6),!0x0);}async[_0x2fd277(0x1e0)](_0x44a687,_0x9df28){const _0xb3f2e7=_0x2fd277;return this[_0xb3f2e7(0x1fa)](_0x44a687)?await this[_0xb3f2e7(0x210)](_0x44a687,_0x9df28):[];}[_0x2fd277(0x245)](_0x148a12){const _0x30c26e=_0x2fd277;return _0x28c35e[_0x30c26e(0x1e4)](_0x148a12);}['fsExistsSync'](_0xdb2059){const _0x3c6483=_0x2fd277,_0x3e5964=_0x28c35e[_0x3c6483(0x1e4)](_0xdb2059);return _0x192f1e[_0x3c6483(0x151)](_0x3e5964);}async['fsReadDir'](_0x2605a0,_0x59610c){const _0x4820b2=_0x2fd277,_0x1ee6a1=_0x28c35e['normalize'](_0x2605a0);return await _0x192f1e[_0x4820b2(0x1d9)]['readdir'](_0x1ee6a1,_0x59610c);}async['fsMkDir'](_0x22dc8a,_0x44b764){const _0x18e73a=_0x2fd277,_0xe34672=_0x28c35e[_0x18e73a(0x1e4)](_0x22dc8a);return await _0x192f1e['promises'][_0x18e73a(0x233)](_0xe34672,_0x44b764);}['fsMkDirSync'](_0xd13535,_0x193450){const _0x59d5e4=_0x2fd277,_0x3a0c7b=_0x28c35e[_0x59d5e4(0x1e4)](_0xd13535);return _0x192f1e[_0x59d5e4(0x1d1)](_0x3a0c7b,_0x193450);}async['fsReadFile'](_0x485bc2,_0x18acbf){const _0x47cea8=_0x2fd277,_0x5091e6=_0x28c35e[_0x47cea8(0x1e4)](_0x485bc2);return await _0x192f1e['promises']['readFile'](_0x5091e6,_0x18acbf);}async[_0x2fd277(0x1d3)](_0x48dece,_0x54b53c,_0x2625ad){const _0x59cfcc=_0x2fd277,_0x15b1e8=_0x28c35e[_0x59cfcc(0x1e4)](_0x48dece);return await _0x192f1e[_0x59cfcc(0x1d9)]['writeFile'](_0x15b1e8,_0x54b53c,_0x2625ad);}async[_0x2fd277(0x14c)](_0x5b7c47){const _0xbea761=_0x2fd277,_0x11654b=_0x28c35e[_0xbea761(0x1e4)](_0x5b7c47);return await _0x192f1e[_0xbea761(0x1d9)][_0xbea761(0x162)](_0x11654b);}async[_0x2fd277(0x234)](_0x51f849,_0x2045ff,_0x99cdc4){const _0x40450c=_0x2fd277;if(!this['fsExistsSync'](_0x2045ff))return!0x1;try{const _0x16b63d=await this['fsReadFile'](_0x2045ff);let _0x238cde;return _0x238cde=_0x40450c(0x1cf)!=typeof Buffer&&Buffer['isBuffer'](_0x16b63d)?_0x16b63d[_0x40450c(0x147)]('base64'):Buffer[_0x40450c(0x211)](_0x16b63d,'utf8')[_0x40450c(0x147)]('base64'),_0x238cde===_0x99cdc4&&(this['EL']&&console[_0x40450c(0x1ec)](_0x40450c(0x207)+this[_0x40450c(0x145)]()+_0x40450c(0x1c2)+_0x2045ff['replace'](_0x51f849,'')),!0x0);}catch(_0x441d39){return!0x1;}}async['fsLink'](_0xad27a5,_0xdc968b){const _0x3c082a=_0x2fd277,_0x168681=_0x28c35e[_0x3c082a(0x1e4)](_0xad27a5),_0x3aeb15=_0x28c35e['normalize'](_0xdc968b);try{return await _0x192f1e['promises'][_0x3c082a(0x1c6)](_0x168681,_0x3aeb15);}catch(_0x1523d4){console[_0x3c082a(0x191)](_0x1523d4);}}async[_0x2fd277(0x164)](_0x322ccf){const _0x4e85e0=new Map(),_0x40fbb9=_0x28c35e['resolve'](_0x322ccf),_0x1c95b0=async _0x4d923c=>{const _0x26eaf9=a0_0x44bf;let _0x157449=[];try{_0x157449=await _0x192f1e[_0x26eaf9(0x1d9)][_0x26eaf9(0x21e)](_0x4d923c,{'withFileTypes':!0x0});}catch(_0x1dc9f5){return;}for(const _0x4bee3d of _0x157449){const _0x41cbcc=_0x28c35e[_0x26eaf9(0x161)](_0x4d923c,_0x4bee3d[_0x26eaf9(0x166)]);if(_0x4bee3d['isDirectory']())await _0x1c95b0(_0x41cbcc);else{const _0x568102=_0x41cbcc[_0x26eaf9(0x1aa)](_0x28c35e[_0x26eaf9(0x1f2)])[_0x26eaf9(0x161)]('/');_0x4e85e0['set'](_0x568102,!0x0);}}};return await _0x1c95b0(_0x40fbb9),_0x4e85e0;}async[_0x2fd277(0x214)](_0x5bdad5=0x0){const _0xa3c264=_0x2fd277;if(!this[_0xa3c264(0x173)]){this['shuttingDown']=!0x0;try{this[_0xa3c264(0x181)]&&await this[_0xa3c264(0x181)]['close']();}catch(_0x22951e){console[_0xa3c264(0x1ee)]('Error\x20during\x20shutdown',_0x22951e);}finally{setTimeout(()=>process[_0xa3c264(0x1ff)](_0x5bdad5),0xc8);}}}[_0x2fd277(0x22d)](){const _0x3a0d67=_0x2fd277;process['on']('SIGINT',()=>{const _0x47988d=a0_0x44bf;console[_0x47988d(0x1ec)]('SIGINT\x20received\x20—\x20shutting\x20down'),this[_0x47988d(0x214)](0x0);}),process['on'](_0x3a0d67(0x149),()=>{const _0x5baa85=_0x3a0d67;console[_0x5baa85(0x1ec)]('SIGTERM\x20received\x20—\x20shutting\x20down'),this[_0x5baa85(0x214)](0x0);}),process['on'](_0x3a0d67(0x1bb),_0x18d236=>{const _0xa60168=_0x3a0d67;console[_0xa60168(0x1ec)](_0xa60168(0x1bb),_0x18d236);}),process['on'](_0x3a0d67(0x1ff),_0x3889f6=>{const _0x16e92b=_0x3a0d67;console['log'](_0x16e92b(0x1ff),_0x3889f6);}),process['on'](_0x3a0d67(0x18b),_0x1676ab=>{console['error']('uncaughtException',_0x1676ab),this['shutdownAndExit'](0x1);}),process['on'](_0x3a0d67(0x1e5),_0x7bbc81=>{const _0x27993b=_0x3a0d67;console[_0x27993b(0x1ee)](_0x27993b(0x1e5),_0x7bbc81),this[_0x27993b(0x214)](0x1);});}}()[_0x2fd277(0x15d)]()['then'](),function(_0x2389ed){const _0x1d3a05=_0x2fd277;_0x2389ed['INSTANCES']=_0x1d3a05(0x250),_0x2389ed[_0x1d3a05(0x1e3)]=_0x1d3a05(0x1e3),_0x2389ed[_0x1d3a05(0x1e2)]=_0x1d3a05(0x1e2),_0x2389ed[_0x1d3a05(0x163)]='SYSTEM_APIS',_0x2389ed[_0x1d3a05(0x255)]=_0x1d3a05(0x255);}(_0x55e0e1||(_0x55e0e1={})),function(_0x43b516){const _0x2601bb=_0x2fd277;_0x43b516[_0x2601bb(0x1ed)]=_0x2601bb(0x1ed),_0x43b516[_0x2601bb(0x1dc)]=_0x2601bb(0x1dc),_0x43b516['CONNECTED']=_0x2601bb(0x157),_0x43b516[_0x2601bb(0x182)]=_0x2601bb(0x182),_0x43b516[_0x2601bb(0x1c8)]='TOKEN_VALIDATION',_0x43b516[_0x2601bb(0x183)]='NOTIFICATION',_0x43b516[_0x2601bb(0x152)]=_0x2601bb(0x152);}(_0x1f0bf7||(_0x1f0bf7={})),function(_0x4ef7c0){const _0x5b0226=_0x2fd277;_0x4ef7c0['LC_SEND_ALL_DATA']=_0x5b0226(0x17b),_0x4ef7c0['LC_DATA_MODIFIED_IN_DATABASE']='LC_DATA_MODIFIED_IN_DATABASE',_0x4ef7c0['LC_FOLDER_CHANGED_ON_LOCAL_SYSTEM']=_0x5b0226(0x24a);}(_0x5b3907||(_0x5b3907={})),function(_0x5900f3){const _0x90b6f9=_0x2fd277;_0x5900f3[_0x90b6f9(0x1b4)]='POST',_0x5900f3['PUT']=_0x90b6f9(0x19a),_0x5900f3[_0x90b6f9(0x1ea)]=_0x90b6f9(0x1ea),_0x5900f3[_0x90b6f9(0x19e)]='DELETE',_0x5900f3[_0x90b6f9(0x146)]=_0x90b6f9(0x146);}(_0x2eee99||(_0x2eee99={})),function(_0x464a0a){const _0x4880f5=_0x2fd277;_0x464a0a[_0x4880f5(0x192)]=_0x4880f5(0x1da),_0x464a0a[_0x4880f5(0x141)]=_0x4880f5(0x17c),_0x464a0a[_0x4880f5(0x1fc)]=_0x4880f5(0x1bc),_0x464a0a[_0x4880f5(0x138)]=_0x4880f5(0x1ad),_0x464a0a[_0x4880f5(0x190)]='am_instance_api_settings',_0x464a0a['InstanceApiHooks']=_0x4880f5(0x193),_0x464a0a[_0x4880f5(0x18e)]='am_instance_hooks',_0x464a0a[_0x4880f5(0x1ca)]=_0x4880f5(0x14d),_0x464a0a[_0x4880f5(0x1b8)]=_0x4880f5(0x1d8),_0x464a0a['Schedulers']='am_schedulers',_0x464a0a[_0x4880f5(0x22e)]=_0x4880f5(0x16a),_0x464a0a['I18Ns']='am_i18ns',_0x464a0a[_0x4880f5(0x156)]=_0x4880f5(0x140),_0x464a0a[_0x4880f5(0x14a)]=_0x4880f5(0x137),_0x464a0a[_0x4880f5(0x21d)]=_0x4880f5(0x21d),_0x464a0a['am_tp_installed_apis']=_0x4880f5(0x134),_0x464a0a['am_tp_api_versions']=_0x4880f5(0x1f5),_0x464a0a['UtilityClasses']=_0x4880f5(0x174),_0x464a0a['DatabasesMigrations']=_0x4880f5(0x150),_0x464a0a[_0x4880f5(0x22b)]='am_process_initializers',_0x464a0a[_0x4880f5(0x18c)]=_0x4880f5(0x1de),_0x464a0a['UIMakerStyles']=_0x4880f5(0x1ab),_0x464a0a[_0x4880f5(0x1d6)]='am_test_cases',_0x464a0a[_0x4880f5(0x205)]=_0x4880f5(0x21c),_0x464a0a[_0x4880f5(0x1d0)]=_0x4880f5(0x180),_0x464a0a[_0x4880f5(0x18d)]=_0x4880f5(0x209),_0x464a0a['LogProfiles']=_0x4880f5(0x148);}(_0x3f7ae8||(_0x3f7ae8={})),function(_0x4859ff){const _0x4927d5=_0x2fd277;_0x4859ff[_0x4927d5(0x1e2)]=_0x4927d5(0x200),_0x4859ff[_0x4927d5(0x1eb)]='Database\x20migrations',_0x4859ff[_0x4927d5(0x158)]=_0x4927d5(0x1f1),_0x4859ff[_0x4927d5(0x224)]=_0x4927d5(0x223),_0x4859ff['I18NS']='i18ns',_0x4859ff[_0x4927d5(0x1f0)]='Instance\x20API\x20hooks',_0x4859ff[_0x4927d5(0x1a3)]=_0x4927d5(0x15b),_0x4859ff[_0x4927d5(0x1c7)]='Database\x20hooks',_0x4859ff[_0x4927d5(0x237)]='Collection\x20hooks',_0x4859ff[_0x4927d5(0x1f4)]='Instance\x20API\x20settings',_0x4859ff['SCHEDULERS']=_0x4927d5(0x171),_0x4859ff[_0x4927d5(0x1d4)]=_0x4927d5(0x22e),_0x4859ff[_0x4927d5(0x248)]=_0x4927d5(0x1b6),_0x4859ff[_0x4927d5(0x1a6)]=_0x4927d5(0x1f7),_0x4859ff[_0x4927d5(0x1cb)]='Test\x20cases',_0x4859ff[_0x4927d5(0x1e3)]=_0x4927d5(0x13d),_0x4859ff[_0x4927d5(0x179)]=_0x4927d5(0x1fd),_0x4859ff[_0x4927d5(0x19b)]=_0x4927d5(0x1b7),_0x4859ff[_0x4927d5(0x20c)]=_0x4927d5(0x13a),_0x4859ff[_0x4927d5(0x227)]=_0x4927d5(0x195),_0x4859ff['UI_MAKER_UTILITY_CLASS']='DB\x20master\x20utils',_0x4859ff['UI_MAKER_STYLES']='UI\x20maker\x20styles',_0x4859ff[_0x4927d5(0x229)]=_0x4927d5(0x205),_0x4859ff[_0x4927d5(0x16d)]=_0x4927d5(0x1a5),_0x4859ff[_0x4927d5(0x250)]='Instances',_0x4859ff[_0x4927d5(0x23c)]=_0x4927d5(0x187);}(_0x182f0c||(_0x182f0c={}));})());})()));
|
|
1
|
+
function a0_0x539e(_0x1be361,_0x2a10ac){_0x1be361=_0x1be361-0x7d;const _0x22f242=a0_0x22f2();let _0x539e7b=_0x22f242[_0x1be361];return _0x539e7b;}function a0_0x22f2(){const _0x5aa8f9=['86704liaTUV','TEST_CASES','✓\x20Send\x20:\x20[','SYSTEM_APIS','system-api-hooks','\x1b[0m','writeMemfsJsonToDisk','endsWith','EVENTS_WS','webSocketURL','syncToken','stringify','UIMakerStyles','am_database_migrations','DB\x20masters','Database\x20hooks','Groups','API\x20users','custom-apis','existsSync','I18Ns','fsIsFileContentSame','Test\x20cases','getMinutes','Watcher\x20error:','Collection\x20hooks','LOCAL_CLIENT_SYNC_EVENTS','✅\x20Connected\x20to\x20server\x20via\x20WS','path','link','onmessage','.js','InstanceApiSettings','startsWith','promises','bind','✅\x20node_modules\x20installed','tsconfig.json','LC_FOLDER_CHANGED_ON_LOCAL_SYSTEM','i18ns','relative','Node.js\x2022+\x20is\x20required.\x20Current\x20version:\x20','install','watcher','connected','UNREGISTER','am_collection_hooks','package-lock.json','eventType','startWatch','isDirectory','db-migrations','version','printNotesToProvideLocalClient','getCurrentTime','orangeStart','normalize','EVENTS','INSTANCE_API_HOOKS','THIRD_PARTY_API_SETTINGS','Instance\x20API\x20hooks','syncAllDataWithServer','join','POST','Log\x20profiles','am_tp_api_settings','am_database_hooks','ADMIN_USER','type','UTILITY_CLASSES','Third\x20party\x20API\x20settings','name','toString','DB_MIGRATIONS','am-types','exit','message','am_schedulers','THIRD_PARTY_APIS','push','ui-maker-utils','shutdownAndExit','slice','fsMkDir','connectToServerViaWS','am_db_masters','CUSTOM_APIS','am_process_initializers','LOG_PROFILES','base64','Process\x20initializers','PROCESS_INITIALIZERS','colorEnd','UI_MAKER_STYLES','beforeExit','UI\x20maker\x20styles','LC_DATA_MODIFIED_IN_DATABASE','getChangedFolder','PUT','eventData','min','Utility\x20classes','COLLECTION_HOOKS','utf8','fsExistsSync','Custom\x20APIs','InstanceHooks','am_events','printNotes','am_instances','processReceivedEvent','set','——————————————————————————————————————————————————————————————————————————————————','INSTANCE_API_SETTINGS','Schemas','WebSocket\x20events','performFullSync','sep','exports','am_tp_api_versions','listeners','CONNECTED','am_groups','apply','localClientPath','am_api_users','sendDeletedEventToServerInternal','DELETE_ALL','SCHEMAS','getCategoryOfPath','ApiUsers','Events','10xZBXXs','LogProfiles','database-hooks','readFileSync','Error\x20while\x20connecting\x20to\x20WS\x20server.','\x20The\x20local\x20client\x20will\x20pull\x20the\x20latest\x20changes\x20from\x20the\x20server\x20and\x20keep\x20them\x20synchronized\x20between\x20the\x20IDE\x20and\x20the\x20server.','Connection\x20closed.','projectDirectory','parse','src','statSync','skipWatchInputs','unlink','⏳\x20Dependencies\x20installation\x20process\x20started','ui-maker-styles','length','✅\x20Dependencies\x20installed','24333sVecRO','content','1iqSFKF','AmEvents','rmdirSync','DB\x20master\x20utils','DATABASE_HOOKS','System\x20API\x20hooks','response','data','\x20Please\x20provide\x20settings\x20in\x20:\x20','unlinkSync','SystemApiHooks','appRoot','✓\x20Receive\x20:\x20[','am_i18ns','am_utility_classes','--no-save','readFile','✅\x20Full\x20Sync\x20:\x20[','close','padStart','510228DACTih','dirname','adminUserPath','LC_DATA_REQ_RES','watch','versions','change','then','sendToServer','events','normalizeEOLToLFBase64','repo','DELETE','resolve','getChangedFolderForDeleted','SystemApiSettings','warn','split','\x27\x20exited\x20with\x20code\x20','onerror','collection-hooks','Instances','entries','am_ui_maker_styles','unhandledRejection','fsRemoveFile','INSTANCES','⏳\x20node_modules\x20installation\x20process\x20started','replace','Admin\x20user','readdirSync','web-socket-events','uncaughtException','debounce','UIMakerUtils',']\x20:\x20','nodeModulesInstalled','am_test_cases','installRequiredPackages','skipFileWritingForLocal','SCHEDULERS','279552pIfZgE','UNKNOWN','REGISTER','am_ui_maker_utils','db-interfaces.d.ts','buildUnixPathMap','mkdir','Error\x20closing\x20watcher\x20before\x20full\x20sync','2536809MLhWti','invalidOnEvents','unlinkDir','Schedulers','shuttingDown','post-hooks','readdir','checkForNodeVersion','fullSyncCounter','NOTIFICATION','fsReadFile','am_tp_installed_apis','fsLink','types','filter','PUT_REPLACE','I18NS','add','16WHMMEe','Database\x20migrations','readDirCustom','executeNpmRun','SYSTEM_API_SETTINGS','--force','instance-hooks','third-party-apis','addProcessHooks','validOnEvents','CustomApis','serializeFolderWithBinary','apis','config','from','npm','Instance\x20hooks','am_instance_api_hooks','am_instance_api_settings','removeEmptyDirsSync','\x1b[38;2;255;165;0m','SYSTEM_API_HOOKS','455020IVpxFy','onclose','DatabaseHooks','SIGTERM','schemas','error','log','WEB_SOCKET_EVENT','spawn','fsWriteFile','Error\x20during\x20shutdown','normalizeEOLBase64','UI_MAKER_UTILITY_CLASS','&user-path=','DB_MASTERS','charCodeAt','561169cHuVBF','WebSocketEvents','am_instance_hooks','errors','16xvJOcm','instance-api-hooks','——————————————————————————————————————\x20Note\x20——————————————————————————————————————','Failed\x20to\x20restart\x20watcher\x20after\x20full\x20sync','✓\x20Remove\x20:\x20[','chokidar','tests','LC_SEND_ALL_DATA','\x20Current\x20Dir\x20:\x20'];a0_0x22f2=function(){return _0x5aa8f9;};return a0_0x22f2();}(function(_0x25d205,_0x3639ba){const _0x29defc=a0_0x539e,_0x5e3545=_0x25d205();while(!![]){try{const _0x5060fc=-parseInt(_0x29defc(0x162))/0x1*(parseInt(_0x29defc(0xcb))/0x2)+-parseInt(_0x29defc(0x160))/0x3*(-parseInt(_0x29defc(0x98))/0x4)+parseInt(_0x29defc(0xae))/0x5+parseInt(_0x29defc(0x7e))/0x6+-parseInt(_0x29defc(0xbe))/0x7+-parseInt(_0x29defc(0xc2))/0x8*(parseInt(_0x29defc(0x176))/0x9)+parseInt(_0x29defc(0x14f))/0xa*(parseInt(_0x29defc(0x86))/0xb);if(_0x5060fc===_0x3639ba)break;else _0x5e3545['push'](_0x5e3545['shift']());}catch(_0x2a584f){_0x5e3545['push'](_0x5e3545['shift']());}}}(a0_0x22f2,0x27fac),((()=>{'use strict';var _0x5075ba={0x3(_0x2a4210){const _0x3f8ead=a0_0x539e;_0x2a4210[_0x3f8ead(0x141)]=require(_0x3f8ead(0xe7));},0xe7(_0x43a860){const _0x3fb6c5=a0_0x539e;_0x43a860[_0x3fb6c5(0x141)]=require(_0x3fb6c5(0xc7));},0x13d(_0x113b57){const _0x2285cd=a0_0x539e;_0x113b57[_0x2285cd(0x141)]=require('child_process');},0x380(_0x573128){const _0x1b70a8=a0_0x539e;_0x573128[_0x1b70a8(0x141)]=require('fs');}},_0x1c42a5={};function _0x51f0e7(_0xb3e882){const _0x5c1156=a0_0x539e;var _0x1eed7c=_0x1c42a5[_0xb3e882];if(void 0x0!==_0x1eed7c)return _0x1eed7c[_0x5c1156(0x141)];var _0x569ec3=_0x1c42a5[_0xb3e882]={'exports':{}};return _0x5075ba[_0xb3e882](_0x569ec3,_0x569ec3[_0x5c1156(0x141)],_0x51f0e7),_0x569ec3[_0x5c1156(0x141)];}((()=>{const _0x3e27c8=a0_0x539e,_0x1c0459=_0x51f0e7(0x380),_0x34db59=_0x51f0e7(0x3),_0x1c1dae=_0x51f0e7(0x13d);var _0x2f26bd,_0x414bea,_0x2a498c,_0x1ca0f5,_0x21938e,_0x1d12c6;new class{constructor(){const _0x35ec64=a0_0x539e;this['EL']=!0x1,this[_0x35ec64(0x16d)]=_0x34db59[_0x35ec64(0x183)](''),this[_0x35ec64(0x156)]='',this['C']={'localClientPath':'./local-client.config','src':_0x35ec64(0x158),'repo':_0x35ec64(0x181),'types':_0x35ec64(0x93),'amTypes':_0x35ec64(0x115),'versions':_0x35ec64(0x17b),'apis':_0x35ec64(0xa4),'listeners':_0x35ec64(0x143),'postHooks':_0x35ec64(0x8b),'preHooks':'pre-hooks','dbInterfacesFile':_0x35ec64(0x82),'UtilityClassesReadF':'Utility\x20classes','CustomApiReadF':_0x35ec64(0x134),'SchedulersReadF':'Schedulers','WebSocketEventsReadF':_0x35ec64(0x13e),'SchemaReadF':'Schemas','DBMigrationsReadF':_0x35ec64(0x99),'ProcessInitializersReadF':_0x35ec64(0x125),'ProcessI18NReadF':_0x35ec64(0xf2),'DBMastersReadF':'DB\x20masters','DBMasterStylesReadF':_0x35ec64(0x12a),'DBMasterUtilsReadF':_0x35ec64(0x165),'TestCasesReadF':'Test\x20cases','ThirdPartyApiReadF':'Third\x20party\x20APIs','EventsReadF':_0x35ec64(0x14e),'InstanceApiHooksReadF':'Instance\x20API\x20hooks','SystemApiHooksReadF':_0x35ec64(0x167),'CollectionHooksReadF':_0x35ec64(0xe4),'DatabaseHooksReadF':_0x35ec64(0xda),'InstanceHooksReadF':_0x35ec64(0xa8),'CustomApisWriteF':_0x35ec64(0xdd),'SchedulersWriteF':'schedulers','WebSocketEventsWriteF':_0x35ec64(0x195),'SchemaWriteF':_0x35ec64(0xb2),'DBMigrationsWriteF':_0x35ec64(0xfe),'ProcessInitializersWriteF':'process-initializers','ProcessI18NWriteF':_0x35ec64(0xf2),'DBMastersWriteF':'ui-maker-pages','DBMasterStylesWriteF':_0x35ec64(0x15d),'DBMasterUtilsWriteF':_0x35ec64(0x11b),'TestCasesWriteF':_0x35ec64(0xc8),'ThirdPartyApiWriteF':_0x35ec64(0x9f),'EventsWriteF':_0x35ec64(0x17f),'InstanceApiHooksWriteF':_0x35ec64(0xc3),'SystemApiHooksWriteF':_0x35ec64(0xcf),'CollectionHooksWriteF':_0x35ec64(0x18a),'DatabaseHooksWriteF':_0x35ec64(0x151),'InstanceHooksWriteF':_0x35ec64(0x9e)},this[_0x35ec64(0x15a)]=!0x1,this[_0x35ec64(0x19d)]={},this[_0x35ec64(0x19a)]=!0x1,this['orangeStart']='\x1b[38;2;255;165;0m',this['cyanStart']='\x1b[36m',this[_0x35ec64(0x127)]=_0x35ec64(0xd0),this[_0x35ec64(0x8e)]=0x0,this['sendDeletedEventToServerDebounce']=this[_0x35ec64(0x197)](this['sendDeletedEventToServerInternal'],0x1f4);}async['start'](){const _0x1dbc0f=a0_0x539e;this[_0x1dbc0f(0xa0)](),this[_0x1dbc0f(0x8d)](),this[_0x1dbc0f(0x133)](this['C'][_0x1dbc0f(0x147)]+'.js')||(this['printNotesToProvideLocalClient'](),this[_0x1dbc0f(0x11c)](0x1)[_0x1dbc0f(0x17d)]()),this[_0x1dbc0f(0xa5)]=require(this['C'][_0x1dbc0f(0x147)])(),await this[_0x1dbc0f(0x137)](),this[_0x1dbc0f(0xab)](_0x34db59['join'](this['appRoot'],this['C'][_0x1dbc0f(0x158)])),await this[_0x1dbc0f(0x11f)]();}[_0x3e27c8(0x8d)](){const _0x5e4c11=_0x3e27c8,_0x2334b1=process[_0x5e4c11(0xff)];parseInt(_0x2334b1[_0x5e4c11(0x187)]('.')[0x0][_0x5e4c11(0x192)]('v',''),0xa)<0x16&&(console[_0x5e4c11(0xb3)](this[_0x5e4c11(0x102)]+_0x5e4c11(0xf4)+_0x2334b1+this[_0x5e4c11(0x127)]),this[_0x5e4c11(0x11c)](0x1)['then']());}async['printNotes'](){const _0x57cced=_0x3e27c8;console[_0x57cced(0xb4)](this[_0x57cced(0x102)]),console[_0x57cced(0xb4)](_0x57cced(0xc4)),console[_0x57cced(0xb4)](_0x57cced(0x154)),console[_0x57cced(0xb4)](_0x57cced(0xca)+this[_0x57cced(0x16d)]),console[_0x57cced(0xb4)](_0x57cced(0x13b)),console[_0x57cced(0xb4)](this[_0x57cced(0x127)]),console[_0x57cced(0xb4)]('');}[_0x3e27c8(0x100)](){const _0x204458=_0x3e27c8;console['log'](_0x204458(0xac)),console['log'](_0x204458(0x16a)+this['C'][_0x204458(0x147)]+_0x204458(0xea)),console[_0x204458(0xb4)](_0x204458(0xd0)),console['log']('');}async['installRequiredPackages'](){const _0x193811=_0x3e27c8;console['log'](_0x193811(0x15c));try{_0x1c0459[_0x193811(0x16b)](_0x34db59[_0x193811(0x109)](this['appRoot'],_0x193811(0xfa)));}catch(_0xf37b27){}await this[_0x193811(0x9b)](_0x193811(0xa7),[_0x193811(0xf5),_0x193811(0x171),'chokidar@4.0.3']),this[_0x193811(0x19a)]=!0x0,console[_0x193811(0xb4)](_0x193811(0x15f));}async[_0x3e27c8(0x9b)](_0x37b511,_0x196d18){return new Promise((_0x64e879,_0x30559e)=>{const _0x1410c7=a0_0x539e,_0x56baec=(0x0,_0x1c1dae[_0x1410c7(0xb6)])(_0x37b511,_0x196d18,{'shell':!0x0,'cwd':this[_0x1410c7(0x16d)]});_0x56baec['on']('close',_0x247d1b=>{const _0x35f291=_0x1410c7;if(0x0===_0x247d1b)setTimeout(_0x64e879,0x3e8);else{const _0x14b364='\x27'+_0x37b511+'\x20'+_0x196d18['join']('\x20')+_0x35f291(0x188)+_0x247d1b+'.';_0x30559e(new Error(_0x14b364));}}),_0x56baec['on'](_0x1410c7(0xb3),_0x3749e2=>{console['error']('Failed\x20to\x20start\x20the\x20npm\x20process:\x20'+_0x3749e2['message']),_0x30559e(_0x3749e2);});});}async[_0x3e27c8(0xfc)](){const _0x3146ef=_0x3e27c8;this[_0x3146ef(0x19a)]||await this[_0x3146ef(0x19c)]();const _0x73d29d=await Promise['resolve']()[_0x3146ef(0x17d)](()=>_0x51f0e7(0xe7)),_0x18ed5e=_0x34db59[_0x3146ef(0x109)](this[_0x3146ef(0x16d)]),_0x3260aa=_0x34db59['join'](this[_0x3146ef(0x16d)],this['C'][_0x3146ef(0x158)]),_0x4cf08c=_0x55429f=>{const _0x39dae3=_0x3146ef,_0x250420=_0x34db59[_0x39dae3(0xf3)](_0x18ed5e,_0x55429f);return!(_0x250420&&!_0x250420[_0x39dae3(0xec)]('.')&&!_0x250420[_0x39dae3(0xd2)]('~')&&_0x250420[_0x39dae3(0xec)](this['C'][_0x39dae3(0x158)]));},_0x48f126=_0x73d29d[_0x3146ef(0x17a)](_0x3260aa,{'persistent':!0x0,'ignoreInitial':!0x0,'depth':0x1/0x0,'awaitWriteFinish':{'stabilityThreshold':0xc8,'pollInterval':0x64}}),_0x14d661=async(_0x4efee3,_0x1a12e4)=>{const _0x2aaae3=_0x3146ef;try{if(this[_0x2aaae3(0x15a)])return;const _0x132a47=_0x34db59[_0x2aaae3(0xf3)](_0x18ed5e,_0x1a12e4);if(!_0x1a12e4||_0x4cf08c(_0x1a12e4))return;console[_0x2aaae3(0xb4)](_0x2aaae3(0xcd)+this[_0x2aaae3(0x101)]()+']\x20:\x20['+_0x4efee3+_0x2aaae3(0x199)+_0x132a47);const _0x2282c4=this[_0x2aaae3(0x14c)](_0x132a47),_0x360637=this[_0x2aaae3(0x12c)](_0x2282c4,_0x132a47);if(!_0x360637)return;let _0x4b8ba0,_0x1c2170=!0x1;if(this[_0x2aaae3(0x133)](_0x360637)){if(this[_0x2aaae3(0x133)](_0x34db59[_0x2aaae3(0x109)](_0x18ed5e,_0x132a47))){const _0x4e28f7=_0x34db59[_0x2aaae3(0x109)](_0x34db59['sep']+this['C'][_0x2aaae3(0x181)],_0x360637);_0x4b8ba0=await this[_0x2aaae3(0xa3)](_0x360637,_0x4e28f7),this[_0x2aaae3(0x17e)]({'objType':_0x414bea[_0x2aaae3(0x179)],'localClientWSReqRes':{'eventType':_0x2a498c[_0x2aaae3(0xf1)],'folderChangedOnLocalSystem':_0x4b8ba0,'category':_0x2282c4,'shouldReplaceAllItemsOfCategory':_0x1c2170}});}else this[_0x2aaae3(0x108)]();}else{const _0x5d43da=this[_0x2aaae3(0x184)](_0x2282c4,_0x132a47),_0x53502d=_0x34db59[_0x2aaae3(0x109)](_0x34db59['sep']+this['C']['repo'],_0x5d43da);_0x4b8ba0=await this['serializeFolderWithBinary'](_0x5d43da,_0x53502d),_0x1c2170=!0x0,this['sendDeletedEventToServerDebounce'](_0x4b8ba0,_0x2282c4,_0x1c2170);}}catch(_0x5ca7a1){console['error']('watch\x20handler\x20error',_0x5ca7a1);}};_0x48f126['on'](_0x3146ef(0x97),_0x340fb6=>_0x14d661(_0x3146ef(0x97),_0x340fb6))['on'](_0x3146ef(0x17c),_0xb0d550=>_0x14d661(_0x3146ef(0x17c),_0xb0d550))['on'](_0x3146ef(0x15b),_0x4dd45c=>_0x14d661('unlink',_0x4dd45c))['on']('addDir',_0xcf1945=>_0x14d661('addDir',_0xcf1945))['on'](_0x3146ef(0x88),_0x90bb48=>_0x14d661(_0x3146ef(0x88),_0x90bb48))['on'](_0x3146ef(0xb3),_0x4cd3a8=>console['error'](_0x3146ef(0xe3),_0x4cd3a8)),this[_0x3146ef(0xf6)]=_0x48f126,0x1===this[_0x3146ef(0x8e)]&&console[_0x3146ef(0xb4)]('✅\x20Local\x20client\x20started...');}[_0x3e27c8(0x101)](){const _0x3b5af5=_0x3e27c8,_0x480a69=new Date();return String(_0x480a69['getHours']())['padStart'](0x2,'0')+':'+String(_0x480a69[_0x3b5af5(0xe2)]())[_0x3b5af5(0x175)](0x2,'0')+':'+String(_0x480a69['getSeconds']())[_0x3b5af5(0x175)](0x2,'0');}[_0x3e27c8(0x149)](_0x3a2b0a,_0x43ff54,_0x1ef590){const _0x168d93=_0x3e27c8;this[_0x168d93(0x17e)]({'objType':_0x414bea[_0x168d93(0x179)],'localClientWSReqRes':{'eventType':_0x2a498c['LC_FOLDER_CHANGED_ON_LOCAL_SYSTEM'],'folderChangedOnLocalSystem':_0x3a2b0a,'category':_0x43ff54,'shouldReplaceAllItemsOfCategory':_0x1ef590}});}[_0x3e27c8(0x197)](_0x44d936,_0x30efcb){let _0x175a91=null;return function(..._0x7f3a61){clearTimeout(_0x175a91),_0x175a91=setTimeout(()=>{const _0xd289f9=a0_0x539e;_0x44d936[_0xd289f9(0x146)](this,_0x7f3a61);},_0x30efcb);};}[_0x3e27c8(0x14c)](_0x553aea){const _0x348668=_0x3e27c8,_0x455415=_0x34db59[_0x348668(0x109)](this['C'][_0x348668(0x158)]);if(!_0x553aea[_0x348668(0xec)](_0x455415))return;const _0x5b5bd2=_0x553aea['split'](_0x34db59[_0x348668(0x140)])[_0x348668(0x94)](_0x3dbd9a=>!!_0x3dbd9a)[0x1];for(const _0x2750d4 in _0x1d12c6)if(_0x1d12c6[_0x2750d4]===_0x5b5bd2)return _0x5b5bd2;}[_0x3e27c8(0x12c)](_0x2fac3b,_0x4d9feb){const _0x403e5f=_0x3e27c8,_0x148951=_0x4d9feb[_0x403e5f(0x187)](_0x34db59['sep']);let _0x3346e3='';return _0x3346e3=_0x2fac3b===_0x1d12c6['THIRD_PARTY_APIS']?_0x148951[_0x403e5f(0x11d)](0x0,0x5)[_0x403e5f(0x109)](_0x34db59[_0x403e5f(0x140)]):_0x2fac3b===_0x1d12c6[_0x403e5f(0x10e)]?_0x3346e3=_0x148951['slice'](0x0,0x2)['join'](_0x34db59[_0x403e5f(0x140)]):_0x148951[_0x403e5f(0x11d)](0x0,0x3)[_0x403e5f(0x109)](_0x34db59[_0x403e5f(0x140)]),_0x3346e3;}[_0x3e27c8(0x184)](_0x3f11c9,_0x14d222){const _0x113083=_0x3e27c8;return _0x14d222[_0x113083(0x187)](_0x34db59[_0x113083(0x140)])['slice'](0x0,0x3)[_0x113083(0x109)](_0x34db59[_0x113083(0x140)]);}async[_0x3e27c8(0xa3)](_0x47b618,_0x5ede4a){const _0x185d1a={},_0x52c23f=this;return await async function _0x5916a8(_0x1ce66c){const _0x2529a2=a0_0x539e,_0x21733b=await _0x52c23f['readDirCustom'](_0x1ce66c,{'withFileTypes':!0x0});for(const _0xdaf3a4 of _0x21733b){const _0x119b55=_0x34db59[_0x2529a2(0x109)](_0x1ce66c,_0xdaf3a4[_0x2529a2(0x112)]),_0x10b81e=_0x34db59[_0x2529a2(0x103)](_0x119b55);if(_0xdaf3a4['isDirectory']())await _0x5916a8(_0x10b81e);else{const _0x441ec5=_0x1c0459[_0x2529a2(0x152)](_0x10b81e),_0xdfa845=_0x34db59[_0x2529a2(0xf3)](_0x47b618,_0x10b81e),_0xc8232c=_0x34db59[_0x2529a2(0x109)](_0x5ede4a,_0xdfa845)['split'](_0x34db59[_0x2529a2(0x140)])[_0x2529a2(0x109)](_0x34db59['posix'][_0x2529a2(0x140)]);_0x185d1a[_0xc8232c]={'encoding':_0x2529a2(0x124),'content':_0x441ec5[_0x2529a2(0x113)](_0x2529a2(0x124))};}}}(_0x47b618),_0x185d1a;}['sendToServer'](_0x3b196b){const _0x2b0f22=_0x3e27c8;try{this['ws']['send'](JSON[_0x2b0f22(0xd6)](_0x3b196b));}catch(_0xe47ae6){console['log'](_0xe47ae6);}}async[_0x3e27c8(0x11f)](){const _0x481b5e=_0x3e27c8;console[_0x481b5e(0xb4)]('⏳\x20Connecting\x20to\x20server...');const _0x15d674=this[_0x481b5e(0xa5)][_0x481b5e(0xd5)],_0x10a8e6=this['config'][_0x481b5e(0x178)],_0x4644e7=this[_0x481b5e(0xa5)][_0x481b5e(0xd4)];this['ws']=new WebSocket(_0x4644e7+'?authTokenInfo=ws-local-client-sync&authorization='+_0x15d674+_0x481b5e(0xbb)+_0x10a8e6);const _0x133974=[],_0x238733=()=>{const _0x1c9b29=_0x481b5e;this[_0x1c9b29(0x17e)]({'objType':_0x414bea[_0x1c9b29(0x80)],'onEvents':[{'eventType':_0x1c9b29(0xe5)}]});};function _0x5200b6(_0x5e2251){const _0x3e51af=_0x481b5e;_0x5e2251['onopen']=null,_0x5e2251['onmessage']=null,_0x5e2251['onerror']=null,_0x5e2251[_0x3e51af(0xaf)]=null,_0x5e2251[_0x3e51af(0x174)]();}this['ws'][_0x481b5e(0xe9)]=async _0x893d7e=>{const _0x29305a=_0x481b5e,_0x32d00b=JSON[_0x29305a(0x157)](_0x893d7e[_0x29305a(0x169)]);if(_0x32d00b[_0x29305a(0x10f)]===_0x414bea[_0x29305a(0x144)]&&_0x32d00b[_0x29305a(0x168)][_0x29305a(0xf7)])_0x238733();else{if(_0x32d00b[_0x29305a(0x10f)]===_0x414bea[_0x29305a(0x80)]){if(_0x32d00b?.[_0x29305a(0x168)]?.[_0x29305a(0xa1)]?.['length']){for(const _0x5093c1 of _0x32d00b[_0x29305a(0x168)][_0x29305a(0xa1)])_0x133974[_0x29305a(0x11a)](_0x5093c1);console[_0x29305a(0xb4)](_0x29305a(0xe6)),this[_0x29305a(0xf6)]||await this['startWatch'](),this['syncAllDataWithServer']();}else{const _0x548344=_0x32d00b[_0x29305a(0x168)]?.[_0x29305a(0x87)]?.[0x0]?.[_0x29305a(0xc1)]?.[0x0]?.[_0x29305a(0x117)]||_0x29305a(0x153);console[_0x29305a(0xb4)]('❌\x20'+_0x548344),await this[_0x29305a(0x11c)](0x1);}}else await this[_0x29305a(0x139)](_0x32d00b);}},this['ws']['onclose']=_0x11f382=>{const _0x693322=_0x481b5e;console[_0x693322(0xb4)](_0x693322(0x155)),_0x5200b6(this['ws']),setTimeout(this[_0x693322(0x11f)]['bind'](this),0xbb8);},this['ws'][_0x481b5e(0x189)]=()=>{const _0x465516=_0x481b5e;_0x5200b6(this['ws']),setTimeout(this[_0x465516(0x11f)][_0x465516(0xee)](this),0xbb8);};}[_0x3e27c8(0x108)](){const _0x4c12ef=_0x3e27c8;this[_0x4c12ef(0x17e)]({'objType':_0x414bea[_0x4c12ef(0x179)],'localClientWSReqRes':{'eventType':_0x2a498c['LC_SEND_ALL_DATA']}});}async[_0x3e27c8(0x139)](_0x157df3){const _0x1c3a4c=_0x3e27c8;if(this['EL']&&_0x157df3[_0x1c3a4c(0x168)][_0x1c3a4c(0xfb)]!==_0x2a498c[_0x1c3a4c(0xc9)]&&console[_0x1c3a4c(0xb4)](_0x157df3),_0x157df3[_0x1c3a4c(0x10f)]===_0x414bea[_0x1c3a4c(0x179)]){if(_0x157df3[_0x1c3a4c(0xc1)]?.[_0x1c3a4c(0x15e)])return void console[_0x1c3a4c(0xb3)](_0x157df3[_0x1c3a4c(0xc1)]);if(_0x157df3[_0x1c3a4c(0x168)]['eventType']===_0x2a498c['LC_SEND_ALL_DATA']){console['log'](_0x1c3a4c(0x173)+this[_0x1c3a4c(0x101)]()+']'),this[_0x1c3a4c(0x8e)]++;try{this[_0x1c3a4c(0xf6)]&&(await this[_0x1c3a4c(0xf6)][_0x1c3a4c(0x174)](),this[_0x1c3a4c(0xf6)]=null);}catch(_0x20b3c5){console['warn'](_0x1c3a4c(0x85),_0x20b3c5);}await this[_0x1c3a4c(0x13f)](_0x157df3);try{await this['startWatch']();}catch(_0x162ce2){console[_0x1c3a4c(0xb3)](_0x1c3a4c(0xc5),_0x162ce2);}}else{if(_0x157df3[_0x1c3a4c(0x168)]['eventType']===_0x2a498c[_0x1c3a4c(0x12b)]){const _0x1d1fd4=_0x157df3['response']['eventData'];await this['writeMemfsJsonToDisk'](_0x1d1fd4[_0x1c3a4c(0x169)],this[_0x1c3a4c(0x16d)]);}}!0x1===this[_0x1c3a4c(0x19a)]&&(console['log'](_0x1c3a4c(0x191)),await this[_0x1c3a4c(0x9b)](_0x1c3a4c(0xa7),[_0x1c3a4c(0xf5),_0x1c3a4c(0x9d)]),console[_0x1c3a4c(0xb4)](_0x1c3a4c(0xef)),this[_0x1c3a4c(0x19a)]=!0x0);}}async[_0x3e27c8(0x13f)](_0x5ebfa7){const _0x1cb53d=_0x3e27c8,_0x51bba6=await this[_0x1cb53d(0x83)](_0x34db59['join'](this['appRoot'],this['C'][_0x1cb53d(0x158)])),_0x3899e3=_0x5ebfa7[_0x1cb53d(0x168)][_0x1cb53d(0x12e)],_0x2ebd93='/'+this['C'][_0x1cb53d(0x181)],_0x4a1504=this['appRoot']['split'](_0x34db59['sep'])[_0x1cb53d(0x109)]('/');for(const [_0x57da3d,_0x3cdc86]of _0x51bba6){const _0x10ccb8=_0x57da3d['replace'](_0x4a1504,_0x2ebd93);if(!_0x3899e3[_0x10ccb8]){const _0x50665e=_0x10ccb8[_0x1cb53d(0x192)]('/'+this['C'][_0x1cb53d(0x181)],''),_0x4acfbe=_0x34db59['join'](this[_0x1cb53d(0x16d)],_0x50665e[_0x1cb53d(0x192)](/^\//,''));await this[_0x1cb53d(0x18f)](_0x4acfbe),this['EL']&&console[_0x1cb53d(0xb4)](_0x1cb53d(0xc6)+this[_0x1cb53d(0x101)]()+_0x1cb53d(0x199)+_0x4acfbe[_0x1cb53d(0x192)](this[_0x1cb53d(0x16d)],''));}}await this['writeMemfsJsonToDisk'](_0x3899e3,this[_0x1cb53d(0x16d)]),this['removeEmptyDirsSync'](_0x34db59[_0x1cb53d(0x109)](this['appRoot'],this['C'][_0x1cb53d(0x158)]));}async[_0x3e27c8(0xd1)](_0x2b6ae3,_0x51b9f4){const _0x2bd4de=_0x3e27c8;this[_0x2bd4de(0x15a)]=!0x0;let _0x406580=[];const _0x386ab3=async()=>{_0x406580['length']>0x0&&(await Promise['all'](_0x406580),_0x406580=[]);};for(const [_0x198933,_0x4d807b]of Object[_0x2bd4de(0x18c)](_0x2b6ae3)){if(!_0x198933[_0x2bd4de(0xec)]('/'+this['C'][_0x2bd4de(0x181)]+'/'+this['C']['src'])&&!_0x198933[_0x2bd4de(0xd2)](_0x2bd4de(0xf0)))continue;const _0x4f8531=_0x4d807b,_0x2d2553=_0x198933[_0x2bd4de(0x192)]('/'+this['C'][_0x2bd4de(0x181)],'');if(this[_0x2bd4de(0x19d)][_0x2d2553])continue;const _0x415981=_0x34db59['join'](_0x51b9f4,_0x2d2553[_0x2bd4de(0x192)](/^\//,'')),_0x24999a=_0x34db59[_0x2bd4de(0x177)](_0x415981),_0x6ab564=async()=>{const _0x1ea95e=_0x2bd4de;if(await this[_0x1ea95e(0x11e)](_0x24999a,{'recursive':!0x0}),!await this[_0x1ea95e(0xe0)](_0x51b9f4,_0x415981,_0x4f8531[_0x1ea95e(0x161)])){const _0x49175d=this['normalizeEOLBase64'](_0x4f8531[_0x1ea95e(0x161)]);await this['fsWriteFile'](_0x415981,_0x49175d,{'encoding':_0x1ea95e(0x124)}),this['EL']&&console[_0x1ea95e(0xb4)](_0x1ea95e(0x16e)+this['getCurrentTime']()+']\x20:\x20'+_0x415981['replace'](_0x51b9f4,''));}};_0x406580[_0x2bd4de(0x11a)](_0x6ab564()),_0x406580['length']>=0x3e8&&await _0x386ab3();}await _0x386ab3(),setTimeout(()=>{this['skipWatchInputs']=!0x1;},0x3e8);}['removeEmptyDirsSync'](_0x267801){const _0x478744=_0x3e27c8,_0x27d6b4=this['normalizePath'](_0x267801);if(!this[_0x478744(0x133)](_0x27d6b4))return!0x1;const _0x4f3345=_0x1c0459[_0x478744(0x194)](_0x27d6b4);let _0x4db24=!0x0;for(const _0x36d6e0 of _0x4f3345){const _0x23720e=_0x34db59['join'](_0x27d6b4,_0x36d6e0);_0x1c0459[_0x478744(0x159)](_0x23720e)[_0x478744(0xfd)]()&&this[_0x478744(0xab)](_0x23720e)||(_0x4db24=!0x1);}return!!_0x4db24&&(_0x1c0459[_0x478744(0x164)](_0x27d6b4),!0x0);}async[_0x3e27c8(0x9a)](_0x47a9a4,_0x50206d){const _0xb17d5c=_0x3e27c8;return this['fsExistsSync'](_0x47a9a4)&&_0x1c0459['statSync'](_0x47a9a4)[_0xb17d5c(0xfd)]()?await this['fsReadDir'](_0x47a9a4,_0x50206d):[];}['normalizePath'](_0x822cd2){const _0x307a0d=_0x3e27c8;return _0x34db59[_0x307a0d(0x103)](_0x822cd2);}[_0x3e27c8(0xb9)](_0x5d68d1){const _0x109ee6=_0x3e27c8,_0xb8947f=atob(_0x5d68d1);for(let _0x676111=0x0;_0x676111<Math[_0x109ee6(0x12f)](_0xb8947f['length'],0x1f40);_0x676111++)if(0x0===_0xb8947f[_0x109ee6(0xbd)](_0x676111))return _0x5d68d1;const _0x16f6b1='\x5c'===_0x34db59[_0x109ee6(0x140)]?'\x0d\x0a':'\x0a';return btoa(_0xb8947f[_0x109ee6(0x192)](/\r\n/g,'\x0a')[_0x109ee6(0x192)](/\r/g,'\x0a')[_0x109ee6(0x192)](/\n/g,_0x16f6b1));}[_0x3e27c8(0x180)](_0x47eddf){const _0x273153=_0x3e27c8,_0x424341=atob(_0x47eddf);for(let _0x153156=0x0;_0x153156<Math[_0x273153(0x12f)](_0x424341['length'],0x1f40);_0x153156++)if(0x0===_0x424341[_0x273153(0xbd)](_0x153156))return _0x47eddf;return btoa(_0x424341[_0x273153(0x192)](/\r\n/g,'\x0a')[_0x273153(0x192)](/\r/g,'\x0a'));}[_0x3e27c8(0x133)](_0x3a6e98){const _0x1a0f07=_0x3e27c8,_0x594239=_0x34db59[_0x1a0f07(0x103)](_0x3a6e98);return _0x1c0459[_0x1a0f07(0xde)](_0x594239);}async['fsReadDir'](_0x334ad7,_0x343ca4){const _0x4090d6=_0x3e27c8,_0x2cbd2a=_0x34db59[_0x4090d6(0x103)](_0x334ad7);return await _0x1c0459['promises']['readdir'](_0x2cbd2a,_0x343ca4);}async[_0x3e27c8(0x11e)](_0x50b4aa,_0x56675d){const _0x3725e6=_0x3e27c8,_0x13709a=_0x34db59[_0x3725e6(0x103)](_0x50b4aa);return await _0x1c0459[_0x3725e6(0xed)][_0x3725e6(0x84)](_0x13709a,_0x56675d);}['fsMkDirSync'](_0x3db0bc,_0x4fc42d){const _0xb86ea1=_0x3e27c8,_0x1525c1=_0x34db59[_0xb86ea1(0x103)](_0x3db0bc);return _0x1c0459['mkdirSync'](_0x1525c1,_0x4fc42d);}async[_0x3e27c8(0x90)](_0x561092,_0x1ee425){const _0x4b64f2=_0x3e27c8,_0x118b01=_0x34db59['normalize'](_0x561092);return await _0x1c0459['promises'][_0x4b64f2(0x172)](_0x118b01,_0x1ee425);}async[_0x3e27c8(0xb7)](_0x28f876,_0x494621,_0x1e1eb1){const _0x3bd055=_0x3e27c8,_0xf99f8e=_0x34db59['normalize'](_0x28f876);return await _0x1c0459[_0x3bd055(0xed)]['writeFile'](_0xf99f8e,_0x494621,_0x1e1eb1);}async[_0x3e27c8(0x18f)](_0x8f1ac2){const _0x563495=_0x3e27c8,_0x258952=_0x34db59[_0x563495(0x103)](_0x8f1ac2);return await _0x1c0459[_0x563495(0xed)][_0x563495(0x15b)](_0x258952);}async[_0x3e27c8(0xe0)](_0x4a6240,_0x1c0163,_0x48a098){const _0x436dfc=_0x3e27c8;if(!this[_0x436dfc(0x133)](_0x1c0163))return!0x1;try{const _0x17f758=await this[_0x436dfc(0x90)](_0x1c0163);let _0x7b2eb6;return _0x7b2eb6='undefined'!=typeof Buffer&&Buffer['isBuffer'](_0x17f758)?_0x17f758['toString'](_0x436dfc(0x124)):Buffer[_0x436dfc(0xa6)](_0x17f758,_0x436dfc(0x132))[_0x436dfc(0x113)]('base64'),this[_0x436dfc(0x180)](_0x7b2eb6)===this[_0x436dfc(0x180)](_0x48a098)&&(this['EL']&&console[_0x436dfc(0xb4)]('→\x20Skip\x20(unchanged)\x20:\x20['+this['getCurrentTime']()+_0x436dfc(0x199)+_0x1c0163['replace'](_0x4a6240,'')),!0x0);}catch(_0x3ef121){return!0x1;}}async[_0x3e27c8(0x92)](_0x3a7d4a,_0x200299){const _0x54097b=_0x3e27c8,_0x390d50=_0x34db59[_0x54097b(0x103)](_0x3a7d4a),_0x56f4c5=_0x34db59[_0x54097b(0x103)](_0x200299);try{return await _0x1c0459[_0x54097b(0xed)][_0x54097b(0xe8)](_0x390d50,_0x56f4c5);}catch(_0x1098bd){console[_0x54097b(0x186)](_0x1098bd);}}async['buildUnixPathMap'](_0x26b4ff){const _0x3f1823=new Map(),_0x269abd=_0x34db59['resolve'](_0x26b4ff),_0x94515b=async _0x539083=>{const _0x296d37=a0_0x539e;let _0x3c331e=[];try{_0x3c331e=await _0x1c0459['promises'][_0x296d37(0x8c)](_0x539083,{'withFileTypes':!0x0});}catch(_0x19d522){return;}for(const _0x200498 of _0x3c331e){const _0x50b07d=_0x34db59[_0x296d37(0x109)](_0x539083,_0x200498[_0x296d37(0x112)]);if(_0x200498['isDirectory']())await _0x94515b(_0x50b07d);else{const _0x19ab0a=_0x50b07d[_0x296d37(0x187)](_0x34db59[_0x296d37(0x140)])['join']('/');_0x3f1823[_0x296d37(0x13a)](_0x19ab0a,!0x0);}}};return await _0x94515b(_0x269abd),_0x3f1823;}async[_0x3e27c8(0x11c)](_0x2a9656=0x0){const _0x1996be=_0x3e27c8;if(!this[_0x1996be(0x8a)]){this[_0x1996be(0x8a)]=!0x0;try{this[_0x1996be(0xf6)]&&await this[_0x1996be(0xf6)][_0x1996be(0x174)]();}catch(_0x53648f){console[_0x1996be(0xb3)](_0x1996be(0xb8),_0x53648f);}finally{setTimeout(()=>process[_0x1996be(0x116)](_0x2a9656),0xc8);}}}[_0x3e27c8(0xa0)](){const _0xbd4137=_0x3e27c8;process['on']('SIGINT',()=>{const _0x23308d=a0_0x539e;console['log']('SIGINT\x20received\x20—\x20shutting\x20down'),this[_0x23308d(0x11c)](0x0);}),process['on'](_0xbd4137(0xb1),()=>{const _0xf642ba=_0xbd4137;console[_0xf642ba(0xb4)]('SIGTERM\x20received\x20—\x20shutting\x20down'),this[_0xf642ba(0x11c)](0x0);}),process['on'](_0xbd4137(0x129),_0x3e5975=>{const _0x4a6f96=_0xbd4137;console[_0x4a6f96(0xb4)](_0x4a6f96(0x129),_0x3e5975);}),process['on'](_0xbd4137(0x116),_0x48ec9e=>{const _0x46d40f=_0xbd4137;console[_0x46d40f(0xb4)](_0x46d40f(0x116),_0x48ec9e);}),process['on'](_0xbd4137(0x196),_0x514ad9=>{const _0x24be86=_0xbd4137;console['error'](_0x24be86(0x196),_0x514ad9),this[_0x24be86(0x11c)](0x1);}),process['on']('unhandledRejection',_0x4dce31=>{const _0x1ebeb7=_0xbd4137;console[_0x1ebeb7(0xb3)](_0x1ebeb7(0x18e),_0x4dce31),this[_0x1ebeb7(0x11c)](0x1);});}}()['start']()[_0x3e27c8(0x17d)](),function(_0x486490){const _0x4024d1=_0x3e27c8;_0x486490[_0x4024d1(0x190)]='INSTANCES',_0x486490['THIRD_PARTY_APIS']=_0x4024d1(0x119),_0x486490[_0x4024d1(0x121)]=_0x4024d1(0x121),_0x486490['SYSTEM_APIS']=_0x4024d1(0xce),_0x486490[_0x4024d1(0xb5)]='WEB_SOCKET_EVENT';}(_0x2f26bd||(_0x2f26bd={})),function(_0x3c13e8){const _0xecd76=_0x3e27c8;_0x3c13e8[_0xecd76(0x80)]=_0xecd76(0x80),_0x3c13e8[_0xecd76(0xf8)]=_0xecd76(0xf8),_0x3c13e8[_0xecd76(0x144)]=_0xecd76(0x144),_0x3c13e8['UNKNOWN']=_0xecd76(0x7f),_0x3c13e8['TOKEN_VALIDATION']='TOKEN_VALIDATION',_0x3c13e8[_0xecd76(0x8f)]='NOTIFICATION',_0x3c13e8[_0xecd76(0x179)]=_0xecd76(0x179);}(_0x414bea||(_0x414bea={})),function(_0x21ab8f){const _0x21b9fc=_0x3e27c8;_0x21ab8f['LC_SEND_ALL_DATA']=_0x21b9fc(0xc9),_0x21ab8f[_0x21b9fc(0x12b)]=_0x21b9fc(0x12b),_0x21ab8f[_0x21b9fc(0xf1)]=_0x21b9fc(0xf1);}(_0x2a498c||(_0x2a498c={})),function(_0x3d41d4){const _0x478df1=_0x3e27c8;_0x3d41d4[_0x478df1(0x10a)]=_0x478df1(0x10a),_0x3d41d4[_0x478df1(0x12d)]=_0x478df1(0x12d),_0x3d41d4[_0x478df1(0x95)]=_0x478df1(0x95),_0x3d41d4['DELETE']=_0x478df1(0x182),_0x3d41d4[_0x478df1(0x14a)]='DELETE_ALL';}(_0x1ca0f5||(_0x1ca0f5={})),function(_0x21a1eb){const _0x5ac881=_0x3e27c8;_0x21a1eb[_0x5ac881(0x163)]=_0x5ac881(0x136),_0x21a1eb[_0x5ac881(0xbf)]='am_web_socket_events',_0x21a1eb['DBMasters']=_0x5ac881(0x120),_0x21a1eb[_0x5ac881(0xa2)]='am_custom_apis',_0x21a1eb[_0x5ac881(0xeb)]=_0x5ac881(0xaa),_0x21a1eb['InstanceApiHooks']=_0x5ac881(0xa9),_0x21a1eb[_0x5ac881(0x135)]=_0x5ac881(0xc0),_0x21a1eb[_0x5ac881(0xb0)]=_0x5ac881(0x10d),_0x21a1eb['CollectionHooks']=_0x5ac881(0xf9),_0x21a1eb[_0x5ac881(0x89)]=_0x5ac881(0x118),_0x21a1eb['Schemas']='am_schemas',_0x21a1eb[_0x5ac881(0xdf)]=_0x5ac881(0x16f),_0x21a1eb[_0x5ac881(0x185)]='am_system_api_settings',_0x21a1eb[_0x5ac881(0x16c)]='am_system_api_hooks',_0x21a1eb[_0x5ac881(0x10c)]=_0x5ac881(0x10c),_0x21a1eb[_0x5ac881(0x91)]=_0x5ac881(0x91),_0x21a1eb['am_tp_api_versions']=_0x5ac881(0x142),_0x21a1eb['UtilityClasses']=_0x5ac881(0x170),_0x21a1eb['DatabasesMigrations']=_0x5ac881(0xd8),_0x21a1eb['ProcessInitializers']=_0x5ac881(0x122),_0x21a1eb[_0x5ac881(0x198)]=_0x5ac881(0x81),_0x21a1eb[_0x5ac881(0xd7)]=_0x5ac881(0x18d),_0x21a1eb['AmTestCases']=_0x5ac881(0x19b),_0x21a1eb[_0x5ac881(0xdb)]=_0x5ac881(0x145),_0x21a1eb[_0x5ac881(0x14d)]=_0x5ac881(0x148),_0x21a1eb['Instances']=_0x5ac881(0x138),_0x21a1eb[_0x5ac881(0x150)]='am_log_profiles';}(_0x21938e||(_0x21938e={})),function(_0x572137){const _0x39faa7=_0x3e27c8;_0x572137[_0x39faa7(0x10e)]=_0x39faa7(0x193),_0x572137['CUSTOM_APIS']=_0x39faa7(0x134),_0x572137[_0x39faa7(0x114)]=_0x39faa7(0x99),_0x572137[_0x39faa7(0x126)]=_0x39faa7(0x125),_0x572137[_0x39faa7(0x104)]=_0x39faa7(0x14e),_0x572137[_0x39faa7(0x96)]=_0x39faa7(0xf2),_0x572137[_0x39faa7(0x105)]=_0x39faa7(0x107),_0x572137['INSTANCE_HOOKS']=_0x39faa7(0xa8),_0x572137[_0x39faa7(0x166)]=_0x39faa7(0xda),_0x572137[_0x39faa7(0x131)]=_0x39faa7(0xe4),_0x572137[_0x39faa7(0x13c)]='Instance\x20API\x20settings',_0x572137[_0x39faa7(0x7d)]='Schedulers',_0x572137[_0x39faa7(0x14b)]=_0x39faa7(0x13d),_0x572137[_0x39faa7(0xad)]=_0x39faa7(0x167),_0x572137[_0x39faa7(0x9c)]='System\x20API\x20settings',_0x572137[_0x39faa7(0xcc)]=_0x39faa7(0xe1),_0x572137['THIRD_PARTY_APIS']='Third\x20party\x20APIs',_0x572137[_0x39faa7(0x106)]=_0x39faa7(0x111),_0x572137[_0x39faa7(0x110)]=_0x39faa7(0x130),_0x572137[_0x39faa7(0xd3)]=_0x39faa7(0x13e),_0x572137[_0x39faa7(0xbc)]=_0x39faa7(0xd9),_0x572137[_0x39faa7(0xba)]=_0x39faa7(0x165),_0x572137[_0x39faa7(0x128)]=_0x39faa7(0x12a),_0x572137['GROUPS']=_0x39faa7(0xdb),_0x572137['API_USERS']=_0x39faa7(0xdc),_0x572137[_0x39faa7(0x190)]=_0x39faa7(0x18b),_0x572137[_0x39faa7(0x123)]=_0x39faa7(0x10b);}(_0x1d12c6||(_0x1d12c6={}));})());})()));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[4575],{24575:(H,m,i)=>{i.r(m),i.d(m,{DeploymentSettingsM:()=>Q});var h=i(77664),Z=i(17017),T=i(81490),d=i(15861),l=i(60095),s=i(20553),t=i(94946),C=i(62304),f=i(95852),U=i(19394),y=i(46178),_=i(69862);let R=(()=>{class n extends y.g{http;authCS;constructor(e,a){super(e,U.k4.ROOT_USER_SETTINGS),this.http=e,this.authCS=a}saveRootUserSettings(e){return this.http.put(s.N.BE_HOST_PORT_SITES+`${this.modelPath}/set-root-user-settings`,e).toPromise()}getRootUserSettings(){return this.http.get(s.N.BE_HOST_PORT_SITES+`${this.modelPath}/get-root-user-settings`)}verifyRootUserSettings(e){return this.http.post(s.N.BE_HOST_PORT_SITES+`${this.modelPath}/verify-root-user-settings`,e).toPromise()}static \u0275fac=function(a){return new(a||n)(t.LFG(_.eN),t.LFG(f.D))};static \u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var D=i(77240),b=i(53429),S=i(99961),x=i(96814),A=i(32660),J=i(756),I=i(97680),L=i(33259),O=i(96218),N=i(54323);function w(n,c){1&n&&t._UZ(0,"i",52)}function P(n,c){if(1&n&&t._UZ(0,"i",53),2&n){const e=t.oxw();t.Q6J("pTooltip",null==e.validationResp?null:e.validationResp.logDatabaseConnectionMessage)}}function E(n,c){1&n&&t._UZ(0,"i",52)}function q(n,c){if(1&n&&t._UZ(0,"i",54),2&n){const e=t.oxw();t.Q6J("pTooltip",null==e.validationResp?null:e.validationResp.externalRedisSettingsJsonMessage)}}function k(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"a",55),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.installAndDetectD2Lib())}),t._UZ(1,"i",56),t._uU(2," Auto Install "),t.qZA()}}function W(n,c){1&n&&t._UZ(0,"i",52)}function Y(n,c){if(1&n&&(t.TgZ(0,"span",57),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.validationResp.d2DiagramLibVersion)}}function M(n,c){if(1&n&&t._UZ(0,"i",53),2&n){const e=t.oxw();t.Q6J("pTooltip",null==e.validationResp?null:e.validationResp.d2DiagramLibPathMessage)}}function V(n,c){if(1&n&&(t.TgZ(0,"div",58)(1,"div",59),t._UZ(2,"div",60),t.ALo(3,"safeHtml"),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("innerHTML",t.lcZ(3,1,e.d2InstallError),t.oJD)}}function G(n,c){1&n&&t._UZ(0,"p-progressSpinner",61)}const j=[{path:"",component:(()=>{class n{fb;monacoS;authCS;rootUserSettings;generalS;instanceS;ns;cd;notificationS;form;formData;loading={form:!1};BE_HOST_PORT=s.N.BE_HOST_PORT;sampleConnectionString="mongodb://username:password@127.0.0.1:27017/databaseName?authSource=admin&replicaSet=rs0&directConnection=true";sampleJson='{\n "nodes": [\n {\n "port": 6390,\n "host": "127.0.0.1",\n "pass": ""\n }\n ],\n "otherRedisClusterOptions": null,\n "redisValueExpireInSeconds": 7200,\n "maxCharsResToCache": 1000000\n}';editorRedisConnectionJSON;editorOptionsRedisConnectionJSON={readOnly:!1,language:"json",contextmenu:!0};editorStartupScript;editorOptionsStartupScript={readOnly:!1,language:"bash",contextmenu:!0};d2InstallError;validationResp;constructor(e,a,o,r,p,g,u,F,B){this.fb=e,this.monacoS=a,this.authCS=o,this.rootUserSettings=r,this.generalS=p,this.instanceS=g,this.ns=u,this.cd=F,this.notificationS=B}ngOnInit(){var e=this;return(0,d.Z)(function*(){e.createForm(),yield e.loadData()})()}createForm(){this.form=this.fb.group({logDatabaseConnectionString:["",[]],externalRedisSettingsJsonString:["",[]],serverStartupScript:["",[]],universalLoginCaptcha:["",[]],logRemoveSchedulerInterval:["0 0 0 * * *",[]],passJWTOfAPIUsers:["",[]],jwtTokenExpiresInSeconds:[259200,[l.kI.min(60),l.kI.max(10368e4)]],maxLogsCount:[1e4,[]],d2DiagramLibPath:[1e4,[]]})}loadData(){var e=this;return(0,d.Z)(function*(){try{e.loading.form=!0;const a=(yield e.rootUserSettings.getRootUserSettings().toPromise()).data;if(e.form.reset(),e.form.patchValue(a),a?.logDatabaseConnectionString){const o=e.generalS.getDecryptedString(a.logDatabaseConnectionString,s.N.crypto.passCommunication);e.form.get("logDatabaseConnectionString").setValue(o)}if(a?.passJWTOfAPIUsers){const o=e.generalS.getDecryptedString(a.passJWTOfAPIUsers,s.N.crypto.passCommunication);e.form.get("passJWTOfAPIUsers").setValue(o)}if(a?.externalRedisSettingsJsonString){const o=e.generalS.getDecryptedString(a.externalRedisSettingsJsonString,s.N.crypto.passCommunication);e.editorRedisConnectionJSON.setValue(o)}if(a?.serverStartupScript&&e.editorStartupScript.setValue(a.serverStartupScript),a?.universalLoginCaptcha){const o=e.generalS.getDecryptedString(a.universalLoginCaptcha,s.N.crypto.passCommunication);e.form.get("universalLoginCaptcha").setValue(o)}e.loading.form=!1}catch(a){e.loading.form=!1,e.ns.showErrorFromResponse(a.error||a,"Unable to load data.")}})()}update(){var e=this;return(0,d.Z)(function*(){try{e.loading.form=!0,e.formData=e.form.getRawValue(),e.form.get("logDatabaseConnectionString").value&&(e.formData.logDatabaseConnectionString=e.generalS.getEncryptedString(e.form.get("logDatabaseConnectionString").value,s.N.crypto.passCommunication)),e.form.get("passJWTOfAPIUsers").value&&(e.formData.passJWTOfAPIUsers=e.generalS.getEncryptedString(e.form.get("passJWTOfAPIUsers").value,s.N.crypto.passCommunication)),e.editorRedisConnectionJSON.getValue()&&(e.formData.externalRedisSettingsJsonString=e.generalS.getEncryptedString(e.editorRedisConnectionJSON.getValue(),s.N.crypto.passCommunication)),e.editorStartupScript.getValue()&&(e.formData.serverStartupScript=e.editorStartupScript.getValue()),e.form.get("universalLoginCaptcha").value&&(e.formData.universalLoginCaptcha=e.generalS.getEncryptedString(e.form.get("universalLoginCaptcha").value,s.N.crypto.passCommunication)),yield e.verifyRootUser(e.formData),!e.validationResp.logDatabaseConnectionMessage&&!e.validationResp.externalRedisSettingsJsonMessage&&(yield e.rootUserSettings.saveRootUserSettings(e.formData),e.loading.form=!1,e.ns.showSuccess("Settings verified and saved successfully.")),e.loading.form=!1}catch(a){e.loading.form=!1,e.ns.showErrorFromResponse(a.error||a,"Unable to update.")}})()}verifyRootUser(e){var a=this;return(0,d.Z)(function*(){const o=yield a.rootUserSettings.verifyRootUserSettings(e);a.validationResp=o.data,setTimeout(()=>{a.cd.detectChanges()},1e3)})()}copyToClipboard(e){var a=this;return(0,d.Z)(function*(){"json"===e?yield navigator.clipboard.writeText(a.sampleJson):yield navigator.clipboard.writeText(a.sampleConnectionString),a.notificationS.showSuccess("Copied to clipboard.")})()}editorGenerated(e){var a=this;return(0,d.Z)(function*(){a.loading.form=!0,a.editorRedisConnectionJSON=e,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(e,o=>{a.form.valid&&a.update()}),a.loading.form=!1})()}editorGeneratedStartupScript(e){var a=this;return(0,d.Z)(function*(){a.loading.form=!0,a.editorStartupScript=e,a.monacoS.addSaveCodeKeyBinding(e,o=>{a.form.valid&&a.update()}),a.loading.form=!1})()}installAndDetectD2Lib(){var e=this;return(0,d.Z)(function*(){e.loading.form=!0;try{const o=(yield e.instanceS.installAndDetectD2Lib()).data,r=o[0].d2InstallOutput?.data?.d2LibPath;if(r)e.form.patchValue({d2DiagramLibPath:r}),e.ns.showSuccess("D2 library installed successfully.");else{const p=o[0].d2InstallOutput?.errors?.[0]?.message;e.ns.showError(p),e.d2InstallError=p}}catch(a){e.ns.showErrorFromResponse(a.error||a,"Unable to install d2 diagram library.")}e.loading.form=!1,e.cd.detectChanges()})()}generateRandomValue(e){const a=this.generalS.getRandomStringWithCapitals(5),o=this.generalS.getRandomStringWithCapitals(5),r=this.generalS.getRandomStringWithCapitals(5),p=this.generalS.getRandomStringWithCapitals(5),g=this.generalS.getRandomStringWithCapitals(5),u=this.generalS.getRandomStringWithCapitals(5);this.form.get(e).setValue(`${a}_${o}_${r}_${p}_${g}_${u}`)}static \u0275fac=function(a){return new(a||n)(t.Y36(l.qu),t.Y36(C.b),t.Y36(f.D),t.Y36(R),t.Y36(D.b),t.Y36(b.E),t.Y36(S.W),t.Y36(t.sBO),t.Y36(S.W))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-dep-set-layout"]],decls:153,vars:24,consts:[[1,"pt-1","pr-1","pl-1","full-body","overflow-auto"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-cog","text-danger","fa-fw","mr-1"],[1,"card-body","p-0","overflow-hidden"],[1,"pl-3","overflow-auto","h-100"],[1,"pb-5",3,"formGroup"],[1,"form-group","row","mt-3","mb-0","ml-0","mr-0"],[1,"text-left","mb-0"],["class","fas fa-check-circle text-success pt-1 ml-2",4,"ngIf"],["class","fas fa-times-circle text-danger pt-1 ml-2 hover",3,"pTooltip",4,"ngIf"],[1,"form-group","row","ml-0","mr-0"],[1,"col-7","pl-0","pr-0"],["rows","5","formControlName","logDatabaseConnectionString","spellcheck","false","placeholder","Please provide log database connection string","pInputTextarea","",1,"form-control","form-control-sm","font-monospaced",3,"autoResize"],[1,"text-danger","small","col-12","pl-0","pr-0"],[1,"col-4","border","ml-3","pt-3"],["pTooltip","Copy to clipboard",1,"fas","fa-copy","text-warning","fa-fw","cursor-pointer","line-height-1-3","mr-2","float-right",3,"click"],[1,"form-group","row","mt-5","mb-0","ml-0","mr-0"],[1,"small","text-muted"],[1,"form-group","row","mb-3","ml-0","mr-0"],["formControlName","logRemoveSchedulerInterval","name","logRemoveSchedulerInterval","spellcheck","false","type","text","placeholder","For daily : 0 0 0 * * *",1,"form-control","form-control-sm","font-monospaced","col-7"],["formControlName","maxLogsCount","name","maxLogsCount","spellcheck","false","type","number","placeholder","10000",1,"form-control","form-control-sm","font-monospaced","col-7"],["class","fas fa-times-circle text-danger pt-1 ml-2",3,"pTooltip",4,"ngIf"],[1,"pr-0","pl-0",2,"height","277px"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[1,"col-4","border","ml-3"],["title","Copy to clipboard",1,"fas","fa-copy","text-warning","fa-fw","cursor-pointer","line-height-1-3","mr-2","pt-3","float-right",3,"click"],[1,"mb-0","mt-0"],[1,"fw-bold"],[1,"json-key"],[1,"json-val"],[1,"json-num-val"],["formControlName","universalLoginCaptcha","name","universalLoginCaptcha","spellcheck","false","type","text","placeholder","Please provide universal login captcha",1,"form-control","form-control-sm","font-monospaced","col-7"],[1,"text-left","col-7","p-0","mb-0"],["href","https://docs.apimaker.dev/v1/docs/blog/install-d2.html","target","_blank",1,"float-right","small","text-warning"],[1,"fas","fa-link","fa-fw"],["class","float-right small text-info mr-3","href","javascript:",3,"click",4,"ngIf"],["class","ml-1",4,"ngIf"],["formControlName","d2DiagramLibPath","name","d2DiagramLibPath","spellcheck","false","type","text","placeholder","Please provide D2 diagram library path. ex : /usr/local/bin/d2",1,"form-control","form-control-sm","font-monospaced","col-7"],["class","row",4,"ngIf"],["href","javascript:",1,"float-right","small","text-info",3,"click"],[1,"fas","fa-random","fa-fw"],[1,"form-group","row","ml-0","mr-0","mb-0"],["maxlength","32","formControlName","passJWTOfAPIUsers","name","passJWTOfAPIUsers","spellcheck","false","type","text","placeholder","",1,"form-control","form-control-sm","font-monospaced","col-7"],[1,"row","mb-3","ml-0","mr-0"],["formControlName","jwtTokenExpiresInSeconds","name","jwtTokenExpiresInSeconds","spellcheck","false","type","number","placeholder","",1,"form-control","form-control-sm","font-monospaced","col-7"],[2,"white-space","break-spaces"],[1,"form-group","row","mb-3","ml-0","mr-0","mt-5"],[1,"float-left","ml-1","mt-3"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary",3,"click"],[1,"fas","fa-save","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-check-circle","text-success","pt-1","ml-2"],[1,"fas","fa-times-circle","text-danger","pt-1","ml-2","hover",3,"pTooltip"],[1,"fas","fa-times-circle","text-danger","pt-1","ml-2",3,"pTooltip"],["href","javascript:",1,"float-right","small","text-info","mr-3",3,"click"],[1,"fas","fa-cloud-download-alt","fa-fw"],[1,"ml-1"],[1,"row"],[1,"col-7"],[1,"text-right",3,"innerHTML"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),t._UZ(4,"i",3),t._uU(5," Settings"),t.qZA()(),t.TgZ(6,"div",4)(7,"div",5)(8,"form",6)(9,"div",7)(10,"label",8),t._uU(11,"Log Database Connection String"),t.qZA(),t.YNc(12,w,1,0,"i",9),t.YNc(13,P,1,1,"i",10),t.qZA(),t.TgZ(14,"div",11)(15,"div",12),t._UZ(16,"textarea",13),t.TgZ(17,"div",14),t._uU(18),t.qZA()(),t.TgZ(19,"div",15)(20,"p")(21,"i",16),t.NdJ("click",function(){return o.copyToClipboard()}),t.qZA()(),t.TgZ(22,"p"),t._uU(23),t.qZA()()(),t.TgZ(24,"div",17)(25,"label",8),t._uU(26,"Log Remove Scheduler Run CRON "),t.TgZ(27,"span",18),t._uU(28,"(Clean logs daily ex : 0 0 0 * * *)"),t.qZA()()(),t.TgZ(29,"div",19),t._UZ(30,"input",20),t.TgZ(31,"div",14),t._uU(32),t.qZA()(),t.TgZ(33,"div",17)(34,"label",8),t._uU(35,"Max logs save count "),t.TgZ(36,"span",18),t._uU(37,"(ex: 10000, it will keep recent 10000 logs)"),t.qZA()()(),t.TgZ(38,"div",19),t._UZ(39,"input",21),t.qZA(),t.TgZ(40,"div",17)(41,"label",8),t._uU(42,"Redis Connection JSON"),t.qZA(),t.YNc(43,E,1,0,"i",9),t.YNc(44,q,1,1,"i",22),t.qZA(),t.TgZ(45,"div",19)(46,"div",12)(47,"div",23)(48,"app-monaco-editor",24),t.NdJ("editorGenerated",function(p){return o.editorGenerated(p)}),t.qZA()(),t.TgZ(49,"div",14),t._uU(50),t.qZA()(),t.TgZ(51,"div",25)(52,"span")(53,"i",26),t.NdJ("click",function(){return o.copyToClipboard("json")}),t.qZA()(),t.TgZ(54,"pre",27)(55,"code",28),t._uU(56),t.TgZ(57,"span",29),t._uU(58,'"nodes"'),t.qZA(),t._uU(59),t.TgZ(60,"span",29),t._uU(61,'"port"'),t.qZA(),t._uU(62,": "),t.TgZ(63,"span",30),t._uU(64,"6390"),t.qZA(),t._uU(65,",\n "),t.TgZ(66,"span",29),t._uU(67,'"host"'),t.qZA(),t._uU(68,": "),t.TgZ(69,"span",30),t._uU(70,'"127.0.0.1"'),t.qZA(),t._uU(71,",\n "),t.TgZ(72,"span",29),t._uU(73,'"pass"'),t.qZA(),t._uU(74,": "),t.TgZ(75,"span",30),t._uU(76,'""'),t.qZA(),t._uU(77),t.TgZ(78,"span",29),t._uU(79,'"otherRedisClusterOptions"'),t.qZA(),t._uU(80,": "),t.TgZ(81,"span",30),t._uU(82,"null"),t.qZA(),t._uU(83,",\n "),t.TgZ(84,"span",29),t._uU(85,'"redisValueExpireInSeconds"'),t.qZA(),t._uU(86,": "),t.TgZ(87,"span",31),t._uU(88,"7200"),t.qZA(),t._uU(89,",\n "),t.TgZ(90,"span",29),t._uU(91,'"maxCharsResToCache"'),t.qZA(),t._uU(92,": "),t.TgZ(93,"span",31),t._uU(94,"1000000"),t.qZA(),t._uU(95),t.qZA(),t._uU(96,"\n"),t.qZA()()(),t.TgZ(97,"div",17)(98,"label",8),t._uU(99,"Universal Login Captcha"),t.qZA()(),t.TgZ(100,"div",19),t._UZ(101,"input",32),t.qZA(),t.TgZ(102,"div",17)(103,"label",33),t._uU(104," D2 Diagram Library Path "),t.TgZ(105,"a",34),t._UZ(106,"i",35),t._uU(107," Install Guide "),t.qZA(),t.YNc(108,k,3,0,"a",36),t.YNc(109,W,1,0,"i",9),t.YNc(110,Y,2,1,"span",37),t.YNc(111,M,1,1,"i",10),t.qZA()(),t.TgZ(112,"div",19),t._UZ(113,"input",38),t.qZA(),t.YNc(114,V,4,3,"div",39),t.TgZ(115,"div",17)(116,"label",33),t._uU(117," JWT Password "),t.TgZ(118,"span",18),t._uU(119,"(It will be used for generating JWT tokens)"),t.qZA(),t.TgZ(120,"a",40),t.NdJ("click",function(){return o.generateRandomValue("passJWTOfAPIUsers")}),t._UZ(121,"i",41),t._uU(122," Generate "),t.qZA()()(),t.TgZ(123,"div",42),t._UZ(124,"input",43),t.qZA(),t.TgZ(125,"div",44)(126,"span",18),t._uU(127,"If you change this value, all the users of your applications will be logged out."),t.qZA()(),t.TgZ(128,"div",17)(129,"label",33),t._uU(130," JWT Tokens Expires In Seconds "),t.TgZ(131,"span",18),t._uU(132,"(259200 = 3 Days | 72 Hours)"),t.qZA()()(),t.TgZ(133,"div",19),t._UZ(134,"input",45),t.qZA(),t.TgZ(135,"div",17)(136,"label",8),t._uU(137,"Server Startup Script"),t.qZA()(),t.TgZ(138,"div",19)(139,"div",12)(140,"div",23)(141,"app-monaco-editor",24),t.NdJ("editorGenerated",function(p){return o.editorGeneratedStartupScript(p)}),t.qZA()(),t._UZ(142,"div",14),t.qZA(),t.TgZ(143,"div",25)(144,"pre",46),t._uU(145,"\n\u21d2 You can write direct bash script in it.\n\u21d2 It will be executed once when process starts or 1st worker starts.\n\u21d2 All environment variables are available.\n\u21d2 Mostly used to provide NPM packages to native APIs, but we can write anything based on our business requirement.\n\n Ex:-\n npm install is-even\n"),t.qZA()()(),t.TgZ(146,"div",47)(147,"div",48)(148,"button",49),t.NdJ("click",function(){return o.update()}),t._UZ(149,"i",50),t.TgZ(150,"span"),t._uU(151,"Update"),t.qZA()()()()()()(),t.YNc(152,G,1,0,"p-progressSpinner",51),t.qZA()()),2&a&&(t.xp6(8),t.Q6J("formGroup",o.form),t.xp6(4),t.Q6J("ngIf",o.validationResp&&(null==o.formData?null:o.formData.logDatabaseConnectionString)&&!(null!=o.validationResp&&o.validationResp.logDatabaseConnectionMessage)),t.xp6(1),t.Q6J("ngIf",null==o.validationResp?null:o.validationResp.logDatabaseConnectionMessage),t.xp6(3),t.Q6J("autoResize",!0),t.xp6(2),t.Oqu(null==o.validationResp?null:o.validationResp.logDatabaseConnectionMessage),t.xp6(5),t.Oqu(o.sampleConnectionString),t.xp6(9),t.Oqu(null==o.validationResp?null:o.validationResp.logRemoveSchedulerIntervalMessage),t.xp6(11),t.Q6J("ngIf",o.validationResp&&(null==o.formData?null:o.formData.externalRedisSettingsJsonString)&&!(null!=o.validationResp&&o.validationResp.externalRedisSettingsJsonMessage)),t.xp6(1),t.Q6J("ngIf",null==o.validationResp?null:o.validationResp.externalRedisSettingsJsonMessage),t.xp6(4),t.Q6J("isSchemaEditor",!1)("editorOptions",o.editorOptionsRedisConnectionJSON),t.xp6(2),t.Oqu(null==o.validationResp?null:o.validationResp.externalRedisSettingsJsonMessage),t.xp6(6),t.hij("\n","{","\n "),t.xp6(3),t.hij(": [\n ","{","\n "),t.xp6(18),t.hij("\n ","}","\n ],\n "),t.xp6(18),t.hij("\n","}","\n"),t.xp6(13),t.Q6J("ngIf","Linux"===o.authCS.backendSettings.osType),t.xp6(1),t.Q6J("ngIf",null==o.validationResp?null:o.validationResp.d2DiagramLibVersion),t.xp6(1),t.Q6J("ngIf",null==o.validationResp?null:o.validationResp.d2DiagramLibVersion),t.xp6(1),t.Q6J("ngIf",null==o.validationResp?null:o.validationResp.d2DiagramLibPathMessage),t.xp6(3),t.Q6J("ngIf",o.d2InstallError),t.xp6(27),t.Q6J("isSchemaEditor",!1)("editorOptions",o.editorOptionsStartupScript),t.xp6(11),t.Q6J("ngIf",o.loading.form))},dependencies:[l._Y,l.Fj,l.wV,l.JJ,l.JL,l.nD,l.sg,l.u,x.O5,A.y,J.O,I.G,L.u,O.g,N.z],encapsulation:2})}return n})(),canActivate:[T.g]}];let Q=(()=>{class n{static \u0275fac=function(a){return new(a||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[h.Bz.forChild(j),Z.u]})}return n})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6393],{66393:(ae,v,r)=>{r.r(v),r.d(v,{AdminUserM:()=>te});var b=r(77664),E=r(17017),e=r(94946),m=r(15861),c=r(33157),p=r(90328),f=r(56212),M=r(6990),u=r(60921),h=r(51162),U=r(33835),C=r(77240),A=r(99961),Z=r(85219),x=r(92189),y=r(90204),P=r(32915),S=r(96814),_=r(95431),D=r(97680),N=r(33259),o=r(60095),T=r(20553),O=r(95852),R=r(32660);function Y(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",22),e._uU(2," Add User"),e.qZA())}function k(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",23),e._uU(2," View User"),e.qZA())}function J(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Edit User"),e.qZA())}function Q(n,l){1&n&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",25),e.qZA()())}function V(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function q(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function G(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"button",26),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.save())}),e._UZ(1,"i",27),e.YNc(2,V,2,0,"span",4),e.YNc(3,q,2,0,"span",4),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function W(n,l){1&n&&e._UZ(0,"p-progressSpinner",28)}let w=(()=>{class n{fb;ns;userS;generalS;constantsCS;authCS;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];constructor(t,s,a,i,d,g){this.fb=t,this.ns=s,this.userS=a,this.generalS=i,this.constantsCS=d,this.authCS=g}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var s=(0,m.Z)(function*(a){if(a)if(t.form.enable(),a.action===c.F.OPEN_FORM_IN_EDIT_MODE){const i=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(i.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(a.action===c.F.OPEN_FORM_IN_VIEW_MODE){const i=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(i.data),t.form.disable()}else a.action===c.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("password").setValidators([o.kI.required,o.kI.minLength(4),o.kI.maxLength(40)]),t.form.get("password").updateValueAndValidity())});return function(a){return s.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[o.kI.required]],email:[null,[o.kI.required,o.kI.email]],apiPath:[null,[o.kI.required,o.kI.minLength(3),o.kI.maxLength(25),o.kI.pattern("[a-z0-9]*")]],password:[null,[]]})}showModal(){$("#idAMUsersForm").modal("show")}hideModal(){$("#idAMUsersForm").modal("hide")}save(){var t=this;return(0,m.Z)(function*(){const s=t.form.getRawValue();s.user=t.authCS.getUserId(),s.userType=u.d.ADMIN;try{let a;t.loading.form=!0,t.data.mode===p.D.ADD?(s.password=t.generalS.getEncryptedString(s.password,T.N.crypto.passCommunication),a=yield t.userS.post(s).toPromise(),t.ns.showSuccess(t.constantsCS.user.addSuccess)):t.data.mode===p.D.EDIT&&(t.data.formData._id&&(s.userType=t.data.formData.userType,t.form.get("password").value?s.password=t.generalS.getEncryptedString(s.password,T.N.crypto.passCommunication):delete s.password),a=yield t.userS.put(t.data.formData._id,s,{select:h.iH._id}).toPromise(),t.ns.showSuccess(t.constantsCS.user.editSuccess)),t.data.eventChannel.emit({action:t.data.mode===p.D.ADD?c.F.SAVED:c.F.UPDATED}),t.loading.form=!1}catch(a){t.loading.form=!1,t.ns.showErrorFromResponse(a.error||a,"Unable to save user info.")}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(s){return new(s||n)(e.Y36(o.qu),e.Y36(A.W),e.Y36(U.K),e.Y36(C.b),e.Y36(y.s),e.Y36(O.D))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-admin-user-form"]],inputs:{data:"data"},decls:34,vars:7,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idAMUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","email","name","email","spellcheck","false","type","text","placeholder","Please provide email",1,"form-control","form-control-sm"],["class","form-group row",4,"ngIf"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide api path",1,"form-control","text-lowercase","form-control-sm"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,a){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Y,3,0,"span",4),e.YNc(5,k,3,0,"span",4),e.YNc(6,J,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Email"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.YNc(22,Q,5,0,"div",15),e.TgZ(23,"div",10)(24,"label",11),e._uU(25,"API Path"),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",16),e.qZA()()()(),e.TgZ(28,"div",17)(29,"button",18),e._UZ(30,"i",19),e._uU(31," Close"),e.qZA(),e.YNc(32,G,4,3,"button",20),e.qZA(),e.YNc(33,W,1,0,"p-progressSpinner",21),e.qZA()()()),2&s&&(e.xp6(4),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",a.form),e.xp6(11),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(10),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.loading.form))},dependencies:[o._Y,o.Fj,o.JJ,o.JL,o.sg,o.u,S.O5,R.y,D.G],encapsulation:2})}return n})();const K=["adminUserFormC"];function H(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",14),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.edit())}),e._UZ(1,"i",15),e.qZA()}}function L(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",16),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.removePermanentDialog())}),e._UZ(1,"i",17),e.qZA()}}function B(n,l){1&n&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Email"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"API Path"),e.qZA()())}function j(n,l){if(1&n&&(e.TgZ(0,"tr",18)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA()()),2&n){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.email),e.xp6(2),e.Oqu(t.apiPath)}}function X(n,l){1&n&&e._UZ(0,"p-progressSpinner",19)}let I=(()=>{class n{userS;generalS;notificationS;confirmationService;navigationCS;constantsCS;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=h.iH._id;adminUserFormC;constructor(t,s,a,i,d,g,se){this.userS=t,this.generalS=s,this.notificationS=a,this.confirmationService=i,this.navigationCS=d,this.constantsCS=g,this.eventCenterS=se}ngOnInit(){this.eventCenterS.user.selectedUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===c.F.SAVED||t.action===c.F.UPDATED)&&(this.adminUserFormC.hideModal(),this.loadGridData())}))}loadGridData(){var t=this;this.loading.grid=!0;const s={find:{active:!0,userType:{$in:[u.d.ROOT,u.d.ADMIN]}},select:{name:1,email:1,apiPath:1,active:1,userType:1},sort:{name:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.userS.query(s).subscribe(function(){var a=(0,m.Z)(function*(i){i.success&&(t.selectedRows=[],t.rows=i.data,t.rowsMap=M.keyBy(t.rows,h.iH._id));const d=t.navigationCS.getQueryParam(f.p.user);t.rowsMap[d]&&(t.eventCenterS.user.selectedUsers.next([t.rowsMap[d]]),t.selectedRows=[t.rowsMap[d]],yield t.fillData()),t.loading.grid=!1});return function(i){return a.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_ADD_MODE}),this.adminUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.VIEW,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_VIEW_MODE}),this.adminUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_EDIT_MODE}),this.adminUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,m.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsCS.user.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,m.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,m.Z)(function*(){t.loading.grid=!0;const s=yield t.userS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,s.success?(t.notificationS.showSuccess(t.constantsCS.user.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(s,t.constantsCS.user.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.user.selectedUsers.next([])}resetDependents(){var t=this;return(0,m.Z)(function*(){t.eventCenterS.user.selectedUsers.next([]),yield t.navigationCS.setQueryParam(f.p.user,null)})()}adminUserSelected(t){var s=this;return(0,m.Z)(function*(){s.selectedRows=t,s.resetDependents(),s.fillData()})()}fillData(){var t=this;return(0,m.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(f.p.user,""),void t.eventCenterS.user.selectedUsers.next([]);const s=(yield t.userS.getById(t.selectedRows[0]._id).toPromise()).data;s._id?(yield t.navigationCS.setQueryParam(f.p.user,s._id),t.eventCenterS.user.selectedUsers.next([s])):t.resetDependents()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||n)(e.Y36(U.K),e.Y36(C.b),e.Y36(A.W),e.Y36(Z.YP),e.Y36(x.S),e.Y36(y.s),e.Y36(P.u))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-admin-users"]],viewQuery:function(s,a){if(1&s&&e.Gf(K,5),2&s){let i;e.iGM(i=e.CRH())&&(a.adminUserFormC=i.first)}},decls:16,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-users","text-info","fa-fw","mr-1"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Make Inactive",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["adminUserFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Make Inactive",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,a){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Users"),e.qZA(),e.TgZ(5,"span",3),e.NdJ("click",function(){return a.add()}),e._UZ(6,"i",4),e.qZA(),e.YNc(7,H,2,0,"span",5),e.YNc(8,L,2,0,"span",6),e.qZA(),e.TgZ(9,"div",7)(10,"p-table",8),e.NdJ("selectionChange",function(d){return a.selectedRows=d})("dblclick",function(){return a.dblClickUsers()})("selectionChange",function(d){return a.adminUserSelected(d)}),e.YNc(11,B,7,0,"ng-template",9),e.YNc(12,j,7,4,"ng-template",10),e.qZA(),e.YNc(13,X,1,0,"p-progressSpinner",11),e.qZA()(),e._UZ(14,"app-w-admin-user-form",12,13)),2&s&&(e.xp6(7),e.Q6J("ngIf",a.selectedRows.length),e.xp6(1),e.Q6J("ngIf",a.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),e.xp6(3),e.Q6J("ngIf",a.loading.grid),e.xp6(1),e.Q6J("data",a.data))},dependencies:[S.O5,_.iA,Z.jx,_.Ei,D.G,N.u,w],encapsulation:2})}return n})();const ee=[{path:"",component:(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-admin-user-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"],[1,"w-100"]],template:function(s,a){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"app-w-admin-users",1),e.qZA())},dependencies:[I],encapsulation:2})}return n})(),canActivate:[r(81490).g]}];let te=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[b.Bz.forChild(ee),E.u]})}return n})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7368],{67368:(xe,S,s)=>{s.r(S),s.d(S,{SandboxSettingsM:()=>fe});var O=s(77664),D=s(63726),y=s(17017),M=s(70292),r=s(15861),e=s(94946),u=s(6990),v=s(33157),c=s(90328),k=s(51162),h=s(20553),I=s(54371),x=s(95852),b=s(33835),w=s(25405),Z=s(99961),p=s(85219),T=s(27414),U=s(62304),N=s(24977),P=s(53429),E=s(81344),J=s(77240),g=s(60095),_=s(96814),R=s(38147),G=s(91861),q=s(756),f=s(95431),K=s(97680),C=s(14844),A=s(33259),Y=s(32660);function F(a,l){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th",28),e._uU(4,"Action"),e.qZA()())}function H(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",31)(1,"button",32),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.editAllowedOrigin(n,o))}),e._UZ(2,"i",33),e.qZA(),e.TgZ(3,"button",34),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.removeAllowedOrigin(n,o))}),e._UZ(4,"i",35),e.qZA()()}}function L(a,l){if(1&a&&(e.TgZ(0,"tr",29)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,H,5,0,"div",30),e.qZA()()),2&a){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",!t.isReadOnly)}}function Q(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.save())}),e._UZ(1,"i",37),e.TgZ(2,"span"),e._uU(3,"Save"),e.qZA()()}}let V=(()=>{class a{authCS;userS;eventCenterCS;notificationS;cs;confirmationService;modalId="idAllowedOriginModal";subscriptions=[];allowedOriginsGridData=[];saveSettings=new e.vpe;gridKeyAllowedOrigins="name";allowedOriginModel={domainName:"",domainNameBak:""};exampleOrigin=location.origin;allowedOriginData={mode:c.D.ADD};EFormMode=c.D;selectedRowsUI=[];constructor(t,i,n,o,d,m){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.cs=d,this.confirmationService=m}ngOnInit(){}save(){var t=this;return(0,r.Z)(function*(){if(t.allowedOriginData.mode===c.D.ADD)t.allowedOriginsGridData.push({name:t.allowedOriginModel.domainName});else{const i=t.allowedOriginsGridData.findIndex(n=>n.name===t.allowedOriginModel.domainNameBak);t.allowedOriginsGridData[i].name=t.allowedOriginModel.domainName}t.allowedOriginsGridData=u.uniqBy(t.allowedOriginsGridData,"name"),t.saveSettings.emit(),t.hideAllowedOriginModal()})()}showAllowedOriginModal(){$("#idAllowedOriginModal").modal("show")}hideAllowedOriginModal(){$("#idAllowedOriginModal").modal("hide")}addAllowedOrigin(){var t=this;return(0,r.Z)(function*(){t.allowedOriginModel.domainNameBak=t.allowedOriginModel.domainName="",t.allowedOriginData.mode=c.D.ADD,t.showAllowedOriginModal()})()}editAllowedOrigin(t,i){var n=this;return(0,r.Z)(function*(){n.allowedOriginModel.domainNameBak=n.allowedOriginModel.domainName=i.name,n.allowedOriginData.mode=c.D.EDIT,n.showAllowedOriginModal()})()}doubleClick(){this.editAllowedOrigin(null,this.selectedRowsUI[0]).then()}removeAllowedOrigin(t,i){var n=this;return(0,r.Z)(function*(){var o;n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentAllowedOriginConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,r.Z)(function*(){yield n.removeAO(t,i)}),function(){return o.apply(this,arguments)})})})()}removeAO(t,i){var n=this;return(0,r.Z)(function*(){const o=n.allowedOriginsGridData.findIndex(d=>d.name===i.name);n.allowedOriginsGridData.splice(o,1),n.saveSettings.emit()})()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.Y36(x.D),e.Y36(b.K),e.Y36(w.M),e.Y36(Z.W),e.Y36(T.L),e.Y36(p.YP))};static \u0275cmp=e.Xpm({type:a,selectors:[["allowed-origin-c"]],inputs:{allowedOriginsGridData:["allowedOrigins","allowedOriginsGridData"]},outputs:{saveSettings:"saveSettings"},decls:37,vars:10,consts:[[1,"card","shadow-sm","mt-2","mr-1","mb-5",2,"height","384px"],[1,"card-header"],[1,"fas","fa-link","text-yellow","fa-fw","mr-1"],["pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","350px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["aria-hidden","true","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",3,"id"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","mt-3","mb-0"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["name","name","spellcheck","false","type","text","placeholder","Please provide domain name",1,"form-control","form-control-sm",3,"ngModel","blur","ngModelChange"],[1,"form-group","row"],[1,"col-form-label","col-form-label-sm","text-info","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"click",4,"ngIf"],[2,"width","100px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"text-center"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"]],template:function(i,n){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Allowed Origins"),e.qZA(),e.TgZ(5,"span",3),e.NdJ("click",function(){return n.addAllowedOrigin()}),e._UZ(6,"i",4),e.qZA()(),e.TgZ(7,"div",5)(8,"p-table",6),e.NdJ("selectionChange",function(d){return n.selectedRowsUI=d})("dblclick",function(){return n.doubleClick()}),e.YNc(9,F,5,0,"ng-template",7),e.YNc(10,L,5,3,"ng-template",8),e.qZA()()(),e.TgZ(11,"div",9)(12,"div",10)(13,"div",11)(14,"div",12)(15,"span"),e._UZ(16,"i",13),e._uU(17," Allowed Origins"),e.qZA(),e.TgZ(18,"button",14)(19,"span",15),e._UZ(20,"i",16),e.qZA()()(),e.TgZ(21,"div",17)(22,"div",18)(23,"label",19),e._uU(24,"Domain name"),e.qZA(),e.TgZ(25,"div",20)(26,"input",21),e.NdJ("blur",function(){return n.allowedOriginModel.domainName=n.allowedOriginModel.domainName.toLowerCase()})("ngModelChange",function(d){return n.allowedOriginModel.domainName=d}),e.qZA()()(),e.TgZ(27,"div",22),e._UZ(28,"label",19),e.TgZ(29,"div",20)(30,"label",23),e._uU(31),e.qZA()()()(),e.TgZ(32,"div",24)(33,"button",25),e._UZ(34,"i",26),e._uU(35," Close"),e.qZA(),e.YNc(36,Q,4,0,"button",27),e.qZA()()()()),2&i&&(e.xp6(8),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRowsUI)("dataKey",n.gridKeyAllowedOrigins)("scrollable",!0)("value",n.allowedOriginsGridData),e.xp6(3),e.s9C("id",n.modalId),e.xp6(15),e.Q6J("ngModel",n.allowedOriginModel.domainName),e.xp6(5),e.hij("(Ex: ",n.exampleOrigin,")"),e.xp6(5),e.Q6J("ngIf",n.allowedOriginData.mode!==n.EFormMode.VIEW))},dependencies:[g.Fj,g.JJ,g.On,_.O5,Y.y,f.iA,p.jx,f.Ei,A.u],encapsulation:2})}return a})();const B=["addNpmLibC"],j=["allowedOriginC"],W=["SandboxSettingsPkgVersionsModalC"];function z(a,l){1&a&&(e.TgZ(0,"tr"),e._UZ(1,"th",49)(2,"th",50),e.TgZ(3,"th",51),e._uU(4,"Version"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Name"),e.qZA(),e.TgZ(7,"th",52),e._uU(8,"Sub Dependencies"),e.qZA(),e.TgZ(9,"th",53),e._uU(10,"Third Party API"),e.qZA(),e.TgZ(11,"th",54),e._uU(12,"Default"),e.qZA(),e.TgZ(13,"th",55),e._uU(14,"Action"),e.qZA()())}function X(a,l){1&a&&e._UZ(0,"i",64)}function ee(a,l){1&a&&e._UZ(0,"i",65)}function te(a,l){if(1&a&&(e.TgZ(0,"div",67),e._uU(1),e.qZA()),2&a){const t=l.$implicit;e.xp6(1),e.AsE("",t.name," @",t.version,"")}}function ne(a,l){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,te,2,2,"div",66),e.qZA()),2&a){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.dependencies)}}function ie(a,l){1&a&&e._UZ(0,"i",68)}function ae(a,l){1&a&&e._UZ(0,"i",68)}function oe(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",61)(1,"button",69),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.editData(n,o))}),e._UZ(2,"i",70),e.qZA(),e.TgZ(3,"button",71),e.NdJ("click",function(n){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.removePermanentDialog(n,o))}),e._UZ(4,"i",72),e.qZA()()}}function se(a,l){if(1&a&&(e.TgZ(0,"tr",56)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,X,1,0,"i",57),e.YNc(5,ee,1,0,"i",58),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td")(11,"div",59),e.YNc(12,ne,2,1,"div",60),e.qZA()(),e.TgZ(13,"td",61),e.YNc(14,ie,1,0,"i",62),e.qZA(),e.TgZ(15,"td",61),e.YNc(16,ae,1,0,"i",62),e.qZA(),e.TgZ(17,"td"),e.YNc(18,oe,5,0,"div",63),e.qZA()()),2&a){const t=l.$implicit,i=l.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(2),e.Oqu(t.version),e.xp6(2),e.Oqu(t.name),e.xp6(3),e.Q6J("ngForOf",t.subDependencies),e.xp6(2),e.Q6J("ngIf",t.isThirdPartyApi),e.xp6(2),e.Q6J("ngIf",t.isDefault),e.xp6(2),e.Q6J("ngIf",!t.isReadOnly)}}function le(a,l){1&a&&(e.TgZ(0,"tr"),e._UZ(1,"th",49),e.TgZ(2,"th",51),e._uU(3,"Version"),e.qZA(),e.TgZ(4,"th"),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"th",73),e._uU(7,"Third Party API"),e.qZA(),e.TgZ(8,"th",51),e._uU(9,"Default"),e.qZA()())}function de(a,l){1&a&&e._UZ(0,"i",68)}function re(a,l){1&a&&e._UZ(0,"i",68)}function ce(a,l){if(1&a&&(e.TgZ(0,"tr",56)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e.YNc(8,de,1,0,"i",62),e.qZA(),e.TgZ(9,"td"),e.YNc(10,re,1,0,"i",62),e.qZA()()),2&a){const t=l.$implicit,i=l.rowIndex;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.version),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",t.isThirdPartyApi),e.xp6(2),e.Q6J("ngIf",t.isDefault)}}function ge(a,l){1&a&&e._UZ(0,"p-progressSpinner",74)}function me(a,l){if(1&a){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"button",7),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.loadGridData())}),e._UZ(3,"i",8),e._uU(4," Refresh "),e.qZA(),e.TgZ(5,"button",9),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.saveSettings(n.EFormMode.EDIT))}),e._UZ(6,"i",10),e._uU(7," Save "),e.qZA()(),e.TgZ(8,"div",11)(9,"div",12)(10,"span"),e._UZ(11,"i",13),e._uU(12," Settings"),e.qZA()(),e.TgZ(13,"div",14)(14,"div",15)(15,"div",16)(16,"label",17),e._uU(17,"Sandbox Count"),e.qZA(),e.TgZ(18,"input",18),e.NdJ("ngModelChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.settings.sandbox.sandboxCountOverrideAdmin=n)}),e.qZA(),e.TgZ(19,"div",19)(20,"span",20)(21,"span"),e._uU(22,"1 CPU core will have one process and one process will have these many sandbox."),e.qZA(),e._UZ(23,"br"),e.TgZ(24,"span"),e._uU(25,"Ideally it should be 1-2."),e.qZA()()()(),e.TgZ(26,"div",21)(27,"label",17),e._uU(28,"Automatic Sandbox Restart In Seconds"),e.qZA(),e.TgZ(29,"input",22),e.NdJ("ngModelChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.settings.sandbox.automaticSandboxRestartInSeconds=n)}),e.qZA(),e.TgZ(30,"div",19)(31,"span",20)(32,"span",23),e._uU(33,"All sandbox will be restarted automatically after these many seconds across all servers, without failing any request."),e.qZA(),e._UZ(34,"br"),e.qZA()()()()()(),e.TgZ(35,"div",11)(36,"div",12)(37,"span"),e._UZ(38,"i",24),e._uU(39," Sandbox Dependencies"),e.qZA(),e.TgZ(40,"div",25)(41,"a",26),e._UZ(42,"img",27),e.qZA()(),e.TgZ(43,"span",28),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showLibraryModel())}),e._UZ(44,"i",29),e.qZA()(),e.TgZ(45,"div",30)(46,"p-tabView",31)(47,"p-tabPanel",32)(48,"p-table",33),e.NdJ("selectionChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRowsUI=n)})("dblclick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.summaryTableDoubleClick())}),e.YNc(49,z,15,0,"ng-template",34),e.YNc(50,se,19,10,"ng-template",35),e.qZA()(),e.TgZ(51,"p-tabPanel",36)(52,"p-table",37),e.NdJ("selectionChange",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRowsPackageJson=n)}),e.YNc(53,le,10,0,"ng-template",34),e.YNc(54,ce,11,6,"ng-template",35),e.qZA()()(),e.YNc(55,ge,1,0,"p-progressSpinner",38),e.qZA()(),e.TgZ(56,"div",11)(57,"div",12)(58,"span"),e._UZ(59,"i",39),e._uU(60," Docker File"),e.qZA(),e.TgZ(61,"span",40),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.resetDockerfileToDefault())}),e._UZ(62,"i",41),e.qZA(),e.TgZ(63,"span",42),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showDockerImageBuildLogs())}),e._UZ(64,"i",43),e.qZA()(),e.TgZ(65,"div",44)(66,"app-monaco-editor",45),e.NdJ("editorGenerated",function(n){e.CHM(t);const o=e.oxw();return e.KtG(o.editorGenerated(n))}),e.qZA()()(),e.TgZ(67,"allowed-origin-c",46,47),e.NdJ("saveSettings",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.saveSettings(n.EFormMode.EDIT))}),e.qZA(),e.TgZ(69,"div",48),e._uU(70,"\xa0"),e.qZA()()}if(2&a){const t=e.oxw();e.xp6(18),e.Q6J("ngModel",t.settings.sandbox.sandboxCountOverrideAdmin),e.xp6(11),e.Q6J("ngModel",t.settings.sandbox.automaticSandboxRestartInSeconds),e.xp6(19),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsUI)("dataKey",t.gridKey)("scrollable",!0)("value",t.packageSummary),e.xp6(4),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsPackageJson)("dataKey",t.gridKey)("scrollable",!0)("value",t.finalPackageJson),e.xp6(3),e.Q6J("ngIf",t.loading.form),e.xp6(11),e.Q6J("editorOptions",t.editorOptionsDocker),e.xp6(1),e.Q6J("allowedOrigins",t.settings.allowedOrigins)}}const pe=[{path:"main",component:(()=>{class a{authCS;userS;eventCenterCS;notificationS;confirmationService;cs;monacoS;tpStoreApiVersionS;instanceS;feStoreCS;generalCS;STORE_BE_HOST_PORT=h.N.STORE_BE_HOST_PORT;BE_HOST_PORT=h.N.BE_HOST_PORT;subscriptions=[];data={mode:c.D.ADD,eventChannel:new e.vpe,formData:void 0};packageSummary=[];selectedRowsUI=[];gridKey="rowId";counter;EFormMode=c.D;finalPackageJson=[];selectedRowsPackageJson=[];showAll=!1;loading={form:!1};settings;tpNpmPackageAndVersion={};tpApiVersionIdMap;tpApiBundleIdMap;editorDocker;editorOptionsDocker={readOnly:!1,language:"dockerfile",contextmenu:!0};addNpmLibC;allowedOriginC;SandboxSettingsPkgVersionsModalC;constructor(t,i,n,o,d,m,ue,_e,Se,ve,he){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.confirmationService=d,this.cs=m,this.monacoS=ue,this.tpStoreApiVersionS=_e,this.instanceS=Se,this.feStoreCS=ve,this.generalCS=he}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.subscriptions.push(t.eventCenterCS.sandboxDep.subscribe(i=>{if(t.data.mode===c.D.ADD){for(const n of t.packageSummary)if(n.name===i.name&&n.isDefault)return void t.notificationS.showError("You can not override default package.");t.packageSummary.unshift(i),t.rowIdSet(),t.notificationS.showSuccess(t.cs.amUserSandboxDepSetting.addSuccess),t.addNpmLibC.hideModal()}})),yield t.loadGridData(),t.generalCS.setNewTitle("API Maker - Sandbox Settings")})()}loadGridData(){var t=this;return(0,r.Z)(function*(){const i=yield t.userS.getAdminSettings(t.authCS.getUserId()).toPromise();t.settings=i.data||{},t.packageSummary=t.settings.sandbox.dependenciesUI.nodeJS,t.finalPackageJson=t.settings.sandbox.dependencies.nodeJS;const n=t.settings.allowedOrigins||[];t.settings.sandbox&&(t.settings.sandbox.automaticSandboxRestartInSeconds=t.settings.sandbox.automaticSandboxRestartInSeconds||null),n.sort(),t.settings.allowedOrigins=u.map(n,o=>({name:o})),t.rowIdSet();for(const o of t.finalPackageJson)o.rowId=(t.counter++).toString();t.generalCS.setValueInEditor(t,"editorDocker",t.settings.dockerFile||"")})()}editorGenerated(t){var i=this;return(0,r.Z)(function*(){i.editorDocker=t,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(t,n=>{i.saveSettings()})})()}rowIdSet(){this.counter=1;for(const t of this.packageSummary)t.rowId=(this.counter++).toString()}showLibraryModel(){this.data.formData=void 0,this.data.mode=c.D.ADD,this.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_ADD_MODE}),this.addNpmLibC.showModal()}saveSettings(t){var i=this;return(0,r.Z)(function*(){try{const n=i.authCS.getUserId();if(i?.settings?.sandbox?.sandboxCountOverrideAdmin>5)return void i.notificationS.showError("More than 5 sandbox are not allowed.");const o={settings:{sandbox:{sandboxCountOverrideAdmin:i.settings.sandbox.sandboxCountOverrideAdmin,automaticSandboxRestartInSeconds:i.settings.sandbox.automaticSandboxRestartInSeconds||null,dependencies:{nodeJS:i.packageSummary.filter(m=>!m.isReadOnly&&!m.isThirdPartyApi&&!m.isDefault)}},dockerFile:i.editorDocker.getValue(),allowedOrigins:u.map(i.allowedOriginC.allowedOriginsGridData,"name").sort()}};(yield i.userS.put(n,o,{select:k.iH._id}).toPromise())&&(t===c.D.EDIT?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.editSuccess):"DELETE"===t?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.removePermanent):t||i.notificationS.showSuccess("Success")),i.loadGridData().then()}catch(n){i.loading.form=!1,i.notificationS.showErrorFromResponse(n.error||n,"Unable to save settings.")}})()}removePermanentDialog(t,i){var n=this;return(0,r.Z)(function*(){var o;t.stopPropagation(),t.preventDefault(),n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,r.Z)(function*(){yield n.removePermanent(i)}),function(){return o.apply(this,arguments)})})})()}removePermanent(t){var i=this;return(0,r.Z)(function*(){i.packageSummary.splice(i.packageSummary.indexOf(t),1),i.saveSettings("DELETE").then()})()}loadDependenciesAndSchemas(){var t=this;return(0,r.Z)(function*(){const{tpNpmPackageAndVersion:i,tpApiBundleIdMap:n,tpApiVersionIdMap:o}=(yield t.instanceS.getInstalledPackagesAndSchemas().toPromise()).data;t.tpNpmPackageAndVersion=i,t.tpApiBundleIdMap=n,t.tpApiVersionIdMap=o})()}commonPackageAddRemoveTasks(){var t=this;return(0,r.Z)(function*(){yield t.loadDependenciesAndSchemas()})()}editData(t,i){var n=this;return(0,r.Z)(function*(){t?.stopPropagation(),t?.preventDefault(),n.data.formData=i,n.data.mode=c.D.EDIT,n.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_EDIT_MODE}),yield n.SandboxSettingsPkgVersionsModalC.showPkgVersions(i.name)})()}hideNpmLibModel(){this.addNpmLibC.hideModal()}resetDockerfileToDefault(){var t=this;return(0,r.Z)(function*(){try{const i=yield t.feStoreCS.geDefaultDockerfile(t.BE_HOST_PORT);t.editorDocker.setValue(i.data)}catch(i){t.notificationS.showErrorFromResponse(i.error||i,"Unable to reset docker file.")}})()}showDockerImageBuildLogs(){var t=this;return(0,r.Z)(function*(){const i=t.eventCenterCS.headerC,n=i.systemLogsModelC.systemLogsListC.filterOptions.find(o=>o.value===I.g.DOCKER_IMAGE_BUILD_LOGS);i.showSystemLogsModal(n)})()}summaryTableDoubleClick(){var t=this;setTimeout((0,r.Z)(function*(){if(t.selectedRowsUI[0]){let i;for(const n of t.packageSummary)n[t.gridKey]===t.selectedRowsUI[0].rowId&&(i=n);i&&!i.isReadOnly&&(yield t.editData(null,i))}}),100)}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.Y36(x.D),e.Y36(b.K),e.Y36(w.M),e.Y36(Z.W),e.Y36(p.YP),e.Y36(T.L),e.Y36(U.b),e.Y36(N.f),e.Y36(P.E),e.Y36(E.e),e.Y36(J.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-sandbox-settings-c"]],viewQuery:function(i,n){if(1&i&&(e.Gf(B,5),e.Gf(j,5),e.Gf(W,5)),2&i){let o;e.iGM(o=e.CRH())&&(n.addNpmLibC=o.first),e.iGM(o=e.CRH())&&(n.allowedOriginC=o.first),e.iGM(o=e.CRH())&&(n.SandboxSettingsPkgVersionsModalC=o.first)}},decls:6,vars:9,consts:[["class","pt-1 pl-5 pr-5 full-body overflow-auto",4,"ngIf"],[3,"data","pkgVersionModal","modalId","hostAndPort"],["addNpmLibC",""],[3,"modalId","hostAndPort","data","dependencies","saveUpdateSandboxDep","hideLibraryModelEventEmitter","installed"],["pkgVersionsModalC","","SandboxSettingsPkgVersionsModalC",""],[1,"pt-1","pl-5","pr-5","full-body","overflow-auto"],[1,"cursor-pointer","text-right","mr-1"],[1,"btn","btn-primary","btn-sm","mt-1","mr-1",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw","cursor-pointer"],[1,"btn","btn-success","btn-sm","mt-1",3,"click"],[1,"fas","fa-save","fa-fw","cursor-pointer"],[1,"card","shadow-sm","mt-2","mr-1"],[1,"card-header"],[1,"fas","fa-cog","text-danger","fa-fw","mr-1"],[1,"card-body","p-3","overflow-hidden"],[1,"container"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["name","Setting","type","number","placeholder","Please provide value",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"col-6","pr-0"],[1,"small","text-info"],[1,"row","mt-3"],["name","automaticSandboxRestartInSeconds","type","number","placeholder","Automatic sandbox restart in seconds",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2","d-inline-block"],[1,"fas","fa-box","text-warning","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/settings/sandboxSettings.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-2","overflow-hidden"],[1,"w-100"],["header","Summary"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["header","Final package.json"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fab","fa-docker","fa-fw","mr-1","text-info"],["tooltipPosition","left","pTooltip","Reset dockerfile to default",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-undo","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","View logs of docker image build",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-water","text-info","fa-fw"],[1,"card-body","p-1","overflow-hidden",2,"height","400px"],[3,"editorOptions","editorGenerated"],[3,"allowedOrigins","saveSettings"],["allowedOriginC",""],[1,"mb-5"],[2,"width","55px"],[2,"width","40px"],[2,"width","100px"],[2,"width","200px"],[1,"text-center",2,"width","150px"],[1,"text-center",2,"width","100px"],[1,"text-center",2,"width","130px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],[1,"small"],[4,"ngFor","ngForOf"],[1,"text-center"],["class","fas fa-check fa-fw text-success pt-1",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],["class","pl-3",4,"ngFor","ngForOf"],[1,"pl-3"],[1,"fas","fa-check","fa-fw","text-success","pt-1"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],[2,"width","150px"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){if(1&i&&(e.YNc(0,me,71,17,"div",0),e._UZ(1,"find-npm-package",1,2),e.TgZ(3,"app-sandbox-settings-pkg-versions-modal",3,4),e.NdJ("saveUpdateSandboxDep",function(d){return n.saveSettings(d)})("hideLibraryModelEventEmitter",function(){return n.hideNpmLibModel()})("installed",function(){return n.commonPackageAddRemoveTasks()}),e.qZA()),2&i){const o=e.MAs(4);e.Q6J("ngIf",n.settings),e.xp6(1),e.Q6J("data",n.data)("pkgVersionModal",o)("modalId","idAddNpmSandboxSettings")("hostAndPort",n.STORE_BE_HOST_PORT),e.xp6(2),e.Q6J("modalId","idAddNpmSandboxSettingsEdit")("hostAndPort",n.STORE_BE_HOST_PORT)("data",n.data)("dependencies",n.tpNpmPackageAndVersion)}},dependencies:[g.Fj,g.wV,g.JJ,g.On,_.sg,_.O5,R.K,G.S,q.O,f.iA,p.jx,f.Ei,K.G,C.xf,C.x4,A.u,V],encapsulation:2})}return a})(),canActivate:[D.P]}];let fe=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[O.Bz.forChild(pe),y.u,M.ApiTestingM]})}return a})()}}]);
|