@sava-info-systems/api-maker-with-extensions 1.20.2 → 1.21.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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1097],{51097:(pa,re,l)=>{l.r(re),l.d(re,{DbMastersM:()=>ca});var L=l(77664),Q=l(17017),B=l(63726),d=l(15861),u=l(60095),g=l(6990),le=l(78645),de=l(83620),m=l(33157),p=l(90328),x=l(59361),C=l(51162),Z=l(20553),E=l(45085),H=l(91601),b=l(3531),q=l(39989),G=l(31495),e=l(94946),w=l(99961),U=l(77240),k=l(27414),ce=l(99729),A=l(95852),V=l(62304),ue=l(84795),N=l(53429),O=l(32915),K=l(56097),j=l(32094),W=l(25405),P=l(96814),z=l(32660),X=l(5860),ee=l(756),F=l(85219),me=l(91396),J=l(97680),R=l(14844),Y=l(33259),De=l(53965),te=l(25025),Ue=l(54323);const ke=["insertCodeModalC"],Ze=["monacoEditorModalC"];function we(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",45),e._uU(2," Add UI Page"),e.qZA())}function Ie(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",46),e._uU(2," View UI Page"),e.qZA())}function xe(i,s){if(1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",47),e._uU(2," Edit UI Page "),e.TgZ(3,"span",48),e._uU(4),e.qZA(),e.TgZ(5,"span",48),e._uU(6),e.qZA(),e.TgZ(7,"span",48),e._uU(8),e.qZA(),e.TgZ(9,"span",48),e._uU(10),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.Oqu(null==t.form.get("instanceName").value?null:t.form.get("instanceName").value.name),e.xp6(2),e.hij("| \xa0",null==t.form.get("databaseName").value?null:t.form.get("databaseName").value.db,""),e.xp6(2),e.hij("| \xa0",null==t.form.get("collectionName").value?null:t.form.get("collectionName").value.name,""),e.xp6(2),e.hij("| \xa0",t.form.get("name").value,"")}}function Ee(i,s){if(1&i&&(e._UZ(0,"span",49),e.ALo(1,"safeHtml")),2&i){const t=s.$implicit;e.Q6J("innerHTML",e.lcZ(1,1,t.labelHTML||t.label),e.oJD)}}function Fe(i,s){if(1&i&&(e._UZ(0,"span",49),e.ALo(1,"safeHtml")),2&i){const t=s.$implicit;e.Q6J("innerHTML",e.lcZ(1,1,t.labelHTML||t.label),e.oJD)}}function Ae(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",50)(1,"app-monaco-editor",51),e.NdJ("onDidChangeModelContent",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.editorConfigValueChanged())})("editorGenerated",function(o){e.CHM(t);const n=e.oxw();return e.KtG(n.editorGenerated(o))}),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("isUIMakerEditor",!1)("editorOptions",t.editorOptionsDBMasters)}}function Ne(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",50)(1,"app-monaco-editor",51),e.NdJ("onDidChangeModelContent",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.editorConfigJSValueChanged())})("editorGenerated",function(o){e.CHM(t);const n=e.oxw();return e.KtG(n.editorGeneratedJSUtil(o))}),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("isUIMakerEditor",!0)("editorOptions",t.editorOptionsDBMastersJS)}}function Oe(i,s){if(1&i&&(e.TgZ(0,"span",52),e._uU(1),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.AsE(" You are allowed to use ",null==t.authS.backendSettings?null:t.authS.backendSettings.dbMastersCountForUI," UI pages, and you are using ",t.totalCreatedMasters," UI Pages. ")}}function Pe(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"a",53),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.viewError())}),e._uU(1,"View error"),e.qZA()}}function Je(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function Re(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save(!1))}),e._UZ(1,"i",55),e.YNc(2,Je,2,0,"span",4),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function Ye(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function Le(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update & Close"),e.qZA())}function Qe(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save(!0))}),e._UZ(1,"i",55),e.YNc(2,Ye,2,0,"span",4),e.YNc(3,Le,2,0,"span",4),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("disabled",t.form.invalid||t.totalCreatedMasters>(null==t.authS.backendSettings?null:t.authS.backendSettings.dbMastersCountForUI)),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 qe(i,s){1&i&&e._UZ(0,"p-progressSpinner",56)}let pe=(()=>{class i{fb;ns;generalS;constantsS;dbMastersS;authCS;monacoS;authS;instanceS;eventCenterS;localClientSyncUtilsS;webSocketClientCS;eventCenterCS;generalCS;zone;cd;data;totalCreatedMasters;loading={form:!1};EFormMode=p.D;form;subscriptions=[];formData;IEventData=m.F;id;activeIndex=0;BE_HOST_PORT=Z.N.BE_HOST_PORT;DOCS_HOST_PORT=Z.N.DOCS_HOST_PORT;instances=[];editorDBMaster;editorDBMasterJS;editorOptionsDBMasters={readOnly:!1,language:"typescript",contextmenu:!0};editorOptionsDBMastersJS={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab={};dbIdMap={};colIdMap={};formDataTemp=null;selectedConfigOutlineNode;outlineData=[];selectedConfigOutlineNodeFunctions;outlineDataFunctions=[];constructor(t,a,o,n,r,c,f,h,_,S,T,v,y,D,ua,ma){this.fb=t,this.ns=a,this.generalS=o,this.constantsS=n,this.dbMastersS=r,this.authCS=c,this.monacoS=f,this.authS=h,this.instanceS=_,this.eventCenterS=S,this.localClientSyncUtilsS=T,this.webSocketClientCS=v,this.eventCenterCS=y,this.generalCS=D,this.zone=ua,this.cd=ma}ngOnInit(){var t=this;return(0,d.Z)(function*(){t.createForm(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){if(o)if(t.form.enable(),o.action===m.F.OPEN_FORM_IN_EDIT_MODE)yield t.editViewLoadData(),t.cd.detectChanges();else if(o.action===m.F.OPEN_FORM_IN_VIEW_MODE)yield t.editViewLoadData(),t.form.disable(),t.cd.detectChanges();else if(o.action===m.F.OPEN_FORM_IN_ADD_MODE){t.form.reset(),t.resetDependentObjects("INSTANCE"),yield t.loadInstances();const n=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,E.R.DB_MASTERS_JSON).toPromise();t.editorOptionsDBMasters={readOnly:!1},t.generalCS.setValueInEditor(t,"editorDBMaster",n.data);const r=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,E.R.DB_MASTERS_JS_UTILS).toPromise();t.editorOptionsDBMastersJS={readOnly:!1},t.generalCS.setValueInEditor(t,"editorDBMasterJS",r.data),t.cd.detectChanges()}});return function(o){return a.apply(this,arguments)}}())),t.subscriptions.push(t.editorConfigValueChangedSubject.pipe((0,de.b)(500)).subscribe((0,d.Z)(function*(){const a=t.editorDBMaster.getValue();a&&(yield t.getOutlineDBMaster({tsCode:a,mode:"config"}))}))),t.subscriptions.push(t.editorConfigJSValueChangedSubject.pipe((0,de.b)(500)).subscribe((0,d.Z)(function*(){const a=t.editorDBMasterJS.getValue();a&&(yield t.getOutlineDBMasterJS({tsCode:a,mode:"utility_functions"}))}))),t.subscriptions.push(t.eventCenterCS.dataChangedInDatabase.subscribe(function(){var a=(0,d.Z)(function*(o){if(o){if(!t.data.formData)return;for(const n in o){const r=t.webSocketClientCS.getCategoryOfPath(n),f=t.generalCS.getUtf8FromBase64String(o[n].content);r===G.c.DB_MASTERS&&t.localClientSyncUtilsS.dataChangedInUIMakerPages(n,f,t.data.formData,t.editorDBMaster,t.editorDBMasterJS)}}});return function(o){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var t=this;return(0,d.Z)(function*(){const a=yield t.dbMastersS.getById(t.data.formData._id).toPromise();t.form.reset(),t.resetDependentObjects("INSTANCE"),t.form.patchValue(a.data),t.formDataTemp=a.data,t.generalCS.setValueInEditor(t,"editorDBMaster",a.data?.dbMasterConfigCode||""),t.generalCS.setValueInEditor(t,"editorDBMasterJS",a.data?.pageUtilsCode||""),yield t.loadInstances(),t.editorConfigValueChanged(),t.editorConfigJSValueChanged(),t.formDataTemp=null})()}createForm(){this.form=this.fb.group({name:[null,[u.kI.required,u.kI.minLength(3),u.kI.maxLength(50),u.kI.pattern("[a-zA-Z0-9_-]*$")]],instanceName:[null,[u.kI.required]],databaseName:[null,[u.kI.required]],collectionName:[null,[u.kI.required]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,this.activeIndex=0,setTimeout(()=>{$("#idDBMastersForm").modal("show")},100)}hideModal(){$("#idDBMastersForm").modal("hide")}save(t){var a=this;return(0,d.Z)(function*(){const o=a.form.getRawValue();let f;o.instanceName=o.instanceName.name,o.databaseName=o.databaseName.db,o.collectionName=o.collectionName.name,f=a.data.formData&&a.data.formData._id?(yield a.dbMastersS.getById(a.data.formData._id).toPromise()).data:{};const h=Object.assign({},f,o);h.user=a.authCS.getUserId(),h.dbMasterConfigCode=a.editorDBMaster.getValue(),h.pageUtilsCode=a.editorDBMasterJS.getValue();try{let _;a.loading.form=!0,a.lastError=void 0,a.monacoS.clearEditorDecorations(a.editorDBMaster,a.monacoDecorations),a.monacoS.clearEditorDecorations(a.editorDBMasterJS,a.monacoDecorations),a.data.mode===p.D.ADD?_=yield a.dbMastersS.post(h).toPromise():a.data.mode===p.D.EDIT&&(_=yield a.dbMastersS.put(h._id,h,{select:C.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===p.D.ADD?a.constantsS.dbMaster.addSuccess:a.constantsS.dbMaster.editSuccess),t&&a.data.eventChannel.emit({action:a.data.mode===p.D.ADD?m.F.SAVED:m.F.UPDATED,data:_}),a.loading.form=!1}catch(_){a.loading.form=!1,a.ns.showErrorFromResponse(_.error||_,"Unable to save database master."),a.lastError=_.error,a.tab=a.tab||{},a.tab.axiosResponse={data:_.error},a.monacoS.highlightErrorInMonacoEditor(a.editorDBMaster,a.tab,"MainSandbox.ts",a.monacoDecorations)}a.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=x.H.All,this.insertCodeModalC.showModal(b.b.CodeFinderResultC)}editorGenerated(t){var a=this;return(0,d.Z)(function*(){a.editorDBMaster=t,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(t,o=>{a.form.valid&&a.save(!1)}),a.monacoS.addInsertCodeKeyBinding(t,o=>{a.generalCS.messageReceivedFor=x.H.All,a.data.mode!==p.D.VIEW&&a.insertCodeModalC.showModal(b.b.DBMastersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(o=>{o.type&&o.type===q.g.TEXT_COPIED&&o.componentName===b.b.DBMastersFormC&&(a.monacoS.insertAtCursor(t,o.selectedText),a.insertCodeModalC.hideModal())}))})()}editorGeneratedJSUtil(t){var a=this;return(0,d.Z)(function*(){a.editorDBMasterJS=t,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(t,o=>{a.form.valid&&a.save(!1)}),a.monacoS.addInsertCodeKeyBinding(t,o=>{a.generalCS.messageReceivedFor=x.H.All,a.data.mode!==p.D.VIEW&&a.insertCodeModalC.showModal(b.b.DBMastersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(o=>{o.type&&o.type===q.g.TEXT_COPIED&&o.componentName===b.b.DBMastersFormC&&(a.monacoS.insertAtCursor(t,o.selectedText),a.insertCodeModalC.hideModal())}))})()}editorConfigValueChangedSubject=new le.x;editorConfigValueChanged(){this.editorConfigValueChangedSubject.next()}editorConfigJSValueChangedSubject=new le.x;editorConfigJSValueChanged(){this.editorConfigJSValueChangedSubject.next()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),H.d.json)}loadInstances(){var t=this;return(0,d.Z)(function*(){t.resetDependentObjects("INSTANCE"),t.loading.form=!0;try{const a={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,active:1,user:1},sort:{name:1}};t.tab.allInstances=(yield t.instanceS.query(a).toPromise()).data||[]}catch(a){t.ns.showErrorMessageFromErrorObject(a),t.tab.allInstances=[]}if(t.formDataTemp){const a=t.form.controls.instanceName;t.tab.instance=g.find(t.tab.allInstances,{name:t.formDataTemp.instanceName}),t.tab.instance&&a.setValue(t.tab.instance)}else t.tab.instance=t.tab.allInstances[0];yield t.loadDatabases(),t.loading.form=!1,t.cd.detectChanges()})()}getOutlineDBMaster(t){var a=this;return(0,d.Z)(function*(){try{const o=new Map;a.processNodesForBackupAndRestore(a.outlineData,o,"backup"),a.outlineData=[];const n=a.selectedConfigOutlineNode,r=yield a.instanceS.getOutlineDBMasterConfig(t);a.outlineData=r.data,a.processNodesForBackupAndRestore(a.outlineData,o,"restore"),a.selectedConfigOutlineNode=a.findNodeOfKey(a.outlineData,n?.key),setTimeout(()=>{a.zone.run(()=>{a.outlineData=[...a.outlineData],a.cd.markForCheck()})},10)}catch(o){a.ns.showErrorFromResponse(o.error||o,"Unable to get outline data.")}})()}getOutlineDBMasterJS(t){var a=this;return(0,d.Z)(function*(){try{const o=new Map;a.processNodesForBackupAndRestore(a.outlineDataFunctions,o,"backup"),a.outlineDataFunctions=[];const n=a.selectedConfigOutlineNodeFunctions,r=yield a.instanceS.getOutlineDBMasterConfig(t);a.outlineDataFunctions=r.data,a.processNodesForBackupAndRestore(a.outlineDataFunctions,o,"restore"),a.selectedConfigOutlineNodeFunctions=a.findNodeOfKey(a.outlineDataFunctions,n?.key),setTimeout(()=>{a.zone.run(()=>{a.outlineDataFunctions=[...a.outlineDataFunctions],a.cd.markForCheck()})},10)}catch(o){a.ns.showErrorFromResponse(o.error||o,"Unable to get outline data.")}})()}processNodesForBackupAndRestore(t,a,o){if(Array.isArray(t))for(const n of t)this.processNodesForBackupAndRestore(n,a,o);else"backup"===o?a.set(t.key,t.expanded):"restore"===o&&(t.expanded=a.get(t.key)),t?.children?.length&&this.processNodesForBackupAndRestore(t.children,a,o)}findNodeOfKey(t,a){if(a)if(Array.isArray(t))for(const o of t){const n=this.findNodeOfKey(o,a);if(n)return n}else{if(t.key===a)return t;if(t?.children?.length)return this.findNodeOfKey(t.children,a)}}loadDatabases(){var t=this;return(0,d.Z)(function*(){if(t.loading.form=!0,t.resetDependentObjects("DATABASE"),!t.tab.instance)return t.tab.allDatabases=[],void(t.tab.allCollections=[]);try{t.tab.allDatabases=((yield t.instanceS.getDatabases([t.tab.instance],null).toPromise()).data||[])[0]||[],t.dbIdMap=g.keyBy(t.tab.allDatabases,C.N7.db)}catch(a){t.ns.showErrorMessageFromErrorObject(a),t.tab.allDatabases=[]}if(t.formDataTemp){const a=t.form.get("databaseName");t.tab.database=g.find(t.tab.allDatabases,{db:t.formDataTemp.databaseName}),t.tab.database&&a.patchValue(t.tab.database)}else t.tab.database=t.tab.allDatabases[0];yield t.loadCollections(),t.loading.form=!1})()}loadCollections(){var t=this;return(0,d.Z)(function*(){if(t.loading.form=!0,t.resetDependentObjects("COLLECTION"),t.tab.instance&&t.tab.database){try{t.tab.allCollections=((yield t.instanceS.getCollections([t.tab.database],null).toPromise()).data||[])[0]||[],t.colIdMap=g.keyBy(t.tab.allCollections,C.GR.name)}catch(a){t.ns.showErrorMessageFromErrorObject(a),t.tab.allCollections=[]}if(t.formDataTemp){const a=t.form.get("collectionName");t.tab.collection=g.find(t.tab.allCollections,{name:t.formDataTemp.collectionName}),t.tab.collection&&a.patchValue(t.tab.collection)}else t.tab.collection=t.tab.allCollections[0];t.loading.form=!1,t.cd.detectChanges()}else t.tab.allCollections=[]})()}resetDependentObjects(t){"INSTANCE"===t?(this.tab.allInstances=this.tab.allDatabases=this.tab.allCollections=[],this.tab.instance=this.tab.database=this.tab.collection=this.tab.api=void 0):"DATABASE"===t?(this.tab.allDatabases=this.tab.allCollections=[],this.tab.database=this.tab.collection=this.tab.api=void 0):"COLLECTION"===t&&(this.tab.allCollections=[],this.tab.collection=this.tab.api=void 0)}outlineNodeSelected(t,a){const o=t.data,n=a.getValue(),r=this.generalCS.getLineNumberFromIndex(n,o.end);a.setPosition(r),a.revealPositionInCenter(r),a.focus()}generateUIMakerCodeForCollection(){var t=this;return(0,d.Z)(function*(){const o=(yield t.instanceS.getSampleUIMCodeForSchema({instanceName:t.tab.instance.name,databaseName:t.tab.database.db,collectionName:t.tab.collection.name})).data;t.editorDBMaster.setValue(o.configCode),t.editorDBMasterJS.setValue(o.functionsCode)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||i)(e.Y36(u.qu),e.Y36(w.W),e.Y36(U.b),e.Y36(k.L),e.Y36(ce.z),e.Y36(A.D),e.Y36(V.b),e.Y36(ue.e),e.Y36(N.E),e.Y36(O.u),e.Y36(K._),e.Y36(j.P),e.Y36(W.M),e.Y36(U.b),e.Y36(e.R0b),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-db-masters-form"]],viewQuery:function(a,o){if(1&a&&(e.Gf(ke,5),e.Gf(Ze,5)),2&a){let n;e.iGM(n=e.CRH())&&(o.insertCodeModalC=n.first),e.iGM(n=e.CRH())&&(o.viewDockerfileModelC=n.first)}},inputs:{data:"data",totalCreatedMasters:"totalCreatedMasters"},decls:66,vars:32,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idDBMastersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["tooltipPosition","left","pTooltip","Generate code for this schema",1,"fas","fa-seedling","fa-fw","text-warning","mr-3","cursor-pointer",2,"font-size","21px",3,"click"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/extensions/ui_maker/introduction.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["optionLabel","name","filterBy","name","appendTo","body","formControlName","instanceName","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["formControlName","databaseName","optionLabel","db","filterBy","db","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["formControlName","collectionName","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter","onChange"],["header","Code"],[1,"row","m-0"],[1,"col-3","pl-0","pr-2","pt-2","overflow-auto",2,"height","calc(100vh - 186px)"],["selectionMode","single","styleClass","tree-width","scrollHeight","flex",1,"id_ptree_db_master_config_outline",3,"value","hidden","selection","filter","selectionChange"],["pTemplate","default"],[1,"col-9","pl-0","pr-0"],[3,"activeIndex","activeIndexChange"],["header","Config"],["class","overflow-hidden","style","height: calc(100vh - 212px);",4,"ngIf"],["header","userUtils.Main"],[1,"modal-footer"],["class","mr-3 small text-danger",4,"ngIf"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[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"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[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"],[1,"ml-2","font-weight-normal","small","text-muted"],[2,"white-space","nowrap","padding-right","10px",3,"innerHTML"],[1,"overflow-hidden",2,"height","calc(100vh - 212px)"],[3,"isSchemaEditor","isUIMakerEditor","editorOptions","onDidChangeModelContent","editorGenerated"],[1,"mr-3","small","text-danger"],["href","javascript:;",1,"text-danger",3,"click"],["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(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,we,3,0,"span",4),e.YNc(5,Ie,3,0,"span",4),e.YNc(6,xe,11,4,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return o.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"i",9),e.NdJ("click",function(){return o.generateUIMakerCodeForCollection()}),e.qZA(),e.TgZ(12,"span",10),e.NdJ("click",function(){return o.showInsertCodeModel()}),e._UZ(13,"i",11),e.qZA(),e.TgZ(14,"a",12),e._UZ(15,"img",13),e.qZA()()(),e.TgZ(16,"div",14)(17,"p-tabView")(18,"p-tabPanel",15)(19,"form",16)(20,"div",17)(21,"label",18),e._uU(22,"Name"),e.qZA(),e.TgZ(23,"div",19),e._UZ(24,"input",20),e.qZA()(),e.TgZ(25,"div",17)(26,"label",18),e._uU(27,"Instance"),e.qZA(),e.TgZ(28,"div",19)(29,"p-dropdown",21),e.NdJ("onChange",function(r){return o.tab.instance=r.value,o.loadDatabases()}),e.qZA()()(),e.TgZ(30,"div",17)(31,"label",18),e._uU(32,"Database"),e.qZA(),e.TgZ(33,"div",19)(34,"p-dropdown",22),e.NdJ("onChange",function(r){return o.tab.database=r.value,o.loadCollections()}),e.qZA()()(),e.TgZ(35,"div",17)(36,"label",18),e._uU(37,"Collection"),e.qZA(),e.TgZ(38,"div",19)(39,"p-dropdown",23),e.NdJ("onChange",function(r){return o.tab.collection=r.value}),e.qZA()()()()(),e.TgZ(40,"p-tabPanel",24)(41,"div",25)(42,"div",26)(43,"p-tree",27),e.NdJ("selectionChange",function(r){return o.selectedConfigOutlineNode=r})("selectionChange",function(r){return o.outlineNodeSelected(r,o.editorDBMaster)}),e.YNc(44,Ee,2,3,"ng-template",28),e.qZA(),e.TgZ(45,"p-tree",27),e.NdJ("selectionChange",function(r){return o.selectedConfigOutlineNodeFunctions=r})("selectionChange",function(r){return o.outlineNodeSelected(r,o.editorDBMasterJS)}),e.YNc(46,Fe,2,3,"ng-template",28),e.qZA()(),e.TgZ(47,"div",29)(48,"p-tabView",30),e.NdJ("activeIndexChange",function(r){return o.activeIndex=r}),e.TgZ(49,"p-tabPanel",31),e.YNc(50,Ae,2,3,"div",32),e.qZA(),e.TgZ(51,"p-tabPanel",33),e.YNc(52,Ne,2,3,"div",32),e.qZA()()()()()()(),e.TgZ(53,"div",34),e.YNc(54,Oe,2,2,"span",35),e.YNc(55,Pe,2,0,"a",36),e.TgZ(56,"button",37),e.NdJ("click",function(){return o.hideModal()}),e._UZ(57,"i",38),e._uU(58," Close"),e.qZA(),e.YNc(59,Re,3,2,"button",39),e.YNc(60,Qe,4,3,"button",39),e.qZA(),e.YNc(61,qe,1,0,"p-progressSpinner",40),e.qZA()()(),e._UZ(62,"app-insert-code-modal",41,42)(64,"app-monaco-editor-modal",43,44)),2&a&&(e.xp6(4),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(13),e.Q6J("formGroup",o.form),e.xp6(10),e.Q6J("options",o.tab.allInstances)("filter",!0),e.xp6(5),e.Q6J("options",o.tab.allDatabases)("filter",!0),e.xp6(5),e.Q6J("options",o.tab.allCollections)("filter",!0),e.xp6(4),e.Q6J("value",o.outlineData)("hidden",0!==o.activeIndex)("selection",o.selectedConfigOutlineNode)("filter",!0),e.xp6(2),e.Q6J("value",o.outlineDataFunctions)("hidden",1!==o.activeIndex)("selection",o.selectedConfigOutlineNodeFunctions)("filter",!0),e.xp6(3),e.Q6J("activeIndex",o.activeIndex),e.xp6(2),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",o.totalCreatedMasters>(null==o.authS.backendSettings?null:o.authS.backendSettings.dbMastersCountForUI)),e.xp6(1),e.Q6J("ngIf",o.lastError),e.xp6(4),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(1),e.Q6J("ngIf",o.data.mode!==o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",o.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalDBMaster")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,P.O5,z.y,X.P,ee.O,F.jx,me.mp,J.G,R.xf,R.x4,Y.u,De.Lt,te.A,Ue.z],encapsulation:2,changeDetection:0})}return i})();var ae=l(44950);let Be=(()=>{class i{static \u0275fac=function(a){return new(a||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[Q.u,ae.A]})}return i})();var oe=l(96925),He=l(19394),ie=l(92466),ne=l(60921),se=l(92189),Ge=l(15561),Ve=l(87797),M=l(95431);const Ke=["DBMastersFormC"],je=["cloneApiModalC"];function We(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.toggleExpand())}),e._UZ(1,"i",25),e.qZA()}}function $e(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.mode="table",o.selectedRows.length=0,e.KtG(o.selectedRowsTree.length=0)}),e._UZ(1,"i",26),e.qZA()}}function ze(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.mode="tree",o.selectedRows.length=0,e.KtG(o.selectedRowsTree.length=0)}),e._UZ(1,"i",27),e.qZA()}}function Xe(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.edit())}),e._UZ(1,"i",29),e.qZA()}}function et(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",30),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.clone())}),e._UZ(1,"i",31),e.qZA()}}function tt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",32),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removePermanent())}),e._UZ(1,"i",33),e.qZA()}}function at(i,s){1&i&&(e.TgZ(0,"th",38),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function ot(i,s){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,at,2,0,"th",37),e.TgZ(2,"th",38),e._uU(3,"*"),e.qZA(),e.TgZ(4,"th",39),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"th"),e._uU(7,"Instance \u2192 Database \u2192 Collection"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Required Auth Headers"),e.qZA(),e._UZ(10,"th",40),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.showCheckbox)}}function it(i,s){if(1&i&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",46),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function nt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"tr",41),e.YNc(1,it,2,2,"td",42),e.TgZ(2,"td"),e._uU(3),e.qZA(),e.TgZ(4,"td"),e._uU(5),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",43)(12,"button",44),e.NdJ("click",function(){const n=e.CHM(t).$implicit,r=e.oxw(2);return e.KtG(r.openMasterPageInNewTab(n))}),e._UZ(13,"i",45),e.qZA()()()()}if(2&i){const t=s.$implicit,a=s.rowIndex,o=e.oxw(2);e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",o.showCheckbox),e.xp6(2),e.Oqu(a+1),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.lnq("",t.instanceName," \u2192 ",t.databaseName," \u2192 ",t.collectionName,""),e.xp6(2),e.Oqu(t.authHeadersGrid)}}function st(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"p-table",34),e.NdJ("selectionChange",function(o){e.CHM(t);const n=e.oxw();return e.KtG(n.selectedRows=o)})("dblclick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.dblClick())}),e.YNc(1,ot,11,1,"ng-template",35),e.YNc(2,nt,14,8,"ng-template",36),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows)}}function rt(i,s){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.label)}}function lt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"table",50)(3,"tr")(4,"td",51),e._uU(5),e.qZA(),e.TgZ(6,"td",51),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td")(11,"div",52)(12,"button",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,n=e.oxw(2);return e.KtG(n.openMasterPageInNewTab(o.data))}),e._UZ(13,"i",45),e.qZA()()()()()()()}if(2&i){const t=e.oxw().$implicit;e.xp6(5),e.Oqu(t.data.name),e.xp6(2),e.lnq("",t.data.instanceName," \u2192 ",t.data.databaseName," \u2192 ",t.data.collectionName,""),e.xp6(2),e.Oqu(t.data.authHeadersGrid)}}function dt(i,s){if(1&i&&(e.TgZ(0,"div",49),e.YNc(1,rt,2,1,"div",42),e.YNc(2,lt,14,5,"div",42),e.qZA()),2&i){const t=s.$implicit;e.xp6(1),e.Q6J("ngIf",null==t.children?null:t.children.length),e.xp6(1),e.Q6J("ngIf",!(null!=t.children&&t.children.length))}}function ct(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"p-tree",47),e.NdJ("selectionChange",function(o){e.CHM(t);const n=e.oxw();return e.KtG(n.selectedRowsTree=o)})("dblclick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.dblClick())}),e.YNc(1,dt,3,2,"ng-template",48),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("value",t.treeNodes)("selection",t.selectedRowsTree)}}function ut(i,s){1&i&&e._UZ(0,"p-progressSpinner",53)}let fe=(()=>{class i{dbMastersS;generalS;navigationCS;navigationS;authCS;authS;constantsS;eventCenterS;router;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};EUserType=ne.d;gridKey=C.iH._id;EAPICategory=E.R;ENavigationMenu=ie.E;BE_HOST_PORT=Z.N.BE_HOST_PORT;treeNodes=[];allTreeItemsMap={};selectedRows=[];selectedRowsTree=[];mode="tree";dbMastersFormC;cloneApiModalC;constructor(t,a,o,n,r,c,f,h,_,S,T,v,y,D){this.dbMastersS=t,this.generalS=a,this.navigationCS=o,this.navigationS=n,this.authCS=r,this.authS=c,this.constantsS=f,this.eventCenterS=h,this.router=_,this.instanceS=S,this.ns=T,this.cs=v,this.confirmationService=y,this.cd=D}ngOnInit(){var t=this;return(0,d.Z)(function*(){if(!t.authS.backendSettings.extensions)return t.navigationS.gotoDashboard();yield t.loadGridData(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){(o.action===m.F.SAVED||o.action===m.F.UPDATED)&&(t.dbMastersFormC.hideModal(),yield t.loadGridData())});return function(o){return a.apply(this,arguments)}}())),t.generalS.setNewTitle("UI Maker")})()}loadGridData(){var t=this;return(0,d.Z)(function*(){t.loading.grid=!0;const a=yield t.dbMastersS.getDBMastersGrid({}).toPromise();if(a){t.selectedRows=[],t.selectedRowsTree=[],t.rows=a.data,t.rowsMap=g.keyBy(t.rows,C.iH._id);for(const o of t.rows){const n=[];for(const r of o.authHeaders||[])n.push(r.name);o.authHeadersGrid=n.join(", ")}}t.setTreeNodes(),t.loading.grid=!1,t.cd.detectChanges()})()}setTreeNodes(){if(this.rows?.length){const t=JSON.parse(JSON.stringify(this.rows));for(const n of t){const r=`/${n.instanceName}/${n.databaseName}/${n.collectionName}/${n.name}`;n.text=r,n.idc=r,n.value=n}const a=this.generalS.convertFlatToTree("/",t,"idc");for(const n of a)this.generalS.convertKTreeItemToPrimeNGTreeItem(n);const o={};this.generalS.getMapOfAllItems(o,a);for(const n of Object.keys(o)){const r=this.allTreeItemsMap[n];r&&(o[n].expanded=r.expanded)}this.treeNodes=a,this.allTreeItemsMap=o}}add(){this.data.formData={order:(g.max(g.map(this.rows,"order"))||0)+1},this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:m.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.dbMastersFormC.showModal()}edit(){"table"===this.mode?this.data.formData=this.rowsMap[g.map(this.selectedRows,"_id")[0]]:"tree"===this.mode&&(this.data.formData=this.selectedRowsTree[0].data),this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:m.F.OPEN_FORM_IN_EDIT_MODE}),this.dbMastersFormC.showModal()}clone(){var t=this;return(0,d.Z)(function*(){yield t.cloneApiModalC.showModal(t.getSelectedRowId(),[u.kI.pattern("[a-zA-Z0-9_-]*$")],function(){var a=(0,d.Z)(function*(o){o&&(yield t.loadGridData()),t.cd.detectChanges()});return function(o){return a.apply(this,arguments)}}())})()}getSelectedRowId(){return"table"===this.mode?this.selectedRows[0]?._id:"tree"===this.mode?this.selectedRowsTree[0]?.data?._id:void 0}removePermanent(){var t=this;return(0,d.Z)(function*(){var a;t.confirmationService.confirm({message:t.cs.dbMaster.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,d.Z)(function*(){let o=!1;if("table"===t.mode)for(const n of t.selectedRows)yield t.hardDelete(n._id),o=!0;else if("tree"===t.mode){t.data.formData=t.selectedRowsTree[0].data;for(const n of t.selectedRowsTree)yield t.hardDelete(n.data._id),o=!0}o&&(t.ns.showSuccess(t.cs.dbMaster.removePermanent),yield t.loadGridData())}),function(){return a.apply(this,arguments)})})})()}hardDelete(t){var a=this;return(0,d.Z)(function*(){yield a.dbMastersS.permanentDelete(t).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.selectedRowsTree.length=0}dblClick(){"table"===this.mode?this.selectedRows.length&&this.edit():"tree"===this.mode&&this.selectedRowsTree.length&&this.edit()}openMasterPageInNewTab(t){const a=this.authCS.getUserPath();let o=[Z.N.BE_HOST_PORT,"/dist-db-masters/browser/",`?${oe.ZF.ADMIN_PATH}=${a}&`].join("");const n=[`${oe.ZF.DB_MASTER_NAME}=${t.name}`];for(const r of t.authHeaders)n.push(`${r.name}=____actual_header_value____`);o+=n.join("&"),window.open(o,"_blank")}toggleExpand(){let t=null;for(const a in this.allTreeItemsMap){const o=this.allTreeItemsMap[a];null===t&&(t=!o.expanded),o.expanded=t}}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EModelApiPaths=He.k4;ERequestMethod=oe.Yp;static \u0275fac=function(a){return new(a||i)(e.Y36(ce.z),e.Y36(U.b),e.Y36(se.S),e.Y36(Ge.X),e.Y36(A.D),e.Y36(ue.e),e.Y36(k.L),e.Y36(O.u),e.Y36(L.F0),e.Y36(N.E),e.Y36(w.W),e.Y36(k.L),e.Y36(F.YP),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-db-masters-list"]],viewQuery:function(a,o){if(1&a&&(e.Gf(Ke,5),e.Gf(je,5)),2&a){let n;e.iGM(n=e.CRH())&&(o.dbMastersFormC=n.first),e.iGM(n=e.CRH())&&(o.cloneApiModalC=n.first)}},inputs:{showCheckbox:"showCheckbox"},decls:33,vars:19,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/ui-maker.svg","alt","Database master image",1,"fa-fw","mr-1"],[1,"small","ml-3"],["href","https://docs.apimaker.dev/v1/extensions/ui_maker/introduction.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Styles For UI Pages",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fab","fa-css3","text-info","fa-fw"],["tooltipPosition","left","pTooltip","Common Utilities For UI Pages",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fab","fa-uniregistry","text-info","fa-fw"],["tooltipPosition","left","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","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick",4,"ngIf"],["class","w-full","scrollHeight","calc(100vh - 82px)","selectionMode","multiple",3,"value","selection","selectionChange","dblclick",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"totalCreatedMasters","data"],["DBMastersFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Toggle Expand All",1,"fas","fa-expand-arrows-alt","fa-fw"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","fa-fw"],["pTooltip","Tree View",1,"fas","fa-sitemap","text-yellow","fa-fw"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["style","width: 45px;",4,"ngIf"],[2,"width","45px"],[2,"width","25%"],[2,"width","70px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"text-center"],["tooltipPosition","left","pTooltip","Open master page",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-external-link-alt","text-info","fa-fw"],[3,"value","pSelectableRow"],["scrollHeight","calc(100vh - 82px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],[1,"w-100","prevent-text-selection","cursor-pointer"],[1,"w-100"],[2,"width","30%"],[1,"text-right"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span")(3,"span"),e._UZ(4,"img",2),e._uU(5," UI Pages"),e.qZA(),e.TgZ(6,"span",3),e._uU(7,"Using "),e.TgZ(8,"span"),e._uU(9),e.qZA(),e._uU(10),e.qZA()(),e.TgZ(11,"a",4),e._UZ(12,"img",5),e.qZA(),e.YNc(13,We,2,0,"span",6),e.YNc(14,$e,2,0,"span",6),e.YNc(15,ze,2,0,"span",6),e.TgZ(16,"span",7),e.NdJ("click",function(){return o.router.navigate([o.ENavigationMenu.DBMasters,"styles"])}),e._UZ(17,"i",8),e.qZA(),e.TgZ(18,"span",9),e.NdJ("click",function(){return o.router.navigate([o.ENavigationMenu.DBMasters,"utils"])}),e._UZ(19,"i",10),e.qZA(),e.TgZ(20,"span",11),e.NdJ("click",function(){return o.add()}),e._UZ(21,"i",12),e.qZA(),e.YNc(22,Xe,2,0,"span",13),e.YNc(23,et,2,0,"span",14),e.YNc(24,tt,2,0,"span",15),e.qZA(),e.TgZ(25,"div",16),e.YNc(26,st,3,6,"p-table",17),e.YNc(27,ct,2,2,"p-tree",18),e.YNc(28,ut,1,0,"p-progressSpinner",19),e.qZA()(),e._UZ(29,"app-db-masters-form",20,21)(31,"app-clone-api-modal",22,23)),2&a&&(e.xp6(8),e.Tol((null==o.rows?null:o.rows.length)>(null==o.authS.backendSettings?null:o.authS.backendSettings.dbMastersCountForUI)?"text-danger":""),e.xp6(1),e.hij(" ",o.rows.length,""),e.xp6(1),e.hij("/",o.authS.backendSettings.dbMastersCountForUI," "),e.xp6(3),e.Q6J("ngIf","tree"===o.mode),e.xp6(1),e.Q6J("ngIf","tree"===o.mode),e.xp6(1),e.Q6J("ngIf","table"===o.mode),e.xp6(7),e.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2||o.selectedRowsTree.length&&o.selectedRowsTree.length<2),e.xp6(1),e.Q6J("ngIf",1===o.selectedRows.length||1===o.selectedRowsTree.length),e.xp6(1),e.Q6J("ngIf",o.selectedRows.length||o.selectedRowsTree.length),e.xp6(2),e.Q6J("ngIf","table"===o.mode),e.xp6(1),e.Q6J("ngIf","tree"===o.mode),e.xp6(1),e.Q6J("ngIf",o.loading.grid),e.xp6(1),e.Q6J("totalCreatedMasters",null==o.rows?null:o.rows.length)("data",o.data),e.xp6(2),e.Q6J("modalId","idCloneDBMasters")("hostAndPort",o.BE_HOST_PORT)("modelApiPaths",o.EModelApiPaths.DB_MASTERS))},dependencies:[P.O5,Ve.s,M.iA,F.jx,M.Ei,M.UA,M.Mo,me.mp,J.G,Y.u,pe],encapsulation:2,changeDetection:0})}return i})(),_e=(()=>{class i{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.Xpm({type:i,selectors:[["app-db-masters-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0),e._UZ(1,"app-db-masters-list"),e.qZA())},dependencies:[fe],encapsulation:2})}return i})();var ge=l(29836),mt=l(38057);const pt=["insertCodeModalC"],ft=["monacoEditorModalC"];function _t(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," Add Styles"),e.qZA())}function gt(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," View Styles"),e.qZA())}function ht(i,s){if(1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Edit Styles "),e.TgZ(3,"span",28),e._uU(4),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.Oqu(t.form.get("name").value)}}function Ct(i,s){1&i&&(e.TgZ(0,"div",30)(1,"label",31),e._uU(2,"Order No"),e.qZA(),e.TgZ(3,"div",32),e._UZ(4,"input",37),e.qZA()())}function Mt(i,s){if(1&i&&(e.TgZ(0,"div")(1,"form",29)(2,"div",30)(3,"label",31),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",32),e._UZ(6,"input",33),e.qZA()(),e.TgZ(7,"div",30),e._UZ(8,"label",31),e.TgZ(9,"div",32)(10,"label",34),e._UZ(11,"p-checkbox",35),e.qZA()()(),e.YNc(12,Ct,5,0,"div",36),e.qZA()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.form),e.xp6(10),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",t.form.getRawValue().loadInAllPages)}}function bt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",38)(1,"app-monaco-editor",39),e.NdJ("editorGenerated",function(o){e.CHM(t);const n=e.oxw();return e.KtG(n.editorGenerated(o))}),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!1)("isUIMakerEditor",!0)("editorOptions",t.editorOptions)}}function St(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"a",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.viewError())}),e._uU(1,"View error"),e.qZA()}}function Tt(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function vt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save(!1))}),e._UZ(1,"i",42),e.YNc(2,Tt,2,0,"span",4),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function yt(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function Dt(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update & Close"),e.qZA())}function Ut(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save(!0))}),e._UZ(1,"i",42),e.YNc(2,yt,2,0,"span",4),e.YNc(3,Dt,2,0,"span",4),e.qZA()}if(2&i){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 kt(i,s){1&i&&e._UZ(0,"p-progressSpinner",43)}let he=(()=>{class i{fb;ns;generalS;constantsS;uiMakerStylesS;authCS;monacoS;instanceS;eventCenterS;localClientSyncUtilsS;webSocketClientCS;eventCenterCS;generalCS;cd;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];formData;IEventData=m.F;id;BE_HOST_PORT=Z.N.BE_HOST_PORT;DOCS_HOST_PORT=Z.N.DOCS_HOST_PORT;instances=[];editorPI;editorOptions={readOnly:!1,language:"css",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"typescript",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(t,a,o,n,r,c,f,h,_,S,T,v,y,D){this.fb=t,this.ns=a,this.generalS=o,this.constantsS=n,this.uiMakerStylesS=r,this.authCS=c,this.monacoS=f,this.instanceS=h,this.eventCenterS=_,this.localClientSyncUtilsS=S,this.webSocketClientCS=T,this.eventCenterCS=v,this.generalCS=y,this.cd=D}ngOnInit(){var t=this;return(0,d.Z)(function*(){t.createForm(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){if(o)if(t.form.enable(),o.action===m.F.OPEN_FORM_IN_EDIT_MODE)yield t.editViewLoadData(),t.cd.detectChanges();else if(o.action===m.F.OPEN_FORM_IN_VIEW_MODE)yield t.editViewLoadData(),t.cd.detectChanges();else if(o.action===m.F.OPEN_FORM_IN_ADD_MODE){t.form.reset(),t.form.patchValue(o.data||{});const n=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,E.R.UI_MAKER_STYLES).toPromise();t.editorOptions={readOnly:!1},t.generalCS.setValueInEditor(t,"editorPI",n.data),t.cd.detectChanges()}});return function(o){return a.apply(this,arguments)}}())),t.subscriptions.push(t.eventCenterCS.dataChangedInDatabase.subscribe(function(){var a=(0,d.Z)(function*(o){if(o){if(!t.data.formData)return;for(const n in o){const r=t.webSocketClientCS.getCategoryOfPath(n),f=t.generalCS.getUtf8FromBase64String(o[n].content);r===G.c.UI_MAKER_STYLES&&t.localClientSyncUtilsS.dataChangedInUIMakerStyles(n,f,t.data.formData,t.editorPI)}}});return function(o){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var t=this;return(0,d.Z)(function*(){const a=yield t.uiMakerStylesS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(a.data),t.generalCS.setValueInEditor(t,"editorPI",a.data?.styleCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[u.kI.required]],loadInAllPages:[!1,[]],orderNumber:[!1,[u.kI.min(1)]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idUIMakerStylesForm").modal("show")},100)}hideModal(){$("#idUIMakerStylesForm").modal("hide")}save(t){var a=this;return(0,d.Z)(function*(){const o=a.form.getRawValue();let n;n=a.data.formData&&a.data.formData._id?(yield a.uiMakerStylesS.getById(a.data.formData._id).toPromise()).data:{};const r=Object.assign({},n,o);r.user=a.authCS.getUserId(),r.styleCode=a.editorPI.getValue();try{let c;a.loading.form=!0,a.lastError=void 0,a.monacoS.clearEditorDecorations(a.editorPI,a.monacoDecorations),a.data.mode===p.D.ADD?c=yield a.uiMakerStylesS.post(r).toPromise():a.data.mode===p.D.EDIT&&(c=yield a.uiMakerStylesS.put(r._id,r,{select:C.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===p.D.ADD?a.constantsS.uiMakerStyle.addSuccess:a.constantsS.uiMakerStyle.editSuccess),t&&a.data.eventChannel.emit({action:a.data.mode===p.D.ADD?m.F.SAVED:m.F.UPDATED,data:c}),a.eventCenterS.uiMakerStylesSavedAndUpdate.next(!0),a.loading.form=!1}catch(c){a.loading.form=!1,a.ns.showErrorFromResponse(c.error||c,"Unable to save styles."),a.lastError=c.error,a.tab=a.tab||{},a.tab.axiosResponse={data:c.error},a.monacoS.highlightErrorInMonacoEditor(a.editorPI,a.tab,"MainSandbox.ts",a.monacoDecorations)}a.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=x.H.All,this.insertCodeModalC.showModal(b.b.UiMakerStylesFormC).then()}editorGenerated(t){var a=this;return(0,d.Z)(function*(){a.editorPI=t,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(t,o=>{a.form.valid&&a.save(!1)}),a.monacoS.addInsertCodeKeyBinding(t,o=>{a.generalCS.messageReceivedFor=x.H.All,a.data.mode!==p.D.VIEW&&a.insertCodeModalC.showModal(b.b.UiMakerStylesFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(o=>{o.type&&o.type===q.g.TEXT_COPIED&&o.componentName===b.b.UiMakerStylesFormC&&(a.monacoS.insertAtCursor(t,o.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),H.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.uiMakerStylesSavedAndUpdate.next(!1)}ISchedulerProps=C.qH;static \u0275fac=function(a){return new(a||i)(e.Y36(u.qu),e.Y36(w.W),e.Y36(U.b),e.Y36(k.L),e.Y36(ge.q),e.Y36(A.D),e.Y36(V.b),e.Y36(N.E),e.Y36(O.u),e.Y36(K._),e.Y36(j.P),e.Y36(W.M),e.Y36(U.b),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-ui-maker-styles-form"]],viewQuery:function(a,o){if(1&a&&(e.Gf(pt,5),e.Gf(ft,5)),2&a){let n;e.iGM(n=e.CRH())&&(o.insertCodeModalC=n.first),e.iGM(n=e.CRH())&&(o.viewDockerfileModelC=n.first)}},inputs:{data:"data"},decls:31,vars:15,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idUIMakerStylesForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[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"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[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"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"align-middle","mb-0","pt-1"],["formControlName","loadInAllPages","pTooltip","If true, these styles will be applied to all UI Pages.","label","Load Styles In All Pages",3,"binary"],["class","form-group row",4,"ngIf"],["formControlName","orderNumber","name","orderNumber","spellcheck","false","type","number","placeholder","Order number in which these styles will be loaded in page",1,"form-control","form-control-sm"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","isUIMakerEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["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(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,_t,3,0,"span",4),e.YNc(5,gt,3,0,"span",4),e.YNc(6,ht,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return o.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return o.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA()()(),e.TgZ(13,"div",11)(14,"p-tabView")(15,"p-tabPanel",12),e.YNc(16,Mt,13,3,"div",4),e.qZA(),e.TgZ(17,"p-tabPanel",13),e.YNc(18,bt,2,3,"div",14),e.qZA()()(),e.TgZ(19,"div",15),e.YNc(20,St,2,0,"a",16),e.TgZ(21,"button",17),e.NdJ("click",function(){return o.hideModal()}),e._UZ(22,"i",18),e._uU(23," Close"),e.qZA(),e.YNc(24,vt,3,2,"button",19),e.YNc(25,Ut,4,3,"button",19),e.qZA(),e.YNc(26,kt,1,0,"p-progressSpinner",20),e.qZA()()(),e._UZ(27,"app-insert-code-modal",21,22)(29,"app-monaco-editor-modal",23,24)),2&a&&(e.xp6(4),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(10),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",o.lastError),e.xp6(4),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(1),e.Q6J("ngIf",o.data.mode!==o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",o.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInSysUIMakerStyles")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[u._Y,u.Fj,u.wV,u.JJ,u.JL,u.sg,u.u,P.O5,z.y,X.P,ee.O,J.G,R.xf,R.x4,Y.u,mt.XZ,te.A],encapsulation:2,changeDetection:0})}return i})(),Zt=(()=>{class i{static \u0275fac=function(a){return new(a||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[Q.u,ae.A]})}return i})();var I=l(56212),Ce=l(33835);const wt=["uiMakerStylesFormC"];function It(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.edit())}),e._UZ(1,"i",18),e.qZA()}}function xt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.clone())}),e._UZ(1,"i",20),e.qZA()}}function Et(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removePermanent())}),e._UZ(1,"i",22),e.qZA()}}function Ft(i,s){1&i&&(e.TgZ(0,"th",26),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function At(i,s){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,Ft,2,0,"th",23),e.TgZ(2,"th",24),e._uU(3,"Order"),e.qZA(),e.TgZ(4,"th",25),e._uU(5,"Load in all pages"),e.qZA(),e.TgZ(6,"th"),e._uU(7,"Name"),e.qZA()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.showCheckbox)}}function Nt(i,s){if(1&i&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",30),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function Ot(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Yes"),e.qZA())}function Pt(i,s){if(1&i&&(e.TgZ(0,"tr",27),e.YNc(1,Nt,2,2,"td",28),e.TgZ(2,"td",29),e._uU(3),e.qZA(),e.TgZ(4,"td",29),e.YNc(5,Ot,2,0,"span",28),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA()()),2&i){const t=s.$implicit,a=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",a.showCheckbox),e.xp6(2),e.Oqu(t.orderNumber||""),e.xp6(2),e.Q6J("ngIf",t.loadInAllPages),e.xp6(2),e.Oqu(t.name)}}function Jt(i,s){1&i&&e._UZ(0,"p-progressSpinner",31)}let Me=(()=>{class i{uiMakerStylesS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=ne.d;gridKey=C.iH._id;EAPICategory=E.R;selectedRows=[];uiMakerStylesFormC;constructor(t,a,o,n,r,c,f,h,_,S,T,v,y,D){this.uiMakerStylesS=t,this.generalS=a,this.notificationS=o,this.navigationCS=n,this.authCS=r,this.constantsS=c,this.eventCenterS=f,this.router=h,this.userS=_,this.instanceS=S,this.ns=T,this.cs=v,this.confirmationService=y,this.cd=D}ngOnInit(){var t=this;return(0,d.Z)(function*(){t.eventCenterS.uiMakerStyles.selectedStyle.next(void 0),yield t.loadGridData(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){(o.action===m.F.SAVED||o.action===m.F.UPDATED)&&(t.uiMakerStylesFormC.hideModal(),yield t.loadGridData())});return function(o){return a.apply(this,arguments)}}())),t.generalS.setNewTitle("API Maker - UI Maker Styles")})()}loadGridData(){var t=this;return(0,d.Z)(function*(){t.loading.grid=!0;const a={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,active:1,loadInAllPages:1,orderNumber:1,user:1},sort:{orderNumber:1,name:1}};t.showAll&&delete a.find.active;const o=yield t.uiMakerStylesS.query(a).toPromise();o&&(t.selectedRows=[],t.rows=o.data,t.rowsMap=g.keyBy(t.rows,C.iH._id));let n=t.navigationCS.getQueryParam(I.p.am_ui_maker_style);n&&!t.rowsMap[n]&&t.rows.length&&(n=t.rows[0]._id),t.rowsMap[n]?(t.selectedRows=[t.rowsMap[n]],yield t.fillData()):t.eventCenterS.uiMakerStyles.selectedStyle.next(void 0),t.loading.grid=!1,t.cd.detectChanges()})()}add(){this.data.formData={},this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:m.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.uiMakerStylesFormC.showModal()}edit(){this.data.formData=this.rowsMap[g.map(this.selectedRows,"_id")[0]],this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:m.F.OPEN_FORM_IN_EDIT_MODE}),this.uiMakerStylesFormC.showModal()}clone(){var t=this;return(0,d.Z)(function*(){try{if(!t.selectedRows[0]||!t.rowsMap[g.map(t.selectedRows,"_id")[0]])return;const a=t.rowsMap[g.map(t.selectedRows,"_id")[0]]._id,o=(yield t.uiMakerStylesS.getById(a).toPromise()).data;delete o._id,delete o.guid,o.name=`${o.name}-clone`,(yield t.uiMakerStylesS.post(o).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.uiMakerStyle.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.uiMakerStyle.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.uiMakerStyle.cloneError)}})()}removePermanent(){var t=this;return(0,d.Z)(function*(){var a;t.confirmationService.confirm({message:t.cs.uiMakerStyle.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,d.Z)(function*(){for(const o of t.selectedRows)yield t.hardDelete(o._id);t.ns.showSuccess(t.cs.uiMakerStyle.removePermanent),yield t.loadGridData()}),function(){return a.apply(this,arguments)})})})()}hardDelete(t){var a=this;return(0,d.Z)(function*(){yield a.uiMakerStylesS.permanentDelete(t).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.uiMakerStyles.selectedStyle.next(void 0)}resetThisUrl(){var t=this;return(0,d.Z)(function*(){t.eventCenterS.uiMakerStyles.selectedStyle.next(void 0),yield t.navigationCS.setQueryParam(I.p.am_ui_maker_style,null)})()}itemSelected(){var t=this;return(0,d.Z)(function*(){yield t.resetThisUrl(),setTimeout(t.fillData.bind(t))})()}fillData(){var t=this;return(0,d.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(I.p.am_ui_maker_style,""),void t.eventCenterS.uiMakerStyles.selectedStyle.next(null);const a=t.selectedRows[0];a?(yield t.navigationCS.setQueryParam(I.p.am_ui_maker_style,a._id),t.eventCenterS.uiMakerStyles.selectedStyle.next(a)):yield t.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickHandler(){this.selectedRows.length&&this.edit()}ENavigationMenu=ie.E;static \u0275fac=function(a){return new(a||i)(e.Y36(ge.q),e.Y36(U.b),e.Y36(w.W),e.Y36(se.S),e.Y36(A.D),e.Y36(k.L),e.Y36(O.u),e.Y36(L.F0),e.Y36(Ce.K),e.Y36(N.E),e.Y36(w.W),e.Y36(k.L),e.Y36(F.YP),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-ui-maker-styles-list"]],viewQuery:function(a,o){if(1&a&&e.Gf(wt,5),2&a){let n;e.iGM(n=e.CRH())&&(o.uiMakerStylesFormC=n.first)}},inputs:{showCheckbox:"showCheckbox"},decls:19,vars:11,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],[1,"fab","fa-css3","fa-fw","text-white"],["href","javascript:",3,"click"],["tooltipPosition","left","pTooltip","Go back to UI Pages","src","/assets/images/icons/ui-maker.svg",1,"float-right","ml-3","mr-1",2,"height","20px"],["tooltipPosition","left","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","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",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"],["uiMakerStylesFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[1,"text-center",2,"width","40px"],[1,"text-center",2,"width","150px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"text-center"],[3,"value","pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Styles For UI Pages"),e.qZA(),e.TgZ(5,"a",3),e.NdJ("click",function(){return o.router.navigate([o.ENavigationMenu.DBMasters,"main"])}),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return o.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,It,2,0,"span",7),e.YNc(10,xt,2,0,"span",8),e.YNc(11,Et,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(r){return o.selectedRows=r})("selectionChange",function(){return o.itemSelected()})("dblclick",function(){return o.dblClickHandler()}),e.YNc(14,At,8,1,"ng-template",12),e.YNc(15,Pt,8,5,"ng-template",13),e.qZA(),e.YNc(16,Jt,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(17,"app-ui-maker-styles-form",15,16)),2&a&&(e.xp6(9),e.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",o.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",o.selectedRows)("dataKey",o.gridKey)("scrollable",!0)("value",o.rows),e.xp6(3),e.Q6J("ngIf",o.loading.grid),e.xp6(1),e.Q6J("data",o.data))},dependencies:[P.O5,M.iA,F.jx,M.Ei,M.UA,M.Mo,J.G,Y.u,he],encapsulation:2,changeDetection:0})}return i})(),be=(()=>{class i{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.Xpm({type:i,selectors:[["app-ui-maker-styles-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0),e._UZ(1,"app-ui-maker-styles-list"),e.qZA())},dependencies:[Me],encapsulation:2})}return i})();var Se=l(26125);const Rt=["insertCodeModalC"],Yt=["monacoEditorModalC"];function Lt(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," Add Utility"),e.qZA())}function Qt(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," View Utility"),e.qZA())}function qt(i,s){if(1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Edit Utility "),e.TgZ(3,"span",28),e._uU(4),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.Oqu(t.form.get("name").value)}}function Bt(i,s){if(1&i&&(e.TgZ(0,"div")(1,"form",29)(2,"div",30)(3,"label",31),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",32),e._UZ(6,"input",33),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.form)}}function Ht(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",34)(1,"app-monaco-editor",35),e.NdJ("editorGenerated",function(o){e.CHM(t);const n=e.oxw();return e.KtG(n.editorGenerated(o))}),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("isUIMakerEditor",!0)("editorOptions",t.editorOptions)}}function Gt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"a",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.viewError())}),e._uU(1,"View error"),e.qZA()}}function Vt(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function Kt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save(!1))}),e._UZ(1,"i",38),e.YNc(2,Vt,2,0,"span",4),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function jt(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function Wt(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update & Close"),e.qZA())}function $t(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save(!0))}),e._UZ(1,"i",38),e.YNc(2,jt,2,0,"span",4),e.YNc(3,Wt,2,0,"span",4),e.qZA()}if(2&i){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 zt(i,s){1&i&&e._UZ(0,"p-progressSpinner",39)}let Te=(()=>{class i{fb;ns;generalS;constantsS;uiMakerUtilsS;authCS;monacoS;instanceS;eventCenterS;localClientSyncUtilsS;webSocketClientCS;eventCenterCS;generalCS;cd;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];formData;IEventData=m.F;id;BE_HOST_PORT=Z.N.BE_HOST_PORT;DOCS_HOST_PORT=Z.N.DOCS_HOST_PORT;instances=[];editorPI;editorOptions={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(t,a,o,n,r,c,f,h,_,S,T,v,y,D){this.fb=t,this.ns=a,this.generalS=o,this.constantsS=n,this.uiMakerUtilsS=r,this.authCS=c,this.monacoS=f,this.instanceS=h,this.eventCenterS=_,this.localClientSyncUtilsS=S,this.webSocketClientCS=T,this.eventCenterCS=v,this.generalCS=y,this.cd=D}ngOnInit(){var t=this;return(0,d.Z)(function*(){t.createForm(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){if(o)if(t.form.enable(),o.action===m.F.OPEN_FORM_IN_EDIT_MODE)yield t.editViewLoadData(),t.cd.detectChanges();else if(o.action===m.F.OPEN_FORM_IN_VIEW_MODE)yield t.editViewLoadData(),t.cd.detectChanges();else if(o.action===m.F.OPEN_FORM_IN_ADD_MODE){t.form.reset(),t.form.patchValue(o.data||{});const n=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,E.R.UI_MAKER_UTILITY_CLASS).toPromise();t.editorOptions={readOnly:!1},t.generalCS.setValueInEditor(t,"editorPI",n.data),t.cd.detectChanges()}});return function(o){return a.apply(this,arguments)}}())),t.subscriptions.push(t.eventCenterCS.dataChangedInDatabase.subscribe(function(){var a=(0,d.Z)(function*(o){if(o){if(!t.data.formData)return;for(const n in o){const r=t.webSocketClientCS.getCategoryOfPath(n),f=t.generalCS.getUtf8FromBase64String(o[n].content);r===G.c.UI_MAKER_UTILITY_CLASS&&t.localClientSyncUtilsS.dataChangedInUIMakerUtils(n,f,t.data.formData,t.editorPI)}}});return function(o){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var t=this;return(0,d.Z)(function*(){const a=yield t.uiMakerUtilsS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(a.data),t.generalCS.setValueInEditor(t,"editorPI",a.data?.utilsCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[u.kI.required]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idUIMakerUtilForm").modal("show")},100)}hideModal(){$("#idUIMakerUtilForm").modal("hide")}save(t){var a=this;return(0,d.Z)(function*(){const o=a.form.getRawValue();let n;n=a.data.formData&&a.data.formData._id?(yield a.uiMakerUtilsS.getById(a.data.formData._id).toPromise()).data:{};const r=Object.assign({},n,o);r.user=a.authCS.getUserId(),r.utilsCode=a.editorPI.getValue();try{let c;a.loading.form=!0,a.lastError=void 0,a.monacoS.clearEditorDecorations(a.editorPI,a.monacoDecorations),a.data.mode===p.D.ADD?c=yield a.uiMakerUtilsS.post(r).toPromise():a.data.mode===p.D.EDIT&&(c=yield a.uiMakerUtilsS.put(r._id,r,{select:C.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===p.D.ADD?a.constantsS.uiMakerUtil.addSuccess:a.constantsS.uiMakerUtil.editSuccess),t&&a.data.eventChannel.emit({action:a.data.mode===p.D.ADD?m.F.SAVED:m.F.UPDATED,data:c}),a.eventCenterS.uiMakerUtilsSavedAndUpdate.next(!0),a.loading.form=!1}catch(c){a.loading.form=!1,a.ns.showErrorFromResponse(c.error||c,"Unable to save utility."),a.lastError=c.error,a.tab=a.tab||{},a.tab.axiosResponse={data:c.error},a.monacoS.highlightErrorInMonacoEditor(a.editorPI,a.tab,"MainSandbox.ts",a.monacoDecorations)}a.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=x.H.All,this.insertCodeModalC.showModal(b.b.UiMakerUtilsFormC).then()}editorGenerated(t){var a=this;return(0,d.Z)(function*(){a.editorPI=t,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(t,o=>{a.form.valid&&a.save(!1)}),a.monacoS.addInsertCodeKeyBinding(t,o=>{a.generalCS.messageReceivedFor=x.H.All,a.data.mode!==p.D.VIEW&&a.insertCodeModalC.showModal(b.b.UiMakerUtilsFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(o=>{o.type&&o.type===q.g.TEXT_COPIED&&o.componentName===b.b.UiMakerUtilsFormC&&(a.monacoS.insertAtCursor(t,o.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),H.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.uiMakerUtilsSavedAndUpdate.next(!1)}trim=g.trim;static \u0275fac=function(a){return new(a||i)(e.Y36(u.qu),e.Y36(w.W),e.Y36(U.b),e.Y36(k.L),e.Y36(Se.L),e.Y36(A.D),e.Y36(V.b),e.Y36(N.E),e.Y36(O.u),e.Y36(K._),e.Y36(j.P),e.Y36(W.M),e.Y36(U.b),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-ui-maker-utils-form"]],viewQuery:function(a,o){if(1&a&&(e.Gf(Rt,5),e.Gf(Yt,5)),2&a){let n;e.iGM(n=e.CRH())&&(o.insertCodeModalC=n.first),e.iGM(n=e.CRH())&&(o.viewDockerfileModelC=n.first)}},inputs:{data:"data"},decls:31,vars:16,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idUIMakerUtilForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],[1,"modal-body","overflow-auto"],["header","Basic Info"],[3,"header"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[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"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[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"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","isUIMakerEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["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(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Lt,3,0,"span",4),e.YNc(5,Qt,3,0,"span",4),e.YNc(6,qt,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return o.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return o.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA()()(),e.TgZ(13,"div",11)(14,"p-tabView")(15,"p-tabPanel",12),e.YNc(16,Bt,7,1,"div",4),e.qZA(),e.TgZ(17,"p-tabPanel",13),e.YNc(18,Ht,2,3,"div",14),e.qZA()()(),e.TgZ(19,"div",15),e.YNc(20,Gt,2,0,"a",16),e.TgZ(21,"button",17),e.NdJ("click",function(){return o.hideModal()}),e._UZ(22,"i",18),e._uU(23," Close"),e.qZA(),e.YNc(24,Kt,3,2,"button",19),e.YNc(25,$t,4,3,"button",19),e.qZA(),e.YNc(26,zt,1,0,"p-progressSpinner",20),e.qZA()()(),e._UZ(27,"app-insert-code-modal",21,22)(29,"app-monaco-editor-modal",23,24)),2&a&&(e.xp6(4),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(10),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(1),e.Q6J("header",(o.form.get("name").getRawValue()||"").trim()?"userUtils."+o.form.get("name").getRawValue().trim():"Code"),e.xp6(1),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",o.lastError),e.xp6(4),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(1),e.Q6J("ngIf",o.data.mode!==o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",o.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInSysUIMakerUtility")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,P.O5,z.y,X.P,ee.O,J.G,R.xf,R.x4,Y.u,te.A],encapsulation:2,changeDetection:0})}return i})(),Xt=(()=>{class i{static \u0275fac=function(a){return new(a||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[Q.u,ae.A]})}return i})();const ea=["uiMakerUtilsFormC"];function ta(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.edit())}),e._UZ(1,"i",18),e.qZA()}}function aa(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.clone())}),e._UZ(1,"i",20),e.qZA()}}function oa(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"span",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removePermanent())}),e._UZ(1,"i",22),e.qZA()}}function ia(i,s){1&i&&(e.TgZ(0,"th",24),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function na(i,s){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,ia,2,0,"th",23),e.TgZ(2,"th"),e._uU(3,"Name"),e.qZA()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.showCheckbox)}}function sa(i,s){if(1&i&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",27),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function ra(i,s){if(1&i&&(e.TgZ(0,"tr",25),e.YNc(1,sa,2,2,"td",26),e.TgZ(2,"td"),e._uU(3),e.qZA()()),2&i){const t=s.$implicit,a=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",a.showCheckbox),e.xp6(2),e.Oqu(t.name)}}function la(i,s){1&i&&e._UZ(0,"p-progressSpinner",28)}let ve=(()=>{class i{uiMakerUtilsS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=ne.d;gridKey=C.iH._id;EAPICategory=E.R;selectedRows=[];uiMakerUtilsFormC;constructor(t,a,o,n,r,c,f,h,_,S,T,v,y,D){this.uiMakerUtilsS=t,this.generalS=a,this.notificationS=o,this.navigationCS=n,this.authCS=r,this.constantsS=c,this.eventCenterS=f,this.router=h,this.userS=_,this.instanceS=S,this.ns=T,this.cs=v,this.confirmationService=y,this.cd=D}ngOnInit(){var t=this;return(0,d.Z)(function*(){t.eventCenterS.uiMakerUtils.selectedUtil.next(void 0),yield t.loadGridData(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var a=(0,d.Z)(function*(o){(o.action===m.F.SAVED||o.action===m.F.UPDATED)&&(t.uiMakerUtilsFormC.hideModal(),yield t.loadGridData())});return function(o){return a.apply(this,arguments)}}())),t.generalS.setNewTitle("API Maker - UI Maker Utility")})()}loadGridData(){var t=this;return(0,d.Z)(function*(){t.loading.grid=!0;const a={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,active:1,user:1},sort:{order:1}};t.showAll&&delete a.find.active;const o=yield t.uiMakerUtilsS.query(a).toPromise();o&&(t.selectedRows=[],t.rows=o.data,t.rowsMap=g.keyBy(t.rows,C.iH._id));let n=t.navigationCS.getQueryParam(I.p.am_ui_maker_util);n&&!t.rowsMap[n]&&t.rows.length&&(n=t.rows[0]._id),t.rowsMap[n]?(t.selectedRows=[t.rowsMap[n]],yield t.fillData()):t.eventCenterS.uiMakerUtils.selectedUtil.next(void 0),t.loading.grid=!1,t.cd.detectChanges()})()}add(){this.data.formData={},this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:m.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.uiMakerUtilsFormC.showModal()}edit(){this.data.formData=this.rowsMap[g.map(this.selectedRows,"_id")[0]],this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:m.F.OPEN_FORM_IN_EDIT_MODE}),this.uiMakerUtilsFormC.showModal()}clone(){var t=this;return(0,d.Z)(function*(){try{if(!t.selectedRows[0]||!t.rowsMap[g.map(t.selectedRows,"_id")[0]])return;const a=t.rowsMap[g.map(t.selectedRows,"_id")[0]]._id,o=(yield t.uiMakerUtilsS.getById(a).toPromise()).data;delete o._id,delete o.guid,o.name=`${o.name}-clone`,(yield t.uiMakerUtilsS.post(o).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.uiMakerUtil.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.uiMakerUtil.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.uiMakerUtil.cloneError)}})()}removePermanent(){var t=this;return(0,d.Z)(function*(){var a;t.confirmationService.confirm({message:t.cs.uiMakerUtil.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,d.Z)(function*(){for(const o of t.selectedRows)yield t.hardDelete(o._id);t.ns.showSuccess(t.cs.uiMakerUtil.removePermanent),yield t.loadGridData()}),function(){return a.apply(this,arguments)})})})()}hardDelete(t){var a=this;return(0,d.Z)(function*(){yield a.uiMakerUtilsS.permanentDelete(t).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.uiMakerUtils.selectedUtil.next(void 0)}resetThisUrl(){var t=this;return(0,d.Z)(function*(){t.eventCenterS.uiMakerUtils.selectedUtil.next(void 0),yield t.navigationCS.setQueryParam(I.p.am_ui_maker_util,null)})()}itemSelected(){var t=this;return(0,d.Z)(function*(){yield t.resetThisUrl(),setTimeout(t.fillData.bind(t))})()}fillData(){var t=this;return(0,d.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(I.p.am_ui_maker_util,""),void t.eventCenterS.uiMakerUtils.selectedUtil.next(null);const a=t.selectedRows[0];a?(yield t.navigationCS.setQueryParam(I.p.am_ui_maker_util,a._id),t.eventCenterS.uiMakerUtils.selectedUtil.next(a)):yield t.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickHandler(){this.selectedRows.length&&this.edit()}ENavigationMenu=ie.E;static \u0275fac=function(a){return new(a||i)(e.Y36(Se.L),e.Y36(U.b),e.Y36(w.W),e.Y36(se.S),e.Y36(A.D),e.Y36(k.L),e.Y36(O.u),e.Y36(L.F0),e.Y36(Ce.K),e.Y36(N.E),e.Y36(w.W),e.Y36(k.L),e.Y36(F.YP),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-ui-maker-utils-list"]],viewQuery:function(a,o){if(1&a&&e.Gf(ea,5),2&a){let n;e.iGM(n=e.CRH())&&(o.uiMakerUtilsFormC=n.first)}},inputs:{showCheckbox:"showCheckbox"},decls:19,vars:11,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],[1,"fab","fa-uniregistry","fa-fw","text-white"],["href","javascript:",3,"click"],["tooltipPosition","left","pTooltip","Go back to UI Pages","src","/assets/images/icons/ui-maker.svg",1,"float-right","ml-3","mr-1",2,"height","20px"],["tooltipPosition","left","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","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",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"],["uiMakerUtilsFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],[3,"value","pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Common Utils For UI Pages"),e.qZA(),e.TgZ(5,"a",3),e.NdJ("click",function(){return o.router.navigate([o.ENavigationMenu.DBMasters,"main"])}),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return o.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,ta,2,0,"span",7),e.YNc(10,aa,2,0,"span",8),e.YNc(11,oa,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(r){return o.selectedRows=r})("selectionChange",function(){return o.itemSelected()})("dblclick",function(){return o.dblClickHandler()}),e.YNc(14,na,4,1,"ng-template",12),e.YNc(15,ra,4,3,"ng-template",13),e.qZA(),e.YNc(16,la,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(17,"app-ui-maker-utils-form",15,16)),2&a&&(e.xp6(9),e.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",o.selectedRows.length&&o.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",o.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",o.selectedRows)("dataKey",o.gridKey)("scrollable",!0)("value",o.rows),e.xp6(3),e.Q6J("ngIf",o.loading.grid),e.xp6(1),e.Q6J("data",o.data))},dependencies:[P.O5,M.iA,F.jx,M.Ei,M.UA,M.Mo,J.G,Y.u,Te],encapsulation:2,changeDetection:0})}return i})();const da=[{path:"main",component:_e,canActivate:[B.P]},{path:"utils",component:(()=>{class i{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.Xpm({type:i,selectors:[["app-ui-maker-styles-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0),e._UZ(1,"app-ui-maker-utils-list"),e.qZA())},dependencies:[ve],encapsulation:2})}return i})(),canActivate:[B.P]},{path:"styles",component:be,canActivate:[B.P]}];let ca=(()=>{class i{static \u0275fac=function(a){return new(a||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[L.Bz.forChild(da),Q.u,Be,Xt,Zt]})}return i})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2579],{52579:(O,p,i)=>{i.r(p),i.d(p,{EncryptStringsM:()=>U});var d=i(77664),u=i(443),g=i(17017),s=i(15861),m=i(20553),y=i(96925),t=i(94946),h=i(53429),f=i(99961),T=i(77240),v=i(84795),c=i(60095),x=i(96814),b=i(97680);const Z=["inputTa"];function S(o,J){1&o&&t._UZ(0,"p-progressSpinner",28)}const A=[{path:"",component:(()=>{class o{instanceS;ns;generalS;authS;loading={grid:!1};version="";versions=[];selectedVersion;STORE_BE_HOST_PORT=m.N.STORE_BE_HOST_PORT;intervalRef;inputText="";encryptedText="";maxLen=190;inputTa;constructor(n,r,e,a){this.instanceS=n,this.ns=r,this.generalS=e,this.authS=a}ngOnInit(){}onTextChange(n){this.inputText=n}onBlur(){if(this.inputText)try{const n=JSON.parse(this.inputText),r=JSON.stringify(n);r!==this.inputText&&(this.inputText=r,this.onTextChange(this.inputText))}catch{}}encryptAction(){var n=this;return(0,s.Z)(function*(){setTimeout((0,s.Z)(function*(){try{if(!n.inputText.length)return;const r=yield n.instanceS.getEncryptedString(n.inputText);n.encryptedText=r.data.data,n.ns.showSuccess("Encryption done...")}catch(r){n.ns.showErrorMessageFromErrorObject(r)}}),300)})()}clearAction(){this.inputText="",this.encryptedText="",setTimeout(()=>{try{this.inputTa?.nativeElement.focus()}catch{}},0)}copyOutput(){var n=this;return(0,s.Z)(function*(){if(!n.encryptedText)return;const r=n.encryptedText;try{if(navigator&&navigator.clipboard&&navigator.clipboard.writeText)return void(yield navigator.clipboard.writeText(r))}catch{}try{const e=document.createElement("textarea");e.style.position="fixed",e.style.left="-9999px",e.value=r,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}catch{}})()}get inputLength(){return[...this.inputText||""].length}ngOnDestroy(){clearInterval(this.intervalRef)}EApiRequestBodyType=y.vT;static \u0275fac=function(r){return new(r||o)(t.Y36(h.E),t.Y36(f.W),t.Y36(T.b),t.Y36(v.e))};static \u0275cmp=t.Xpm({type:o,selectors:[["app-deploy-api-maker"]],viewQuery:function(r,e){if(1&r&&t.Gf(Z,5),2&r){let a;t.iGM(a=t.CRH())&&(e.inputTa=a.first)}},decls:62,vars:10,consts:[["id","about",1,"mt-3"],[1,"container"],[1,"row"],[1,"col-lg-8","mx-auto"],[1,"text-center","mb-3","mt-3"],["src","/assets/images/icons/rsa_encryption.svg","alt","Deploy API Maker icon",1,"mr-2",2,"height","40px"],[1,"mt-3"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"row","m-0","p-4","rounded",2,"position","relative","background-color","var(--dark-bg-primary)","color","var(--text-color)"],[1,"col-6","p-3"],[1,"d-flex","justify-content-between","align-items-center","mb-2"],[1,"font-weight-bold","mb-0"],["type","button",1,"btn","btn-sm","btn-outline-success",3,"disabled","click"],[1,"fas","fa-lock","mr-2"],["rows","10","placeholder","Type text to encrypt...","aria-label","input-text",1,"form-control","font-monospaced",2,"background-color","var(--dark-bg-primary)","color","var(--text-color)","border","1px solid var(--bg-tertiary)",3,"ngModel","blur","ngModelChange"],["inputTa",""],[1,"d-flex","justify-content-between","align-items-center","mt-2"],[1,"text-muted"],["type","button",1,"btn","btn-sm","btn-outline-secondary","ml-2",3,"disabled","click"],[1,"fas","fa-eraser","mr-2"],["rows","10","readonly","","aria-label","encrypted-output",1,"form-control","font-monospaced",2,"background-color","var(--dark-bg-primary)","color","var(--text-color)","border","2px solid var(--bg-tertiary)","border-radius","6px","box-shadow","inset 0 0 8px rgba(0,0,0,0.45)",3,"value"],[1,"mt-2","d-flex","justify-content-end"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"disabled","click"],[1,"fas","fa-copy","text-warning","fa-fw"],[1,"col-12","mt-3"],[1,"pt-3","border-top"],[1,"mb-0"],["styleClass","w-4rem h-4rem","strokeWidth","0","animationDuration",".5s",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","0","animationDuration",".5s"]],template:function(r,e){1&r&&(t.TgZ(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),t._UZ(5,"img",5),t.TgZ(6,"span"),t._uU(7,"Encrypt Strings"),t.qZA()()()()()(),t.TgZ(8,"section",6)(9,"div",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"label",11),t._uU(14),t.qZA(),t.TgZ(15,"div")(16,"button",12),t.NdJ("click",function(){return e.encryptAction()}),t._UZ(17,"i",13),t._uU(18," Encrypt "),t.qZA()()(),t.TgZ(19,"textarea",14,15),t.NdJ("blur",function(){return e.onBlur()})("ngModelChange",function(l){return e.inputText=l})("ngModelChange",function(l){return e.onTextChange(l)}),t.qZA(),t.TgZ(21,"div",16)(22,"small",17),t._uU(23),t.qZA(),t.TgZ(24,"small",17),t._uU(25),t.qZA()()(),t.TgZ(26,"div",9)(27,"div",10)(28,"label",11),t._uU(29,"Encrypted (read-only)"),t.qZA(),t.TgZ(30,"button",18),t.NdJ("click",function(){return e.clearAction()}),t._UZ(31,"i",19),t._uU(32," Clear "),t.qZA()(),t._UZ(33,"textarea",20),t.TgZ(34,"div",21)(35,"button",22),t.NdJ("click",function(){return e.copyOutput()}),t._UZ(36,"i",23),t._uU(37," Copy "),t.qZA()()(),t.TgZ(38,"div",24)(39,"div",25)(40,"div",17)(41,"strong"),t._uU(42,"Note:"),t.qZA(),t._uU(43," Use this utility to securely encrypt sensitive connection strings and credentials."),t._UZ(44,"br"),t.TgZ(45,"strong"),t._uU(46,"Supported options:"),t.qZA(),t.TgZ(47,"ul",26)(48,"li"),t._uU(49,"MongoDB connection strings (for API Maker and for logging)"),t.qZA(),t.TgZ(50,"li"),t._uU(51,"Redis connection strings (internal and external)"),t.qZA(),t.TgZ(52,"li"),t._uU(53,"Optionally encrypt only the Redis password instead of the whole connection string"),t.qZA()(),t._uU(54," You can use them in "),t.TgZ(55,"strong"),t._uU(56,".env"),t.qZA(),t._uU(57," file."),t._UZ(58,"br"),t.TgZ(59,"i"),t._uU(60,"Ensure your original secrets are stored safely, as encrypted strings are irreversible and cannot be recovered."),t.qZA()()()(),t.YNc(61,S,1,0,"p-progressSpinner",27),t.qZA()()()),2&r&&(t.xp6(14),t.hij("Input (max ",e.maxLen," chars)"),t.xp6(2),t.Q6J("disabled",0===e.inputLength),t.xp6(3),t.Q6J("ngModel",e.inputText),t.xp6(4),t.AsE("Characters: ",e.inputLength," / ",e.maxLen,""),t.xp6(2),t.hij("Remaining: ",e.maxLen-e.inputLength,""),t.xp6(5),t.Q6J("disabled",!e.inputLength&&!e.encryptedText),t.xp6(3),t.Q6J("value",e.encryptedText),t.xp6(2),t.Q6J("disabled",!e.encryptedText),t.xp6(26),t.Q6J("ngIf",e.loading.grid))},dependencies:[c.Fj,c.JJ,c.On,x.O5,b.G]})}return o})(),canActivate:[i(95399).x]}];let U=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t.oAB({type:o});static \u0275inj=t.cJS({imports:[d.Bz.forChild(A),g.u,u.O]})}return o})()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3139],{83139:(m,o,n)=>{n.r(o),n.d(o,{UtilityM:()=>M});var l=n(77664),d=n(17017),h=n(94946);const s=[{path:"monitoring",loadChildren:()=>n.e(2140).then(n.bind(n,2140)).then(t=>t.MonitoringM)},{path:"log-table",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(4186),n.e(1025),n.e(5765),n.e(885),n.e(7470),n.e(9243),n.e(7975),n.e(6236),n.e(292),n.e(8125),n.e(1558),n.e(8592),n.e(8296)]).then(n.bind(n,48296)).then(t=>t.LogTableM)},{path:"sandbox-settings",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(885),n.e(7470),n.e(7975),n.e(6236),n.e(292),n.e(8592),n.e(7368)]).then(n.bind(n,67368)).then(t=>t.SandboxSettingsM)},{path:"app-store",loadChildren:()=>n.e(913).then(n.bind(n,10913)).then(t=>t.AppStoreM)},{path:"notes",loadChildren:()=>n.e(1957).then(n.bind(n,41957)).then(t=>t.NotesM)},{path:"utility-classes",loadChildren:()=>n.e(7649).then(n.bind(n,57649)).then(t=>t.UtilityClassesM)},{path:"internationalization",loadChildren:()=>n.e(2714).then(n.bind(n,62714)).then(t=>t.I18nM)},{path:"log-profile",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(4186),n.e(1025),n.e(5765),n.e(885),n.e(9243),n.e(8125),n.e(1558),n.e(8592),n.e(148)]).then(n.bind(n,40148)).then(t=>t.LogProfileM)},{path:"native-process-logs",loadChildren:()=>n.e(2735).then(n.bind(n,62735)).then(t=>t.NativeProcessLogsM)},{path:"system-migration",loadChildren:()=>Promise.all([n.e(7975),n.e(8266)]).then(n.bind(n,58266)).then(t=>t.DatabasesMigrationM)},{path:"code-finder",loadChildren:()=>n.e(7470).then(n.bind(n,27470)).then(t=>t.CodeFinderM)},{path:"auto-increment",loadChildren:()=>n.e(5761).then(n.bind(n,5761)).then(t=>t.AutoIncrementM)},{path:"ts-gen-interfaces",loadChildren:()=>n.e(485).then(n.bind(n,60485)).then(t=>t.TsGenInterfacesM)},{path:"deploy-api-maker",loadChildren:()=>n.e(3081).then(n.bind(n,43081)).then(t=>t.DeployApiMakerM)},{path:"code-comparator-model",loadChildren:()=>n.e(238).then(n.bind(n,60238)).then(t=>t.CodeComparatorModelM)}];let M=(()=>{class t{static \u0275fac=function(C){return new(C||t)};static \u0275mod=h.oAB({type:t});static \u0275inj=h.cJS({imports:[l.Bz.forChild(s),d.u]})}return t})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3139],{83139:(m,o,n)=>{n.r(o),n.d(o,{UtilityM:()=>M});var h=n(77664),d=n(17017),l=n(94946);const s=[{path:"monitoring",loadChildren:()=>n.e(2140).then(n.bind(n,2140)).then(t=>t.MonitoringM)},{path:"log-table",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(4186),n.e(1025),n.e(5765),n.e(885),n.e(7470),n.e(9243),n.e(7975),n.e(6236),n.e(292),n.e(8125),n.e(1558),n.e(8592),n.e(8296)]).then(n.bind(n,48296)).then(t=>t.LogTableM)},{path:"sandbox-settings",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(885),n.e(7470),n.e(7975),n.e(6236),n.e(292),n.e(8592),n.e(7368)]).then(n.bind(n,67368)).then(t=>t.SandboxSettingsM)},{path:"app-store",loadChildren:()=>n.e(913).then(n.bind(n,10913)).then(t=>t.AppStoreM)},{path:"notes",loadChildren:()=>n.e(1957).then(n.bind(n,41957)).then(t=>t.NotesM)},{path:"utility-classes",loadChildren:()=>n.e(7649).then(n.bind(n,57649)).then(t=>t.UtilityClassesM)},{path:"internationalization",loadChildren:()=>n.e(2714).then(n.bind(n,62714)).then(t=>t.I18nM)},{path:"log-profile",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(4186),n.e(1025),n.e(5765),n.e(885),n.e(9243),n.e(8125),n.e(1558),n.e(8592),n.e(148)]).then(n.bind(n,40148)).then(t=>t.LogProfileM)},{path:"native-process-logs",loadChildren:()=>n.e(2735).then(n.bind(n,62735)).then(t=>t.NativeProcessLogsM)},{path:"system-migration",loadChildren:()=>Promise.all([n.e(7975),n.e(8266)]).then(n.bind(n,58266)).then(t=>t.DatabasesMigrationM)},{path:"code-finder",loadChildren:()=>n.e(7470).then(n.bind(n,27470)).then(t=>t.CodeFinderM)},{path:"auto-increment",loadChildren:()=>n.e(5761).then(n.bind(n,5761)).then(t=>t.AutoIncrementM)},{path:"ts-gen-interfaces",loadChildren:()=>n.e(485).then(n.bind(n,60485)).then(t=>t.TsGenInterfacesM)},{path:"deploy-api-maker",loadChildren:()=>Promise.all([n.e(443),n.e(6650)]).then(n.bind(n,86650)).then(t=>t.DeployApiMakerM)},{path:"encrypt-strings",loadChildren:()=>Promise.all([n.e(443),n.e(2579)]).then(n.bind(n,52579)).then(t=>t.EncryptStringsM)},{path:"code-comparator-model",loadChildren:()=>n.e(238).then(n.bind(n,60238)).then(t=>t.CodeComparatorModelM)}];let M=(()=>{class t{static \u0275fac=function(C){return new(C||t)};static \u0275mod=l.oAB({type:t});static \u0275inj=l.cJS({imports:[h.Bz.forChild(s),d.u]})}return t})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[443],{443:(k,T,c)=>{c.d(T,{p:()=>st,O:()=>at});var r=c(96814),o=c(69862),e=c(94946),g=c(85219),h=c(40707),x=c(82076),b=c(3983),v=c(77778),p=c(84713),m=c(2332);let d=(()=>{class i extends p.s{pathId;ngOnInit(){this.pathId="url(#"+(0,m.Th)()+")"}static \u0275fac=function(){let t;return function(s){return(t||(t=e.n5z(i)))(s||i)}}();static \u0275cmp=e.Xpm({type:i,selectors:[["UploadIcon"]],standalone:!0,features:[e.qOj,e.jDz],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,s){1&n&&(e.O4$(),e.TgZ(0,"svg",0)(1,"g"),e._UZ(2,"path",1),e.qZA(),e.TgZ(3,"defs")(4,"clipPath",2),e._UZ(5,"rect",3),e.qZA()()()),2&n&&(e.Tol(s.getClassNames()),e.uIk("aria-label",s.ariaLabel)("aria-hidden",s.ariaHidden)("role",s.role),e.xp6(1),e.uIk("clip-path",s.pathId),e.xp6(3),e.Q6J("id",s.pathId))},encapsulation:2})}return i})();var _=c(86825),f=c(12591);let F=(()=>{class i extends p.s{pathId;ngOnInit(){this.pathId="url(#"+(0,m.Th)()+")"}static \u0275fac=function(){let t;return function(s){return(t||(t=e.n5z(i)))(s||i)}}();static \u0275cmp=e.Xpm({type:i,selectors:[["ExclamationTriangleIcon"]],standalone:!0,features:[e.qOj,e.jDz],decls:8,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,s){1&n&&(e.O4$(),e.TgZ(0,"svg",0)(1,"g"),e._UZ(2,"path",1)(3,"path",2)(4,"path",3),e.qZA(),e.TgZ(5,"defs")(6,"clipPath",4),e._UZ(7,"rect",5),e.qZA()()()),2&n&&(e.Tol(s.getClassNames()),e.uIk("aria-label",s.ariaLabel)("aria-hidden",s.ariaHidden)("role",s.role),e.xp6(1),e.uIk("clip-path",s.pathId),e.xp6(5),e.Q6J("id",s.pathId))},encapsulation:2})}return i})(),w=(()=>{class i extends p.s{pathId;ngOnInit(){this.pathId="url(#"+(0,m.Th)()+")"}static \u0275fac=function(){let t;return function(s){return(t||(t=e.n5z(i)))(s||i)}}();static \u0275cmp=e.Xpm({type:i,selectors:[["InfoCircleIcon"]],standalone:!0,features:[e.qOj,e.jDz],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,s){1&n&&(e.O4$(),e.TgZ(0,"svg",0)(1,"g"),e._UZ(2,"path",1),e.qZA(),e.TgZ(3,"defs")(4,"clipPath",2),e._UZ(5,"rect",3),e.qZA()()()),2&n&&(e.Tol(s.getClassNames()),e.uIk("aria-label",s.ariaLabel)("aria-hidden",s.ariaHidden)("role",s.role),e.xp6(1),e.uIk("clip-path",s.pathId),e.xp6(3),e.Q6J("id",s.pathId))},encapsulation:2})}return i})();var U=c(88468),I=c(44480),Z=c(65592),S=c(64352),J=c(50671);function E(i,a){if(1&i&&e._UZ(0,"span"),2&i){const t=e.oxw().$implicit;e.Tol("p-message-icon pi "+t.icon),e.uIk("data-pc-section","icon")}}function N(i,a){1&i&&e._UZ(0,"CheckIcon"),2&i&&e.uIk("data-pc-section","icon")}function Y(i,a){1&i&&e._UZ(0,"InfoCircleIcon"),2&i&&e.uIk("data-pc-section","icon")}function O(i,a){1&i&&e._UZ(0,"TimesCircleIcon"),2&i&&e.uIk("data-pc-section","icon")}function B(i,a){1&i&&e._UZ(0,"ExclamationTriangleIcon"),2&i&&e.uIk("data-pc-section","icon")}function D(i,a){if(1&i&&(e.TgZ(0,"span",10),e.ynx(1),e.YNc(2,N,1,1,"CheckIcon",11),e.YNc(3,Y,1,1,"InfoCircleIcon",11),e.YNc(4,O,1,1,"TimesCircleIcon",11),e.YNc(5,B,1,1,"ExclamationTriangleIcon",11),e.BQk(),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Q6J("ngIf","success"===t.severity),e.xp6(1),e.Q6J("ngIf","info"===t.severity),e.xp6(1),e.Q6J("ngIf","error"===t.severity),e.xp6(1),e.Q6J("ngIf","warn"===t.severity)}}function A(i,a){if(1&i&&e._UZ(0,"span",14),2&i){const t=e.oxw(2).$implicit;e.Q6J("innerHTML",t.summary,e.oJD),e.uIk("data-pc-section","summary")}}function H(i,a){if(1&i&&e._UZ(0,"span",15),2&i){const t=e.oxw(2).$implicit;e.Q6J("innerHTML",t.detail,e.oJD),e.uIk("data-pc-section","detail")}}function z(i,a){if(1&i&&(e.ynx(0),e.YNc(1,A,1,2,"span",12),e.YNc(2,H,1,2,"span",13),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",t.summary),e.xp6(1),e.Q6J("ngIf",t.detail)}}function P(i,a){if(1&i&&(e.TgZ(0,"span",18),e._uU(1),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.uIk("data-pc-section","summary"),e.xp6(1),e.Oqu(t.summary)}}function q(i,a){if(1&i&&(e.TgZ(0,"span",19),e._uU(1),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.uIk("data-pc-section","detail"),e.xp6(1),e.Oqu(t.detail)}}function G(i,a){if(1&i&&(e.YNc(0,P,2,2,"span",16),e.YNc(1,q,2,2,"span",17)),2&i){const t=e.oxw().$implicit;e.Q6J("ngIf",t.summary),e.xp6(1),e.Q6J("ngIf",t.detail)}}function R(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("click",function(){e.CHM(t);const s=e.oxw().index,l=e.oxw(2);return e.KtG(l.removeMessage(s))}),e._UZ(1,"TimesIcon",21),e.qZA()}2&i&&(e.uIk("aria-label","Close")("data-pc-section","closebutton"),e.xp6(1),e.Q6J("styleClass","p-message-close-icon"),e.uIk("data-pc-section","closeicon"))}const V=function(i,a){return{showTransitionParams:i,hideTransitionParams:a}},K=function(i){return{value:"visible",params:i}};function j(i,a){if(1&i&&(e.TgZ(0,"div",4)(1,"div",5),e.YNc(2,E,1,3,"span",6),e.YNc(3,D,6,4,"span",7),e.YNc(4,z,3,2,"ng-container",1),e.YNc(5,G,2,2,"ng-template",null,8,e.W1O),e.YNc(7,R,2,4,"button",9),e.qZA()()),2&i){const t=a.$implicit,n=e.MAs(6),s=e.oxw(2);e.Tol("p-message p-message-"+t.severity),e.Q6J("@messageAnimation",e.VKq(12,K,e.WLB(9,V,s.showTransitionOptions,s.hideTransitionOptions))),e.xp6(1),e.uIk("data-pc-section","wrapper"),e.xp6(1),e.Q6J("ngIf",t.icon),e.xp6(1),e.Q6J("ngIf",!t.icon),e.xp6(1),e.Q6J("ngIf",!s.escape)("ngIfElse",n),e.xp6(3),e.Q6J("ngIf",s.closable)}}function $(i,a){if(1&i&&(e.ynx(0),e.YNc(1,j,8,14,"div",3),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.messages)}}function W(i,a){1&i&&e.GkF(0)}function X(i,a){if(1&i&&(e.TgZ(0,"div",22)(1,"div",5),e.YNc(2,W,1,0,"ng-container",23),e.qZA()()),2&i){const t=e.oxw();e.Q6J("ngClass","p-message p-message-"+t.severity),e.xp6(2),e.Q6J("ngTemplateOutlet",t.contentTemplate)}}let ee=(()=>{class i{messageService;el;cd;set value(t){this.messages=t,this.startMessageLifes(this.messages)}closable=!0;style;styleClass;enableService=!0;key;escape=!0;severity;showTransitionOptions="300ms ease-out";hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)";valueChange=new e.vpe;templates;messages;messageSubscription;clearSubscription;timerSubscriptions=[];contentTemplate;constructor(t,n,s){this.messageService=t,this.el=n,this.cd=s}ngAfterContentInit(){this.templates?.forEach(t=>{t.getType(),this.contentTemplate=t.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t){Array.isArray(t)||(t=[t]);const n=t.filter(s=>this.key===s.key);this.messages=this.messages?[...this.messages,...n]:[...n],this.startMessageLifes(n),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let t=this.el.nativeElement.parentElement;return!(!t||!t.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(t){this.messages=this.messages?.filter((n,s)=>s!==t),this.valueChange.emit(this.messages)}get icon(){const t=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(t){case"success":return"pi-check";case"info":default:return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle"}return null}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(t=>t.unsubscribe())}startMessageLifes(t){t?.forEach(n=>n.life&&this.startMessageLife(n))}startMessageLife(t){const n=function L(i=0,a,t=S.P){let n=-1;return null!=a&&((0,J.K)(a)?t=a:n=a),new Z.y(s=>{let l=function Q(i){return i instanceof Date&&!isNaN(i)}(i)?+i-t.now():i;l<0&&(l=0);let u=0;return t.schedule(function(){s.closed||(s.next(u++),0<=n?this.schedule(void 0,n):s.complete())},l)})}(t.life).subscribe(()=>{this.messages=this.messages?.filter(s=>s!==t),this.timerSubscriptions=this.timerSubscriptions?.filter(s=>s!==n),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(n)}static \u0275fac=function(n){return new(n||i)(e.Y36(g.ez,8),e.Y36(e.SBq),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["p-messages"]],contentQueries:function(n,s,l){if(1&n&&e.Suo(l,g.jx,4),2&n){let u;e.iGM(u=e.CRH())&&(s.templates=u)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:"closable",style:"style",styleClass:"styleClass",enableService:"enableService",key:"key",escape:"escape",severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange"},decls:4,vars:8,consts:[["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["staticMessage",""],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"class",4,"ngIf"],["class","p-message-icon",4,"ngIf"],["escapeOut",""],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-message-icon"],[4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[3,"styleClass"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(n,s){if(1&n&&(e.TgZ(0,"div",0),e.YNc(1,$,2,1,"ng-container",1),e.YNc(2,X,3,2,"ng-template",null,2,e.W1O),e.qZA()),2&n){const l=e.MAs(3);e.Tol(s.styleClass),e.Q6J("ngStyle",s.style),e.uIk("aria-atomic",!0)("aria-live","assertive")("data-pc-name","message"),e.xp6(1),e.Q6J("ngIf",!s.contentTemplate)("ngIfElse",l)}},dependencies:function(){return[r.mk,r.sg,r.O5,r.tP,r.PC,I.H,f.n,w,U.x,F,v.q]},styles:["@layer primeng{.p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}}\n"],encapsulation:2,data:{animation:[(0,_.X$)("messageAnimation",[(0,_.eR)(":enter",[(0,_.oB)({opacity:0,transform:"translateY(-25%)"}),(0,_.jt)("{{showTransitionParams}}")]),(0,_.eR)(":leave",[(0,_.jt)("{{hideTransitionParams}}",(0,_.oB)({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return i})(),M=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[r.ez,I.T,f.n,w,U.x,F,v.q]})}return i})();var y=c(66651),te=c(6593);const ie=["advancedfileinput"],ne=["basicfileinput"],se=["content"];function ae(i,a){if(1&i&&e._UZ(0,"span",18),2&i){const t=e.oxw(2);e.Tol(t.chooseIcon),e.Q6J("ngClass","p-button-icon p-button-icon-left"),e.uIk("aria-label",!0)("data-pc-section","chooseicon")}}function oe(i,a){1&i&&e._UZ(0,"PlusIcon",21),2&i&&(e.Q6J("styleClass","p-button-icon p-button-icon-left"),e.uIk("aria-label",!0)("data-pc-section","chooseicon"))}function le(i,a){}function ce(i,a){1&i&&e.YNc(0,le,0,0,"ng-template")}function pe(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,ce,1,0,null,11),e.qZA()),2&i){const t=e.oxw(3);e.uIk("aria-label",!0)("data-pc-section","chooseicon"),e.xp6(1),e.Q6J("ngTemplateOutlet",t.chooseIconTemplate)}}function re(i,a){if(1&i&&(e.ynx(0),e.YNc(1,oe,1,3,"PlusIcon",19),e.YNc(2,pe,2,3,"span",20),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.chooseIconTemplate),e.xp6(1),e.Q6J("ngIf",t.chooseIconTemplate)}}function de(i,a){if(1&i&&e._UZ(0,"span",25),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.uploadIcon),e.uIk("aria-hidden",!0)}}function _e(i,a){1&i&&e._UZ(0,"UploadIcon",21),2&i&&e.Q6J("styleClass","p-button-icon p-button-icon-left")}function ue(i,a){}function ge(i,a){1&i&&e.YNc(0,ue,0,0,"ng-template")}function fe(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,ge,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.uIk("aria-hidden",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",t.uploadIconTemplate)}}function me(i,a){if(1&i&&(e.ynx(0),e.YNc(1,_e,1,1,"UploadIcon",19),e.YNc(2,fe,2,2,"span",20),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.uploadIconTemplate),e.xp6(1),e.Q6J("ngIf",t.uploadIconTemplate)}}function he(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"p-button",23),e.NdJ("onClick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.upload())}),e.YNc(1,de,1,2,"span",24),e.YNc(2,me,3,2,"ng-container",8),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("label",t.uploadButtonLabel)("disabled",!t.hasFiles()||t.isFileLimitExceeded())("styleClass",t.uploadStyleClass),e.xp6(1),e.Q6J("ngIf",t.uploadIcon),e.xp6(1),e.Q6J("ngIf",!t.uploadIcon)}}function ve(i,a){if(1&i&&e._UZ(0,"span",25),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.cancelIcon)}}function xe(i,a){1&i&&e._UZ(0,"TimesIcon",21),2&i&&(e.Q6J("styleClass","p-button-icon p-button-icon-left"),e.uIk("aria-hidden",!0))}function be(i,a){}function Ie(i,a){1&i&&e.YNc(0,be,0,0,"ng-template")}function Ce(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,Ie,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.uIk("aria-hidden",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",t.cancelIconTemplate)}}function Te(i,a){if(1&i&&(e.ynx(0),e.YNc(1,xe,1,2,"TimesIcon",19),e.YNc(2,Ce,2,2,"span",20),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.cancelIconTemplate),e.xp6(1),e.Q6J("ngIf",t.cancelIconTemplate)}}function ye(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"p-button",23),e.NdJ("onClick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clear())}),e.YNc(1,ve,1,1,"span",24),e.YNc(2,Te,3,2,"ng-container",8),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("label",t.cancelButtonLabel)("disabled",!t.hasFiles()||t.uploading)("styleClass",t.cancelStyleClass),e.xp6(1),e.Q6J("ngIf",t.cancelIcon),e.xp6(1),e.Q6J("ngIf",!t.cancelIcon)}}function Fe(i,a){1&i&&e.GkF(0)}function we(i,a){if(1&i&&e._UZ(0,"p-progressBar",26),2&i){const t=e.oxw(2);e.Q6J("value",t.progress)("showValue",!1)}}function Ue(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"img",33),e.NdJ("error",function(s){e.CHM(t);const l=e.oxw(5);return e.KtG(l.imageError(s))}),e.qZA()}if(2&i){const t=e.oxw().$implicit,n=e.oxw(4);e.Q6J("src",t.objectURL,e.LSH)("width",n.previewWidth)}}function Me(i,a){1&i&&e._UZ(0,"TimesIcon")}function ke(i,a){}function Ze(i,a){1&i&&e.YNc(0,ke,0,0,"ng-template")}function Se(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",29)(1,"div"),e.YNc(2,Ue,1,2,"img",30),e.qZA(),e.TgZ(3,"div",31),e._uU(4),e.qZA(),e.TgZ(5,"div"),e._uU(6),e.qZA(),e.TgZ(7,"div")(8,"button",32),e.NdJ("click",function(s){const u=e.CHM(t).index,C=e.oxw(4);return e.KtG(C.remove(s,u))}),e.YNc(9,Me,1,0,"TimesIcon",8),e.YNc(10,Ze,1,0,null,11),e.qZA()()()}if(2&i){const t=a.$implicit,n=e.oxw(4);e.xp6(2),e.Q6J("ngIf",n.isImage(t)),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(n.formatSize(t.size)),e.xp6(2),e.Tol(n.removeStyleClass),e.Q6J("disabled",n.uploading),e.xp6(1),e.Q6J("ngIf",!n.cancelIconTemplate),e.xp6(1),e.Q6J("ngTemplateOutlet",n.cancelIconTemplate)}}function Je(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Se,11,8,"div",28),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.files)}}function Qe(i,a){}function Le(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Qe,0,0,"ng-template",34),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.files)("ngForTemplate",t.fileTemplate)}}function Ee(i,a){if(1&i&&(e.TgZ(0,"div",27),e.YNc(1,Je,2,1,"div",8),e.YNc(2,Le,2,2,"div",8),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.fileTemplate),e.xp6(1),e.Q6J("ngIf",t.fileTemplate)}}function Ne(i,a){1&i&&e.GkF(0)}const Ye=function(i,a){return{"p-focus":i,"p-disabled":a}},Oe=function(i){return{$implicit:i}};function Be(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",2)(1,"div",3)(2,"span",4),e.NdJ("focus",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onFocus())})("blur",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onBlur())})("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.choose())})("keydown.enter",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.choose())}),e.TgZ(3,"input",5,6),e.NdJ("change",function(s){e.CHM(t);const l=e.oxw();return e.KtG(l.onFileSelect(s))}),e.qZA(),e.YNc(5,ae,1,5,"span",7),e.YNc(6,re,3,2,"ng-container",8),e.TgZ(7,"span",9),e._uU(8),e.qZA()(),e.YNc(9,he,3,5,"p-button",10),e.YNc(10,ye,3,5,"p-button",10),e.YNc(11,Fe,1,0,"ng-container",11),e.qZA(),e.TgZ(12,"div",12,13),e.NdJ("dragenter",function(s){e.CHM(t);const l=e.oxw();return e.KtG(l.onDragEnter(s))})("dragleave",function(s){e.CHM(t);const l=e.oxw();return e.KtG(l.onDragLeave(s))})("drop",function(s){e.CHM(t);const l=e.oxw();return e.KtG(l.onDrop(s))}),e.YNc(14,we,1,2,"p-progressBar",14),e._UZ(15,"p-messages",15),e.YNc(16,Ee,3,2,"div",16),e.YNc(17,Ne,1,0,"ng-container",17),e.qZA()()}if(2&i){const t=e.oxw();e.Tol(t.styleClass),e.Q6J("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",t.style),e.uIk("data-pc-name","fileupload")("data-pc-section","root"),e.xp6(1),e.uIk("data-pc-section","buttonbar"),e.xp6(1),e.Tol(t.chooseStyleClass),e.Q6J("ngClass",e.WLB(30,Ye,t.focus,t.disabled||t.isChooseDisabled())),e.uIk("data-pc-section","choosebutton"),e.xp6(1),e.Q6J("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),e.uIk("title","")("data-pc-section","input"),e.xp6(2),e.Q6J("ngIf",t.chooseIcon),e.xp6(1),e.Q6J("ngIf",!t.chooseIcon),e.xp6(1),e.uIk("data-pc-section","choosebuttonlabel"),e.xp6(1),e.Oqu(t.chooseButtonLabel),e.xp6(1),e.Q6J("ngIf",!t.auto&&t.showUploadButton),e.xp6(1),e.Q6J("ngIf",!t.auto&&t.showCancelButton),e.xp6(1),e.Q6J("ngTemplateOutlet",t.toolbarTemplate),e.xp6(1),e.uIk("data-pc-section","content"),e.xp6(2),e.Q6J("ngIf",t.hasFiles()),e.xp6(1),e.Q6J("value",t.msgs)("enableService",!1),e.xp6(1),e.Q6J("ngIf",t.hasFiles()),e.xp6(1),e.Q6J("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",e.VKq(33,Oe,t.files))}}function De(i,a){if(1&i&&e._UZ(0,"span",25),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.uploadIcon)}}function Ae(i,a){1&i&&e._UZ(0,"UploadIcon",21),2&i&&e.Q6J("styleClass","p-button-icon p-button-icon-left")}function He(i,a){}function ze(i,a){1&i&&e.YNc(0,He,0,0,"ng-template")}function Pe(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,ze,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngTemplateOutlet",t.uploadIconTemplate)}}function qe(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Ae,1,1,"UploadIcon",19),e.YNc(2,Pe,2,1,"span",20),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.uploadIconTemplate),e.xp6(1),e.Q6J("ngIf",t.uploadIconTemplate)}}function Ge(i,a){if(1&i&&(e.ynx(0),e.YNc(1,De,1,1,"span",24),e.YNc(2,qe,3,2,"ng-container",8),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.uploadIcon),e.xp6(1),e.Q6J("ngIf",!t.uploadIcon)}}function Re(i,a){if(1&i&&e._UZ(0,"span",42),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.chooseIcon)}}function Ve(i,a){1&i&&e._UZ(0,"PlusIcon",21),2&i&&(e.Q6J("styleClass","p-button-icon p-button-icon-left pi"),e.uIk("aria-hidden",!0)("data-pc-section","uploadicon"))}function Ke(i,a){}function je(i,a){1&i&&e.YNc(0,Ke,0,0,"ng-template")}function $e(i,a){if(1&i&&(e.TgZ(0,"span",44),e.YNc(1,je,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.uIk("aria-hidden",!0)("data-pc-section","uploadicon"),e.xp6(1),e.Q6J("ngTemplateOutlet",t.chooseIconTemplate)}}function We(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Ve,1,3,"PlusIcon",19),e.YNc(2,$e,2,3,"span",43),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.chooseIconTemplate),e.xp6(1),e.Q6J("ngIf",t.chooseIconTemplate)}}function Xe(i,a){if(1&i&&(e.YNc(0,Re,1,1,"span",41),e.YNc(1,We,3,2,"ng-container",8)),2&i){const t=e.oxw(2);e.Q6J("ngIf",t.chooseIcon),e.xp6(1),e.Q6J("ngIf",!t.chooseIcon)}}function et(i,a){if(1&i&&(e.TgZ(0,"span",9),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.uIk("data-pc-section","label"),e.xp6(1),e.Oqu(t.basicButtonLabel)}}function tt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",45,46),e.NdJ("change",function(s){e.CHM(t);const l=e.oxw(2);return e.KtG(l.onFileSelect(s))})("focus",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.onFocus())})("blur",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.onBlur())}),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("accept",t.accept)("multiple",t.multiple)("disabled",t.disabled),e.uIk("data-pc-section","input")}}const it=function(i,a,t,n){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":i,"p-fileupload-choose-selected":a,"p-focus":t,"p-disabled":n}};function nt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",35),e._UZ(1,"p-messages",15),e.TgZ(2,"span",36),e.NdJ("mouseup",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onBasicUploaderClick())})("keydown",function(s){e.CHM(t);const l=e.oxw();return e.KtG(l.onBasicKeydown(s))}),e.YNc(3,Ge,3,2,"ng-container",37),e.YNc(4,Xe,2,2,"ng-template",null,38,e.W1O),e.YNc(6,et,2,2,"span",39),e.YNc(7,tt,2,4,"input",40),e.qZA()()}if(2&i){const t=e.MAs(5),n=e.oxw();e.uIk("data-pc-name","fileupload"),e.xp6(1),e.Q6J("value",n.msgs)("enableService",!1),e.xp6(1),e.Tol(n.styleClass),e.Q6J("ngClass",e.l5B(12,it,!n.basicButtonLabel,n.hasFiles(),n.focus,n.disabled))("ngStyle",n.style),e.uIk("data-pc-section","choosebutton"),e.xp6(1),e.Q6J("ngIf",n.hasFiles()&&!n.auto)("ngIfElse",t),e.xp6(3),e.Q6J("ngIf",n.basicButtonLabel),e.xp6(1),e.Q6J("ngIf",!n.hasFiles())}}let st=(()=>{class i{document;platformId;renderer;el;sanitizer;zone;http;cd;config;name;url;method="post";multiple;accept;disabled;auto;withCredentials;maxFileSize;invalidFileSizeMessageSummary="{0}: Invalid file size, ";invalidFileSizeMessageDetail="maximum upload size is {0}.";invalidFileTypeMessageSummary="{0}: Invalid file type, ";invalidFileTypeMessageDetail="allowed file types: {0}.";invalidFileLimitMessageDetail="limit is {0} at most.";invalidFileLimitMessageSummary="Maximum number of files exceeded, ";style;styleClass;previewWidth=50;chooseLabel;uploadLabel;cancelLabel;chooseIcon;uploadIcon;cancelIcon;showUploadButton=!0;showCancelButton=!0;mode="advanced";headers;customUpload;fileLimit;uploadStyleClass;cancelStyleClass;removeStyleClass;chooseStyleClass;onBeforeUpload=new e.vpe;onSend=new e.vpe;onUpload=new e.vpe;onError=new e.vpe;onClear=new e.vpe;onRemove=new e.vpe;onSelect=new e.vpe;onProgress=new e.vpe;uploadHandler=new e.vpe;onImageError=new e.vpe;templates;advancedFileInput;basicFileInput;content;set files(t){this._files=[];for(let n=0;n<t.length;n++){let s=t[n];this.validate(s)&&(this.isImage(s)&&(s.objectURL=this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(t[n]))),this._files.push(t[n]))}}get files(){return this._files}get basicButtonLabel(){return this.auto||!this.hasFiles()?this.chooseLabel:this.uploadLabel??this.files[0].name}_files=[];progress=0;dragHighlight;msgs;fileTemplate;contentTemplate;toolbarTemplate;chooseIconTemplate;uploadIconTemplate;cancelIconTemplate;uploadedFileCount=0;focus;uploading;duplicateIEEvent;translationSubscription;dragOverListener;constructor(t,n,s,l,u,C,ot,lt,ct){this.document=t,this.platformId=n,this.renderer=s,this.el=l,this.sanitizer=u,this.zone=C,this.http=ot,this.cd=lt,this.config=ct}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"file":default:this.fileTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"toolbar":this.toolbarTemplate=t.template;break;case"chooseicon":this.chooseIconTemplate=t.template;break;case"uploadicon":this.uploadIconTemplate=t.template;break;case"cancelicon":this.cancelIconTemplate=t.template}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){(0,r.NF)(this.platformId)&&"advanced"===this.mode&&this.zone.runOutsideAngular(()=>{this.content&&(this.dragOverListener=this.renderer.listen(this.content.nativeElement,"dragover",this.onDragOver.bind(this)))})}getTranslation(t){return this.config.getTranslation(t)}choose(){this.advancedFileInput?.nativeElement.click()}onFileSelect(t){if("drop"!==t.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let n=t.dataTransfer?t.dataTransfer.files:t.target.files;for(let s=0;s<n.length;s++){let l=n[s];this.isFileSelected(l)||this.validate(l)&&(this.isImage(l)&&(l.objectURL=this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(n[s]))),this.files.push(n[s]))}this.onSelect.emit({originalEvent:t,files:n,currentFiles:this.files}),this.fileLimit&&this.checkFileLimit(),this.hasFiles()&&this.auto&&("advanced"!==this.mode||!this.isFileLimitExceeded())&&this.upload(),"drop"!==t.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}isFileSelected(t){for(let n of this.files)if(n.name+n.type+n.size===t.name+t.type+t.size)return!0;return!1}isIE11(){if((0,r.NF)(this.platformId))return!!this.document.defaultView.MSInputMethodContext&&!!this.document.documentMode}validate(t){return this.msgs=this.msgs||[],this.accept&&!this.isFileTypeValid(t)?(this.msgs.push({severity:"error",summary:this.invalidFileTypeMessageSummary.replace("{0}",t.name),detail:this.invalidFileTypeMessageDetail.replace("{0}",this.accept)}),!1):!(this.maxFileSize&&t.size>this.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",t.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(t){let n=this.accept?.split(",").map(s=>s.trim());for(let s of n)if(this.isWildcard(s)?this.getTypeClass(t.type)===this.getTypeClass(s):t.type==s||this.getFileExtension(t).toLowerCase()===s.toLowerCase())return!0;return!1}getTypeClass(t){return t.substring(0,t.indexOf("/"))}isWildcard(t){return-1!==t.indexOf("*")}getFileExtension(t){return"."+t.name.split(".").pop()}isImage(t){return/^image\//.test(t.type)}onImageLoad(t){window.URL.revokeObjectURL(t.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let t=new FormData;this.onBeforeUpload.emit({formData:t});for(let n=0;n<this.files.length;n++)t.append(this.name,this.files[n],this.files[n].name);this.http.request(this.method,this.url,{body:t,headers:this.headers,reportProgress:!0,observe:"events",withCredentials:this.withCredentials}).subscribe(n=>{switch(n.type){case o.dt.Sent:this.onSend.emit({originalEvent:n,formData:t});break;case o.dt.Response:this.uploading=!1,this.progress=0,n.status>=200&&n.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:n,files:this.files})):this.onError.emit({files:this.files}),this.clear();break;case o.dt.UploadProgress:n.loaded&&(this.progress=Math.round(100*n.loaded/n.total)),this.onProgress.emit({originalEvent:n,progress:this.progress})}this.cd.markForCheck()},n=>{this.uploading=!1,this.onError.emit({files:this.files,error:n})})}}clear(){this.files=[],this.uploadedFileCount=0,this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(t,n){this.clearInputElement(),this.onRemove.emit({originalEvent:t,file:this.files[n]}),this.files.splice(n,1),this.checkFileLimit()}isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount}isChooseDisabled(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount}checkFileLimit(){this.msgs??=[],this.isFileLimitExceeded()&&this.msgs.push({severity:"error",summary:this.invalidFileLimitMessageSummary.replace("{0}",this.fileLimit.toString()),detail:this.invalidFileLimitMessageDetail.replace("{0}",this.fileLimit.toString())})}clearInputElement(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.advancedFileInput.nativeElement.value=""),this.basicFileInput&&this.basicFileInput.nativeElement&&(this.basicFileInput.nativeElement.value="")}clearIEInput(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.duplicateIEEvent=!0,this.advancedFileInput.nativeElement.value="")}hasFiles(){return this.files&&this.files.length>0}onDragEnter(t){this.disabled||(t.stopPropagation(),t.preventDefault())}onDragOver(t){this.disabled||(x.p.addClass(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,t.stopPropagation(),t.preventDefault())}onDragLeave(t){this.disabled||x.p.removeClass(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(t){if(!this.disabled){x.p.removeClass(this.content?.nativeElement,"p-fileupload-highlight"),t.stopPropagation(),t.preventDefault();let n=t.dataTransfer?t.dataTransfer.files:t.target.files;(this.multiple||n&&1===n.length)&&this.onFileSelect(t)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(t){const l=this.getTranslation(g.ws.FILE_SIZE_TYPES);if(0===t)return`0 ${l[0]}`;const u=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,u)).toFixed(3)} ${l[u]}`}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput?.nativeElement.click()}onBasicKeydown(t){switch(t.code){case"Space":case"Enter":this.onBasicUploaderClick(),t.preventDefault()}}imageError(t){this.onImageError.emit(t)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(g.ws.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(g.ws.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(g.ws.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.dragOverListener&&(this.dragOverListener(),this.dragOverListener=null),this.translationSubscription&&this.translationSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||i)(e.Y36(r.K0),e.Y36(e.Lbi),e.Y36(e.Qsj),e.Y36(e.SBq),e.Y36(te.H7),e.Y36(e.R0b),e.Y36(o.eN),e.Y36(e.sBO),e.Y36(g.b4))};static \u0275cmp=e.Xpm({type:i,selectors:[["p-fileUpload"]],contentQueries:function(n,s,l){if(1&n&&e.Suo(l,g.jx,4),2&n){let u;e.iGM(u=e.CRH())&&(s.templates=u)}},viewQuery:function(n,s){if(1&n&&(e.Gf(ie,5),e.Gf(ne,5),e.Gf(se,5)),2&n){let l;e.iGM(l=e.CRH())&&(s.advancedFileInput=l.first),e.iGM(l=e.CRH())&&(s.basicFileInput=l.first),e.iGM(l=e.CRH())&&(s.content=l.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:"multiple",accept:"accept",disabled:"disabled",auto:"auto",withCredentials:"withCredentials",maxFileSize:"maxFileSize",invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:"previewWidth",chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:"showUploadButton",showCancelButton:"showCancelButton",mode:"mode",headers:"headers",customUpload:"customUpload",fileLimit:"fileLimit",uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError"},decls:2,vars:2,consts:[[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],[1,"p-fileupload-buttonbar"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"ngClass","focus","blur","click","keydown.enter"],["type","file",3,"multiple","accept","disabled","change"],["advancedfileinput",""],[3,"ngClass","class",4,"ngIf"],[4,"ngIf"],[1,"p-button-label"],["type","button",3,"label","disabled","styleClass","onClick",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],["content",""],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[3,"styleClass",4,"ngIf"],["class","p-button-icon p-button-icon-left",4,"ngIf"],[3,"styleClass"],[1,"p-button-icon","p-button-icon-left"],["type","button",3,"label","disabled","styleClass","onClick"],["class","p-button-icon p-button-icon-left",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left",3,"ngClass"],[3,"value","showValue"],[1,"p-fileupload-files"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[3,"src","width","error",4,"ngIf"],[1,"p-fileupload-filename"],["type","button","pButton","",1,"p-button-icon-only",3,"disabled","click"],[3,"src","width","error"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"ngClass","ngStyle","mouseup","keydown"],[4,"ngIf","ngIfElse"],["chooseSection",""],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["class","p-button-icon p-button-icon-left pi",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-icon p-button-icon-left pi",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi"],["type","file",3,"accept","multiple","disabled","change","focus","blur"],["basicfileinput",""]],template:function(n,s){1&n&&(e.YNc(0,Be,18,35,"div",0),e.YNc(1,nt,8,17,"div",1)),2&n&&(e.Q6J("ngIf","advanced"===s.mode),e.xp6(1),e.Q6J("ngIf","basic"===s.mode))},dependencies:function(){return[r.mk,r.sg,r.O5,r.tP,r.PC,h.Hq,h.zx,y.k,ee,I.H,b.p,d,v.q]},styles:["@layer primeng{.p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}}\n"],encapsulation:2,changeDetection:0})}return i})(),at=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[r.ez,o.JF,g.m8,h.hJ,y.q,M,I.T,b.p,d,v.q,g.m8,h.hJ,y.q,M]})}return i})()},66651:(k,T,c)=>{c.d(T,{k:()=>b,q:()=>v});var r=c(96814),o=c(94946);function e(p,m){if(1&p&&(o.TgZ(0,"div",5),o._uU(1),o.qZA()),2&p){const d=o.oxw(2);o.Udp("display",null!=d.value&&0!==d.value?"flex":"none"),o.uIk("data-pc-section","label"),o.xp6(1),o.AsE("",d.value,"",d.unit,"")}}function g(p,m){if(1&p&&(o.TgZ(0,"div",3),o.YNc(1,e,2,5,"div",4),o.qZA()),2&p){const d=o.oxw();o.Udp("width",d.value+"%")("background",d.color),o.uIk("data-pc-section","value"),o.xp6(1),o.Q6J("ngIf",d.showValue)}}function h(p,m){if(1&p&&(o.TgZ(0,"div",6),o._UZ(1,"div",7),o.qZA()),2&p){const d=o.oxw();o.uIk("data-pc-section","container"),o.xp6(1),o.Udp("background",d.color),o.uIk("data-pc-section","value")}}const x=function(p,m){return{"p-progressbar p-component":!0,"p-progressbar-determinate":p,"p-progressbar-indeterminate":m}};let b=(()=>{class p{value;showValue=!0;styleClass;style;unit="%";mode="determinate";color;static \u0275fac=function(_){return new(_||p)};static \u0275cmp=o.Xpm({type:p,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",styleClass:"styleClass",style:"style",unit:"unit",mode:"mode",color:"color"},decls:3,vars:14,consts:[["role","progressbar",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width","background",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(_,f){1&_&&(o.TgZ(0,"div",0),o.YNc(1,g,2,6,"div",1),o.YNc(2,h,2,4,"div",2),o.qZA()),2&_&&(o.Tol(f.styleClass),o.Q6J("ngStyle",f.style)("ngClass",o.WLB(11,x,"determinate"===f.mode,"indeterminate"===f.mode)),o.uIk("aria-valuemin",0)("aria-valuenow",f.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root"),o.xp6(1),o.Q6J("ngIf","determinate"===f.mode),o.xp6(1),o.Q6J("ngIf","indeterminate"===f.mode))},dependencies:[r.mk,r.O5,r.PC],styles:['@layer primeng{.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0})}return p})(),v=(()=>{class p{static \u0275fac=function(_){return new(_||p)};static \u0275mod=o.oAB({type:p});static \u0275inj=o.cJS({imports:[r.ez]})}return p})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5334],{35334:(_,r,s)=>{s.r(r),s.d(r,{AmWelcomeM:()=>T});var g=s(77664),c=s(17017),m=s(63726),d=s(60921),e=s(94946),p=s(95852),u=s(84795),Z=s(77240),v=s(96814);function l(t,o){1&t&&(e.TgZ(0,"a",89)(1,"div",11),e._UZ(2,"img",90),e.TgZ(3,"h1"),e._UZ(4,"i",91),e._uU(5," Licenses"),e.qZA()()())}function h(t,o){1&t&&(e.TgZ(0,"a",92)(1,"div",11),e._UZ(2,"img",93),e.TgZ(3,"h1"),e._UZ(4,"i",91),e._uU(5," UI Maker"),e.qZA()()())}function f(t,o){1&t&&(e.TgZ(0,"a",94)(1,"div",11),e._UZ(2,"img",95),e.TgZ(3,"h1"),e._UZ(4,"i",91),e._uU(5," Index Maker"),e.qZA()()())}function x(t,o){1&t&&(e.TgZ(0,"a",96)(1,"div",11),e._UZ(2,"img",97),e.TgZ(3,"h1"),e._uU(4,"Dev Account"),e.qZA()()())}const U=[{path:"",component:(()=>{class t{authCS;authS;generalCS;EUserType=d.d;constructor(n,a,i){this.authCS=n,this.authS=a,this.generalCS=i}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||t)(e.Y36(p.D),e.Y36(u.e),e.Y36(Z.b))};static \u0275cmp=e.Xpm({type:t,selectors:[["app-am-welcome"]],decls:215,vars:4,consts:[[1,"p-5",2,"height","calc(100vh - 44px)","overflow","auto"],[1,"row","h4","bold"],[1,"col-6"],[1,"fas","fa-tachometer-alt","fa-fw","text-success"],["src","/assets/images/logo/store_logo.svg",2,"height","25px"],[1,"row","mt-3","h4","bold"],[1,"icon-row","mt-lg-n2","ml-0"],["href","javascript:","routerLink","/dashboard/summary-dashboard",2,"text-decoration","none"],[1,"icon-box","ml-0"],["src","/assets/images/icons/nodes.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/redis-dashboard",2,"text-decoration","none"],[1,"icon-box"],["src","/assets/images/icons/redis.svg",1,"mt-2"],["href","javascript:","routerLink","/diagram/main",2,"text-decoration","none"],["src","/assets/images/icons/diagram.svg",1,"mt-3"],["href","javascript:","routerLink","/dashboard/ext-licenses","style","text-decoration: none",4,"ngIf"],[1,"icon-row","mt-lg-n2"],["href","javascript:","routerLink","/utility/app-store/main",2,"text-decoration","none"],["src","/assets/images/logo/logo_store.svg",1,"mt-4","p-1"],["href","https://docs.apimaker.dev/","target","_blank",2,"text-decoration","none"],["src","/assets/images/logo/logo_docs.svg",1,"mt-4","p-1"],["href","https://www.youtube.com/playlist?list=PLfJ8NnUMaDUYNNZUX5M_KcIzn9qGCNj43","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/film-movies-icon.svg",1,"mt-2","p-1"],[1,"row","mt-5","bold"],[1,"col-12"],[1,"bold","m-0"],[1,"fas","fa-code","fa-fw","text-info"],[1,"row","h4","bold","mt-3"],["href","javascript:","routerLink","/api-info/db-cell/layout",2,"text-decoration","none"],["src","/assets/images/icons/database.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/custom-api/functions-tree",2,"text-decoration","none"],["src","/assets/images/icons/custom.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/system-api/layout",2,"text-decoration","none"],["src","/assets/images/icons/systems.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/third-party-api/tp-layout",2,"text-decoration","none"],["src","/assets/images/icons/third-party.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/am-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/event.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/schedulers/scheduler-layout",2,"text-decoration","none"],["src","/assets/images/icons/schedulers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/web-socket-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/web.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/process-initializers/main",2,"text-decoration","none"],["src","/assets/images/icons/process_initializers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/api-testing/testing",2,"text-decoration","none"],["src","/assets/images/icons/testing.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/db-masters/main","style","text-decoration: none",4,"ngIf"],["href","javascript:","routerLink","/api-info/index-maker/scanning-periods","style","text-decoration: none",4,"ngIf"],[1,"fas","fa-lock","fa-fw","text-warning"],["href","javascript:","routerLink","/permissions/group/group-layout",2,"text-decoration","none"],["src","/assets/images/icons/api-group.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/api-user/layout",2,"text-decoration","none"],["src","/assets/images/icons/api-user.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/vulnerabilities/layout",2,"text-decoration","none"],["src","/assets/images/icons/vulnerability.svg",1,"mt-2"],[1,"fas","fa-tools","fa-fw","text-yellow"],["href","javascript:","routerLink","/accounts/secret-management",2,"text-decoration","none"],["src","/assets/images/icons/secret.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts","style","text-decoration: none",4,"ngIf"],["href","javascript:","routerLink","/utility/internationalization/main",2,"text-decoration","none"],["src","/assets/images/icons/i18n.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-profile/main",2,"text-decoration","none"],["src","/assets/images/icons/log-profile.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-table/main",2,"text-decoration","none"],["src","/assets/images/icons/log.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/native-process-logs",2,"text-decoration","none"],["src","/assets/images/icons/native-process-logs.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/sandbox-settings/main",2,"text-decoration","none"],["src","/assets/images/icons/sandbox.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/notes/main",2,"text-decoration","none"],["src","/assets/images/icons/notes.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/utility-classes/utility-classes-internal/main",2,"text-decoration","none"],["src","/assets/images/icons/utility.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/system-migration/main",2,"text-decoration","none"],["src","/assets/images/icons/db-m.svg",1,"mt-2","p-1"],["href","javascript:","routerLink","/utility/code-finder/finder",2,"text-decoration","none"],["src","/assets/images/icons/finder.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/code-comparator-model",2,"text-decoration","none"],["src","/assets/images/icons/comparator.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/auto-increment/main",2,"text-decoration","none"],["src","/assets/images/icons/increment.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/ts-gen-interfaces/main",2,"text-decoration","none"],["src","/assets/images/icons/typescript.svg",1,"mt-2"],["href","/assets/swagger/index.html","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/swagger-logo.svg",1,"mt-2",2,"height","55px","margin-top","3px !important"],["href","javascript:","routerLink","/utility/encrypt-strings",2,"text-decoration","none"],["src","/assets/images/icons/rsa_encryption.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/deploy-api-maker",2,"text-decoration","none"],["src","/assets/images/icons/api-maker-deployment.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/ext-licenses",2,"text-decoration","none"],["src","/assets/images/icons/license.svg",1,"mt-3"],[1,"fas","fa-plus"],["href","javascript:","routerLink","/api-info/db-masters/main",2,"text-decoration","none"],["src","/assets/images/icons/ui-maker.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/index-maker/scanning-periods",2,"text-decoration","none"],["src","/assets/images/icons/scanning-period.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts",2,"text-decoration","none"],["src","/assets/images/icons/dev.svg",1,"mt-2"]],template:function(a,i){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),e._UZ(4,"i",3),e.TgZ(5,"span"),e._uU(6," Dashboard"),e.qZA()()(),e.TgZ(7,"div",2)(8,"span"),e._UZ(9,"img",4),e.TgZ(10,"span"),e._uU(11," API Maker Family"),e.qZA()()()(),e.TgZ(12,"div",5)(13,"div",2)(14,"div",6)(15,"a",7)(16,"div",8),e._UZ(17,"img",9),e.TgZ(18,"h1"),e._uU(19,"Nodes Summary"),e.qZA()()(),e.TgZ(20,"a",10)(21,"div",11),e._UZ(22,"img",12),e.TgZ(23,"h1"),e._uU(24,"Redis Dashboard"),e.qZA()()(),e.TgZ(25,"a",13)(26,"div",11),e._UZ(27,"img",14),e.TgZ(28,"h1"),e._uU(29,"ER Diagram"),e.qZA()()(),e.YNc(30,l,6,0,"a",15),e.qZA()(),e.TgZ(31,"div",2)(32,"div",16)(33,"a",17)(34,"div",8),e._UZ(35,"img",18),e.qZA()(),e.TgZ(36,"a",19)(37,"div",11),e._UZ(38,"img",20),e.qZA()(),e.TgZ(39,"a",21)(40,"div",11),e._UZ(41,"img",22),e.TgZ(42,"h1"),e._uU(43,"Learn API Maker"),e.qZA()()()()()(),e.TgZ(44,"div",23)(45,"div",24)(46,"h4",25),e._UZ(47,"i",26),e._uU(48," API Info "),e.qZA()()(),e.TgZ(49,"div",27)(50,"div",24)(51,"div",16)(52,"a",28)(53,"div",11),e._UZ(54,"img",29),e.TgZ(55,"h1"),e._uU(56,"Instance API (DB API)"),e.qZA()()(),e.TgZ(57,"a",30)(58,"div",11),e._UZ(59,"img",31),e.TgZ(60,"h1"),e._uU(61,"Custom API"),e.qZA()()(),e.TgZ(62,"a",32)(63,"div",11),e._UZ(64,"img",33),e.TgZ(65,"h1"),e._uU(66,"System API"),e.qZA()()(),e.TgZ(67,"a",34)(68,"div",11),e._UZ(69,"img",35),e.TgZ(70,"h1"),e._uU(71,"Third Party API"),e.qZA()()(),e.TgZ(72,"a",36)(73,"div",11),e._UZ(74,"img",37),e.TgZ(75,"h1"),e._uU(76,"Events"),e.qZA()()(),e.TgZ(77,"a",38)(78,"div",11),e._UZ(79,"img",39),e.TgZ(80,"h1"),e._uU(81,"Schedulers"),e.qZA()()(),e.TgZ(82,"a",40)(83,"div",11),e._UZ(84,"img",41),e.TgZ(85,"h1"),e._uU(86,"WebSocket Events"),e.qZA()()(),e.TgZ(87,"a",42)(88,"div",11),e._UZ(89,"img",43),e.TgZ(90,"h1"),e._uU(91," Process Initializers"),e.qZA()()(),e.TgZ(92,"a",44)(93,"div",11),e._UZ(94,"img",45),e.TgZ(95,"h1"),e._uU(96,"API Testing"),e.qZA()()(),e.YNc(97,h,6,0,"a",46),e.YNc(98,f,6,0,"a",47),e.qZA()()(),e.TgZ(99,"div",23)(100,"div",24)(101,"h4",25),e._UZ(102,"i",48),e._uU(103," API Security "),e.qZA()()(),e.TgZ(104,"div",27)(105,"div",24)(106,"div",16)(107,"a",49)(108,"div",11),e._UZ(109,"img",50),e.TgZ(110,"h1"),e._uU(111,"API Group Permissions"),e.qZA()()(),e.TgZ(112,"a",51)(113,"div",11),e._UZ(114,"img",52),e.TgZ(115,"h1"),e._uU(116,"API User Permissions"),e.qZA()()(),e.TgZ(117,"a",53)(118,"div",11),e._UZ(119,"img",54),e.TgZ(120,"h1"),e._uU(121,"Vulnerabilities"),e.qZA()()()()()(),e.TgZ(122,"div",23)(123,"div",24)(124,"h4",25),e._UZ(125,"i",55),e._uU(126," Utility "),e.qZA()()(),e.TgZ(127,"div",27)(128,"div",24)(129,"div",16)(130,"a",56)(131,"div",11),e._UZ(132,"img",57),e.TgZ(133,"h1"),e._uU(134,"Secret Management"),e.qZA()()(),e.YNc(135,x,5,0,"a",58),e.TgZ(136,"a",59)(137,"div",11),e._UZ(138,"img",60),e.TgZ(139,"h1"),e._uU(140,"i18N Management"),e.qZA()()(),e.TgZ(141,"a",61)(142,"div",11),e._UZ(143,"img",62),e.TgZ(144,"h1"),e._uU(145,"Log Profile"),e.qZA()()(),e.TgZ(146,"a",63)(147,"div",11),e._UZ(148,"img",64),e.TgZ(149,"h1"),e._uU(150,"Log Table"),e.qZA()()(),e.TgZ(151,"a",65)(152,"div",11),e._UZ(153,"img",66),e.TgZ(154,"h1"),e._uU(155,"Native Process Logs"),e.qZA()()(),e.TgZ(156,"a",67)(157,"div",11),e._UZ(158,"img",68),e.TgZ(159,"h1"),e._uU(160,"Sandbox Settings"),e.qZA()()(),e.TgZ(161,"a",69)(162,"div",11),e._UZ(163,"img",70),e.TgZ(164,"h1"),e._uU(165,"Notes"),e.qZA()()(),e.TgZ(166,"a",71)(167,"div",11),e._UZ(168,"img",72),e.TgZ(169,"h1"),e._uU(170,"Utility Classes"),e.qZA()()(),e.TgZ(171,"a",73)(172,"div",11),e._UZ(173,"img",74),e.TgZ(174,"h1"),e._uU(175,"Database Migration"),e.qZA()()(),e.TgZ(176,"a",75)(177,"div",11),e._UZ(178,"img",76),e.TgZ(179,"h1"),e._uU(180,"Code Finder"),e.qZA()()(),e.TgZ(181,"a",77)(182,"div",11),e._UZ(183,"img",78),e.TgZ(184,"h1"),e._uU(185,"Code Comparator"),e.qZA()()(),e.TgZ(186,"a",79)(187,"div",11),e._UZ(188,"img",80),e.TgZ(189,"h1"),e._uU(190," Auto Increments"),e.qZA()()(),e.TgZ(191,"a",81)(192,"div",11),e._UZ(193,"img",82),e.TgZ(194,"h1"),e._uU(195," Generated Interfaces"),e.qZA()()(),e.TgZ(196,"a",83)(197,"div",11),e._UZ(198,"img",84),e.TgZ(199,"h1"),e._uU(200," Swagger "),e._UZ(201,"br"),e._uU(202,"Docs"),e.qZA()()(),e.TgZ(203,"a",85)(204,"div",11),e._UZ(205,"img",86),e.TgZ(206,"h1"),e._uU(207," Encrypt Strings"),e.qZA()()(),e.TgZ(208,"a",87)(209,"div",11),e._UZ(210,"img",88),e.TgZ(211,"h1"),e._uU(212," Deploy "),e._UZ(213,"br"),e._uU(214,"API Maker"),e.qZA()()()()()()()),2&a&&(e.xp6(30),e.Q6J("ngIf",(null==i.authS.backendSettings?null:i.authS.backendSettings.extensions)&&(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN),e.xp6(67),e.Q6J("ngIf",null==i.authS.backendSettings?null:i.authS.backendSettings.extensions),e.xp6(1),e.Q6J("ngIf",null==i.authS.backendSettings?null:i.authS.backendSettings.extensions),e.xp6(37),e.Q6J("ngIf",(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN))},dependencies:[g.rH,v.O5],styles:[".icon-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}h1[_ngcontent-%COMP%]{font-size:15px;margin-top:10px}img[_ngcontent-%COMP%]{height:50px}.icon-box[_ngcontent-%COMP%]{font-size:15px;text-align:center;width:120px;min-width:120px;height:120px;background:transparent;border:1px solid #515151;margin:0 20px 20px 0;padding:5px;transition:all .1s;border-radius:10px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px}.icon-box[_ngcontent-%COMP%]:hover{background:#292929;box-shadow:#b8b8b840 0 54px 55px,#a5a5a51f 0 -12px 30px,#ffffff1f 0 4px 6px,#0b88982b 0 12px 13px,#ab151517 0 -3px 5px;--darkreader-inline-boxshadow: rgba(0, 0, 0, .25) 0px 54px 55px, rgba(0, 0, 0, .12) 0px -12px 30px, rgba(0, 0, 0, .12) 0px 4px 6px, rgba(0, 0, 0, .17) 0px 12px 13px, rgba(0, 0, 0, .09) 0px -3px 5px}"]})}return t})(),canActivate:[m.P]}];let T=(()=>{class t{static \u0275fac=function(a){return new(a||t)};static \u0275mod=e.oAB({type:t});static \u0275inj=e.cJS({imports:[g.Bz.forChild(U),c.u]})}return t})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6650],{86650:(F,p,t)=>{t.r(p),t.d(p,{DeployApiMakerM:()=>R});var f=t(77664),d=t(443),u=t(17017),h=t(63726),l=t(15861),c=t(20553),e=t(94946),v=t(53429),y=t(99961),A=t(77240),S=t(81344),k=t(84795),m=t(60095),M=t(96814),I=t(32660),U=t(97680),T=t(53965),P=t(66651);function C(a,V){1&a&&e._UZ(0,"p-progressSpinner",18)}function Z(a,V){if(1&a&&(e.TgZ(0,"div",19)(1,"span",20)(2,"span",21),e._uU(3,"Installing..."),e.qZA(),e._UZ(4,"p-progressBar",22),e.qZA()()),2&a){const n=e.oxw();e.xp6(4),e.Q6J("value",n.progressValue)}}const D=function(){return{width:"200px"}},E=[{path:"",component:(()=>{class a{instanceS;ns;generalS;feStoreCS;authS;loading={grid:!1};uploadedFiles=[];tarFile;uploadTarURL;version="";versions=[];selectedVersion;STORE_BE_HOST_PORT=c.N.STORE_BE_HOST_PORT;progressValue=0;intervalRef;constructor(n,o,r,s,i){this.instanceS=n,this.ns=o,this.generalS=r,this.feStoreCS=s,this.authS=i}ngOnInit(){this.version=c.N.VERSION,this.uploadTarURL=this.instanceS.deployAPIMakerURLString(),this.loadAPIMakerVersions().then(),this.generalS.setNewTitle("API Maker - Deploy"),this.startIncrementInterval()}startIncrementInterval(){this.intervalRef=setInterval(()=>{this.progressValue++},2500)}onUploadSuccess(){var n=this;return(0,l.Z)(function*(){n.ns.showSuccess("Your API Maker bundle uploaded successfully. System will restart"),yield n.instanceS.restartAPICallAndUILoadingAndReloadPage(),n.loading.grid=!1})()}onBeforeUpload(){this.loading.grid=!0,this.progressValue=0}onUploadError(){this.loading.grid=!1,this.ns.showError("File upload failed!")}tarFileSelected(n){var o=this;return(0,l.Z)(function*(){o.tarFile=n.currentFiles[0],o.ns.showInfo("Click on upload button to start deployment.")})()}loadAPIMakerVersions(){var n=this;return(0,l.Z)(function*(){let o="@sava-info-systems/api-maker";n.authS.backendSettings?.extensions&&(o="@sava-info-systems/api-maker-with-extensions");try{const r=yield n.feStoreCS.getNpmPackageVersions(n.STORE_BE_HOST_PORT,o);r.success?n.versions=r.data.map(s=>({name:s})).reverse():n.ns.showError(r.message)}catch(r){n.ns.showErrorFromResponse(r.error||r,"Unable to get list of API Maker versions.")}})()}deployAPIMakerVersionFromNPM(){var n=this;return(0,l.Z)(function*(){if(!n.selectedVersion)return void n.ns.showError("Please selection version to deploy");const o=n.selectedVersion.name;n.loading.grid=!0,n.progressValue=0;let r=`https://registry.npmjs.org/@sava-info-systems/api-maker/-/api-maker-${o}.tgz`;n.authS.backendSettings?.extensions&&(r=`https://registry.npmjs.org/@sava-info-systems/api-maker-with-extensions/-/api-maker-with-extensions-${o}.tgz`);try{const s=yield n.instanceS.deployAPIMakerAPICall({tarPath:r});let i;if(s.success){const O=s.data;for(const g of O)if(g.error){i=g.error.message;break}i?n.ns.showError(i):(n.ns.showSuccess("Your API Maker bundle uploaded successfully. System will restart"),yield n.instanceS.restartAPICallAndUILoadingAndReloadPage())}}catch(s){n.ns.showErrorFromResponse(s.error||s,"Unable to install API Maker version "+o)}n.loading.grid=!1})()}ngOnDestroy(){clearInterval(this.intervalRef)}static \u0275fac=function(o){return new(o||a)(e.Y36(v.E),e.Y36(y.W),e.Y36(A.b),e.Y36(S.e),e.Y36(k.e))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-deploy-api-maker"]],decls:23,vars:11,consts:[["id","about",1,"mt-3"],[1,"container"],[1,"row"],[1,"col-lg-8","mx-auto"],[1,"text-center","mb-3","mt-3"],["src","/assets/images/icons/api-maker-deployment.svg","alt","Deploy API Maker icon",1,"fa-fw","mr-1"],[1,"text-muted","text-center"],[1,"mt-3"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"row","m-0",2,"position","relative","padding","60px 0"],[1,"col-6","p-0","text-center"],["name","files","chooseIcon","pi pi-upload","accept",".tgz,.gz,.tar.gz","maxFileSize","100000000","chooseLabel","Select API Maker .tgz file",1,"d-inline-block",3,"id","url","multiple","onBeforeUpload","onUpload","onError","onSelect"],[2,"margin-top","28px"],["appendTo","body","optionLabel","name","filterBy","name","placeholder","Select a version",3,"options","ngModel","ngModelChange"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-upload","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","0","animationDuration",".5s",4,"ngIf"],["class","text-center mt-5",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","0","animationDuration",".5s"],[1,"text-center","mt-5"],[2,"display","inline-block","width","70%"],[1,"d-inline-block","mb-1"],["color","#057d05",3,"value"]],template:function(o,r){1&o&&(e.TgZ(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),e._UZ(5,"img",5),e._uU(6," Deploy API Maker"),e.qZA(),e.TgZ(7,"div",6)(8,"span"),e._uU(9),e.qZA()()()()()(),e.TgZ(10,"section",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"p-fileUpload",11),e.NdJ("onBeforeUpload",function(){return r.onBeforeUpload()})("onUpload",function(){return r.onUploadSuccess()})("onError",function(){return r.onUploadError()})("onSelect",function(i){return r.tarFileSelected(i)}),e.qZA()(),e.TgZ(15,"div",10)(16,"div",12)(17,"p-dropdown",13),e.NdJ("ngModelChange",function(i){return r.selectedVersion=i}),e.qZA(),e.TgZ(18,"button",14),e.NdJ("click",function(){return r.deployAPIMakerVersionFromNPM()}),e._UZ(19,"i",15),e._uU(20," Deploy From NPM "),e.qZA()()(),e.YNc(21,C,1,0,"p-progressSpinner",16),e.qZA(),e.YNc(22,Z,5,1,"div",17),e.qZA()()),2&o&&(e.xp6(9),e.hij("Current Version : ",r.version,""),e.xp6(5),e.Q6J("id","id_api_maker_deploy_file_upload")("url",r.uploadTarURL)("multiple",!1),e.xp6(3),e.Akn(e.DdM(10,D)),e.Q6J("options",r.versions)("ngModel",r.selectedVersion),e.xp6(4),e.Q6J("ngIf",r.loading.grid),e.xp6(1),e.Q6J("ngIf",r.loading.grid))},dependencies:[m.JJ,m.On,M.O5,I.y,U.G,T.Lt,d.p,P.k]})}return a})(),canActivate:[h.P]}];let R=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[f.Bz.forChild(E),u.u,d.O]})}return a})()}}]);
@@ -0,0 +1,6 @@
1
+ <svg width="800" height="800" viewBox="0 0 800 800" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M32.6885 200.12C16.1203 200.121 2.68945 213.552 2.68945 230.12V568.663C2.68945 585.232 16.1209 598.663 32.6895 598.663H545.342C557.033 598.663 567.659 591.872 572.569 581.262L583.792 557.006C594.509 533.845 627.412 533.792 638.204 556.917L649.952 582.089C654.881 592.651 665.481 599.402 677.137 599.402H768.576C785.144 599.402 798.576 585.97 798.576 569.402V230.099C798.576 213.53 785.144 200.098 768.575 200.099L32.6885 200.12Z" fill="#8F3B3F"/>
3
+ <path d="M711.957 498.363C719.162 498.348 723.987 490.95 721.096 484.351L630.674 277.931C630.673 277.927 630.674 277.924 630.678 277.922L630.679 277.922C630.685 277.919 630.684 277.91 630.677 277.91H630.677C630.674 277.91 630.671 277.908 630.671 277.905C630.671 277.9 630.665 277.898 630.662 277.903L630.659 277.907C630.658 277.909 630.656 277.91 630.654 277.91H598.481C594.479 277.91 590.862 280.297 589.287 283.976L503.475 484.482C500.652 491.08 505.492 498.417 512.669 498.417H532.424C536.464 498.417 540.108 495.985 541.658 492.254L601.9 347.261C605.286 339.11 616.801 339.023 620.31 347.122L683.246 492.379C684.834 496.043 688.449 498.412 692.442 498.403L711.957 498.363Z" fill="white"/>
4
+ <path d="M228.547 414.149C225.52 408.798 228.041 402.061 233.424 399.091C256.485 386.368 267.54 364.422 267.233 342.115C266.693 303.407 236.331 276.387 193.387 276.387H110.525C105.003 276.387 100.525 280.864 100.525 286.387V488.058C100.525 493.581 105.003 498.058 110.525 498.058H124.343C129.866 498.058 134.343 493.581 134.343 488.058V318.756C134.343 313.233 138.82 308.756 144.343 308.756H191.46C210.604 308.756 231.162 318.716 231.498 342.583C231.787 363.842 215.919 377.12 189.032 378.266L188.506 378.29L185.042 378.319C177.411 378.385 172.662 386.629 176.434 393.262L233.354 493.349C235.135 496.481 238.464 498.413 242.068 498.405L259.076 498.369C266.727 498.352 271.532 490.111 267.764 483.453C258.101 466.378 241.871 437.698 228.547 414.149Z" fill="white"/>
5
+ <path d="M313.076 333.625C313.076 377.767 356.882 390.222 390.941 399.822C426.42 409.853 438.78 421.161 438.78 438.302C438.78 466.894 409.781 471.358 391.845 471.358C370.851 471.358 352.991 466.361 335.863 457.284C330.914 454.661 324.678 456.167 321.832 460.991L315.036 472.506C312.267 477.197 313.749 483.276 318.547 485.855C341.037 497.947 364.584 503.628 391.845 503.628C443.149 503.628 477.232 477.048 477.232 435.907C477.232 389.961 435.769 377.247 400.91 367.391C365.402 357.355 351.518 348.873 351.518 331.722C351.518 305.753 383.305 303.23 394.69 303.23C408.977 303.23 426.354 307.047 439.644 312.125C444.827 314.105 450.889 312.159 453.402 307.212L458.62 296.937C461.109 292.039 459.182 286.027 454.084 283.978C436.462 276.898 413.464 272.395 393.738 272.395C344.134 272.395 313.076 294.979 313.076 333.625Z" fill="white"/>
6
+ </svg>