@sava-info-systems/api-maker-with-extensions 2.1.2 → 2.2.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.
Files changed (70) hide show
  1. package/dist/{1025.95948d3d2668bb14.js → 1025.a0db9347453600d0.js} +1 -1
  2. package/dist/{1097.ea0e6db47339f73f.js → 1097.d0d6fd13031aa1f0.js} +1 -1
  3. package/dist/{1928.5c81326985ca5f64.js → 1928.2b376f7cf66ed038.js} +1 -1
  4. package/dist/{2714.9880836f6b8b78a7.js → 2714.0d6939336a02dd0a.js} +1 -1
  5. package/dist/2735.86437a8639a0c1bb.js +1 -0
  6. package/dist/292.c7c794ff29abbe37.js +1 -0
  7. package/dist/{4110.c8b37cab34b21d0d.js → 4110.d108e786ecbdfd1b.js} +1 -1
  8. package/dist/{4186.3bd4de588fe7617d.js → 4186.ac3e8af0efeeac14.js} +1 -1
  9. package/dist/{4211.188f84c688ab656f.js → 4211.1bfe72ce0b7b2f76.js} +1 -1
  10. package/dist/4575.6ad36e53bd72fb6f.js +1 -0
  11. package/dist/485.b546656b466cb8a4.js +1 -0
  12. package/dist/{6236.5b62431db131ce4d.js → 6236.6c0fc469f0c96549.js} +1 -1
  13. package/dist/6393.173ecdfc3b022973.js +1 -0
  14. package/dist/{7368.102769b19d40d3e0.js → 7368.9ebf62d518f8ad7a.js} +1 -1
  15. package/dist/7470.b1ce7eedb9cedb2d.js +1 -0
  16. package/dist/{7975.6f386123f5c64f78.js → 7975.578a00ebd1160a1e.js} +1 -1
  17. package/dist/{7987.d15aacc264588b12.js → 7987.5958ad5b81873058.js} +1 -1
  18. package/dist/{8125.35fe2368910566d5.js → 8125.b2f908096882ed45.js} +1 -1
  19. package/dist/{8296.e4e3f60f70779a30.js → 8296.a387c28f5702c5e8.js} +1 -1
  20. package/dist/{885.c5fd870ec02f004d.js → 885.be44d92efca1aaf6.js} +1 -1
  21. package/dist/assets/public/monaco-editor/index.html +61 -0
  22. package/dist/assets/public/monaco-editor/index.js +1 -0
  23. package/dist/assets/schema-types/InterfaceProps.ts +2 -0
  24. package/dist/assets/schema-types/types.ts +28 -27
  25. package/dist/index.html +1 -28
  26. package/dist/main.d3c81428418939dc.js +1 -0
  27. package/dist/{runtime.94df8f20f115da3f.js → runtime.2f0f434d4763c970.js} +1 -1
  28. package/main.js +1 -1
  29. package/package.json +11 -11
  30. package/sandbox.js +1 -1
  31. package/src/assets/schema-types/types.ts +28 -27
  32. package/src/public/dist-db-masters/browser/index.html +1 -1
  33. package/src/public/dist-db-masters/browser/main-6YSY4AYM.js +139 -0
  34. package/src/tools/local-client.js +1 -1
  35. package/dist/2735.a66ecf607b9654e0.js +0 -1
  36. package/dist/292.885b93c9e38b775a.js +0 -1
  37. package/dist/4575.584a2fd6d6505e7a.js +0 -1
  38. package/dist/485.ec283c2f8b792308.js +0 -1
  39. package/dist/6393.bff610fd50c307e8.js +0 -1
  40. package/dist/7470.1bdcf8e01acb62bd.js +0 -1
  41. package/dist/assets/monaco-assets/configurations/cpp.json +0 -34
  42. package/dist/assets/monaco-assets/configurations/csharp.json +0 -32
  43. package/dist/assets/monaco-assets/configurations/dart.json +0 -29
  44. package/dist/assets/monaco-assets/configurations/go.json +0 -37
  45. package/dist/assets/monaco-assets/configurations/java.json +0 -33
  46. package/dist/assets/monaco-assets/configurations/javascript.json +0 -140
  47. package/dist/assets/monaco-assets/configurations/json.json +0 -22
  48. package/dist/assets/monaco-assets/configurations/python.json +0 -56
  49. package/dist/assets/monaco-assets/configurations/ruby.json +0 -31
  50. package/dist/assets/monaco-assets/configurations/rust.json +0 -34
  51. package/dist/assets/monaco-assets/configurations/swift.json +0 -27
  52. package/dist/assets/monaco-assets/configurations/typescript.json +0 -140
  53. package/dist/assets/monaco-assets/configurations/xml.json +0 -39
  54. package/dist/assets/monaco-assets/configurations/yaml.json +0 -35
  55. package/dist/assets/monaco-assets/grammars/cpp.tmLanguage.json +0 -16309
  56. package/dist/assets/monaco-assets/grammars/csharp.tmLanguage.json +0 -4984
  57. package/dist/assets/monaco-assets/grammars/dart.tmLanguage.json +0 -521
  58. package/dist/assets/monaco-assets/grammars/go.tmLanguage.json +0 -1017
  59. package/dist/assets/monaco-assets/grammars/java.tmLanguage.json +0 -1855
  60. package/dist/assets/monaco-assets/grammars/javascript.tmLanguage.json +0 -5914
  61. package/dist/assets/monaco-assets/grammars/json.tmLanguage.json +0 -213
  62. package/dist/assets/monaco-assets/grammars/magicpython.tmLanguage.json +0 -4213
  63. package/dist/assets/monaco-assets/grammars/ruby.tmLanguage.json +0 -2775
  64. package/dist/assets/monaco-assets/grammars/rust.tmLanguage.json +0 -1170
  65. package/dist/assets/monaco-assets/grammars/swift.tmLanguage.json +0 -3303
  66. package/dist/assets/monaco-assets/grammars/typescript.tmLanguage.json +0 -5665
  67. package/dist/assets/monaco-assets/grammars/xml.tmLanguage.json +0 -387
  68. package/dist/assets/monaco-assets/grammars/yaml.tmLanguage.json +0 -621
  69. package/dist/assets/monaco-assets/onig.wasm +0 -0
  70. package/dist/main.40b9c805b1ee0fc1.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{48296:(Mt,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Dt});var J=d(77664),Q=d(17017),B=d(63726),H=d(81025),u=d(15861),e=d(94946),r=d(6990),T=d(96925),N=d(33157),E=d(90328),p=d(51162),c=d(45085),D=d(70819),Y=d(95852),F=d(77240),G=d(53429),K=d(67629),L=d(32915),V=d(31042),j=d(67145),W=d(10262),X=d(81429),Z=d(85219),b=d(27414),M=d(90204),R=d(60095),_=d(96814),x=d(95431),q=d(97680),w=d(33259),z=d(51532),ee=d(42169),U=d(99961),te=d(32660),ie=d(55043),se=d(63885),ae=d(559),ne=d(86937),le=d(40356),oe=d(79329),re=d(37595),de=d(53824),pe=d(58651),ce=d(86607),ue=d(5305),ge=d(72726);function me(a,o){1&a&&(e.TgZ(0,"div",38),e._UZ(1,"app-w-instances",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function _e(a,o){1&a&&(e.TgZ(0,"div",40),e._UZ(1,"app-w-databases",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e._UZ(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let fe=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.R;loading={form:!1};constructor(t,i,s){this.eventCenterS=t,this.notificationS=i,this.constantsS=s}ngOnInit(){}showModal(){$("#idFilterPanelInLogsTableForm").modal("show")}hideModal(){$("#idFilterPanelInLogsTableForm").modal("hide")}applyFilter(){const t={};t.supportedAPIs=this.eventCenterS.filterInLog.supportedAPIs.value,t.customApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.functions.value),t.systemApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.systemApis.value),t.eventsApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.eventsApis.value),t.schedulersApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.schedulersApis.value),t.webSocketEvents=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.webSocketApis.value),t.thirdPartyApis=this.eventCenterS.filterInLog.thirdPartyAPIs.value,t.queryParams={},t.apisRegex=this.eventCenterS.filterInLog.apisRegex,this.setDataInObjectFromEventCenter(t),this.data.eventChannel.emit({action:N.F.APPLY_FILTER,data:t}),this.notificationS.showSuccess("Success.")}setDataInObjectFromEventCenter(t){t.queryParams.instanceIds=this.eventCenterS.filterInLog.instanceIds.value,t.queryParams.databaseIds=this.eventCenterS.filterInLog.databaseIds.value,t.queryParams.databaseNames=this.eventCenterS.filterInLog.databaseNames.value,t.queryParams.collectionIds=this.eventCenterS.filterInLog.collectionIds.value,t.queryParams.collectionNames=this.eventCenterS.filterInLog.collectionNames.value,t.queryParams.supportedApiIds=this.eventCenterS.filterInLog.supportedApiIds.value,t.queryParams.supportedApiNames=this.eventCenterS.filterInLog.supportedApiNames.value,t.queryParams.functions=this.eventCenterS.filterInLog.functionIds.value,t.queryParams.systemApis=this.eventCenterS.filterInLog.systemApiIds.value,t.queryParams.eventIds=this.eventCenterS.filterInLog.eventIds.value,t.queryParams.schedulersIds=this.eventCenterS.filterInLog.schedulersIds.value,t.queryParams.webSocketIds=this.eventCenterS.filterInLog.webSocketIds.value,this.setThirdPartyApiIds(t)}setThirdPartyApiIds(t){const i=this.eventCenterS.filterInLog.thirdPartyApiIds.value,s=[];for(const n of i)n.length>=24&&s.push(n);t.queryParams.thirdPartyApis=s}getPermissionMapFunctions(t){const i={};for(const s of t||[])i[s._id]=!0;return i}ngOnDestroy(){this.eventCenterS.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-filter-panel-layout-model"]],inputs:{data:"data"},decls:52,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFilterPanelInLogsTableForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content",2,"max-height","calc(100vh - 58px)"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-categories"],[1,"vertical-height-max"],[3,"isFilterLogTable","typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"v-div","w-ins-apis"],[1,"vertical-height-max",2,"width","500px"],[3,"isLPM","isFilterLogTable","treeViewId"],[1,"v-div","w-third-party"],[1,"vertical-height-tp-api"],[3,"isFilterLogTable","isLPM","IsDependentOnGroup"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","isFilterLogTable","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","isFilterLogTable","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","showCheckbox","IsReadOnly","isFilterLogTable","isLPM"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-filter","text-yellow","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"vertical-height-instances","w-100"],[1,"w-100",3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6,"Filter "),e.qZA(),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e._UZ(14,"app-w-api-categories",12),e.qZA()(),e.TgZ(15,"div",13)(16,"p-splitter",14),e.YNc(17,me,2,3,"ng-template",15),e.YNc(18,_e,2,3,"ng-template",15),e.qZA()(),e.TgZ(19,"div",16)(20,"div",11),e._UZ(21,"app-w-collections",17),e.qZA()(),e.TgZ(22,"div",18)(23,"div",19),e._UZ(24,"app-w-supported-api",20),e.qZA()(),e.TgZ(25,"div",21)(26,"div",22),e._UZ(27,"app-w-supported-tp-api",23),e.qZA()(),e.TgZ(28,"div",24)(29,"div",11),e._UZ(30,"app-custom-api-grid",25),e.qZA()(),e.TgZ(31,"div",26)(32,"div",11),e._UZ(33,"app-system-api-w",25),e.qZA()(),e.TgZ(34,"div",27)(35,"div",11),e._UZ(36,"app-events-grid",25),e.qZA()(),e.TgZ(37,"div",28)(38,"div",11),e._UZ(39,"app-scheduler-man-w",29),e.qZA()(),e.TgZ(40,"div",30)(41,"div",11),e._UZ(42,"app-web-socket-events-grid",31),e.qZA()()()(),e.TgZ(43,"div",32)(44,"button",33),e._UZ(45,"i",34),e._uU(46," Cancel"),e.qZA(),e.TgZ(47,"button",35),e.NdJ("click",function(){return s.applyFilter()}),e._UZ(48,"i",36),e.TgZ(49,"span"),e._uU(50,"Apply Filter"),e.qZA()()(),e.YNc(51,he,1,0,"p-progressSpinner",37),e.qZA()()()),2&i&&(e.xp6(14),e.Q6J("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(53,ve)),e.xp6(3),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(9),e.Q6J("ngIf",s.loading.form))},dependencies:[_.O5,te.y,Z.jx,q.G,ie.q,se.f,ae.O,ne.n,le.T,oe.X,re.G,de.d,pe.A,ce.V,ue.N,ge.x],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 410px)}.vertical-height-max[_ngcontent-%COMP%], .vertical-height-tp-api[_ngcontent-%COMP%]{height:calc(100vh - 154px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 158px);float:left}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:25rem}.w-collection[_ngcontent-%COMP%]{width:28rem}.w-ins-apis[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%], .w-events[_ngcontent-%COMP%], .w-schedulers[_ngcontent-%COMP%]{width:calc(100vw - 24.5rem)}"]})}return a})();var f=d(27672),ye=d(62304),Ce=d(756),Ae=d(84066);function Te(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2,"Tenant Username"),e.qZA(),e.TgZ(3,"td"),e._uU(4," :"),e.qZA(),e.TgZ(5,"td",19),e._uU(6),e.qZA()()),2&a){const t=e.oxw();e.xp6(6),e.Oqu(null==t.inputData?null:t.inputData.tenantUsername)}}function Ze(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function xe(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}function Ie(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function Se(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}const Le=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},O=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let be=(()=>{class a{ec;notificationS;generalCS;constantsCS;logS;cd;monacoS;constantsS;EAPICategory=c.R;loading={form:!1};selectedRowData;reqHeaders=[];resHeaders=[];inputData;editorReqQueryParams;editorOptionReqQueryParams={readOnly:!1,language:"json",contextmenu:!1};editorReqBody;editorOptionReqBody={readOnly:!1,language:"json",contextmenu:!1};editorResBody;editorOptionResBody={readOnly:!1,language:"json",contextmenu:!1};editorLogs;editorOptionLogs={readOnly:!1,language:"text",contextmenu:!1};reqHeaderCollapse;reqQueryParamsCollapse;reqBodyCollapse;resHeaderCollapse;resQueryParamsCollapse;resBodyCollapse;logsBodyCollapse;ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.constantsCS=n,this.logS=l,this.cd=g,this.monacoS=h,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.Z)(function*(){try{if(i.inputData=t[0],!i.inputData)return;yield i.getLogByID(i.inputData._id),i.collapseAll(),$("#idLogDetailsLayoutModal").modal("show")}catch(s){console.log(s)}})()}getLogByID(t){var i=this;return(0,u.Z)(function*(){const s=(yield i.logS.getById(t).toPromise()).data;if(i.inputData=Object.assign({},i.inputData,s),s){s.pathVariables=JSON.parse(s.pathVariables||"{}"),s.meta&&(s.executionTime=s.meta?.executionTime),s.createdAt=moment(s.createdAt).format("DD-MM-YYYY hh:mm:ss A"),s.updatedAt=moment(s.updatedAt).format("DD-MM-YYYY hh:mm:ss A");for(const l of i.getKeys(s.pathVariables))s[l]=s.pathVariables[l];for(const l of s.apiErrors||[])for(const g of i.getKeys(l))s[g]=l[g];delete s.pathVariables,delete s.apiErrors,delete s.meta,delete s._id,delete s.user,delete s.instance,delete s.apiUser}if(i.selectedRowData=s,i.reqHeaders=i.selectedRowData?.reqHeaders?Object.entries(i.selectedRowData.reqHeaders):[],i.generalCS.setValueInEditor(i,"editorReqQueryParams",i.selectedRowData.queryParams||""),i.generalCS.setValueInEditor(i,"editorReqBody",i.selectedRowData.reqPayload||""),i.selectedRowData.resHeaders){i.resHeaders=Object.entries(i.selectedRowData.resHeaders);const l=i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE].indexOf(f.g7.JSON)>=0)&&(n=JSON.stringify(i.selectedRowData.resPayload)),i.generalCS.setValueInEditor(i,"editorResBody",n||""),i.generalCS.setValueInEditor(i,"editorLogs",i.selectedRowData.logs||""),i.cd.detectChanges()})()}setResponseBodyLanguage(t){var i=this;return(0,u.Z)(function*(){t.indexOf(f.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.TEXT)>=0&&(i.editorOptionResBody.language="plaintext",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language))})()}getKeys(t){return t?Object.keys(t):[]}requestHeaderClick(){this.reqHeaderCollapse=!this.reqHeaderCollapse}requestQueryParamsClick(){void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),this.reqQueryParamsCollapse=!this.reqQueryParamsCollapse}requestBodyClick(){void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),this.reqBodyCollapse=!this.reqBodyCollapse}responseHeaderClick(){this.resHeaderCollapse=!this.resHeaderCollapse}responseBodyClick(){void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),this.resBodyCollapse=!this.resBodyCollapse}logsBodyClick(){void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.logsBodyCollapse=!this.logsBodyCollapse}expandAll(){this.reqHeaderCollapse=!0,this.reqQueryParamsCollapse=!0,this.reqBodyCollapse=!0,this.resHeaderCollapse=!0,this.resQueryParamsCollapse=!0,this.resBodyCollapse=!0,this.logsBodyCollapse=!0,void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.cd.detectChanges()}collapseAll(){this.reqHeaderCollapse=!1,this.reqQueryParamsCollapse=!1,this.reqBodyCollapse=!1,this.resHeaderCollapse=!1,this.resQueryParamsCollapse=!1,this.resBodyCollapse=!1,this.logsBodyCollapse=!1,this.cd.detectChanges()}ngOnDestroy(){this.ec.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(F.b),e.Y36(M.s),e.Y36(D.e),e.Y36(e.sBO),e.Y36(ye.b),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-details-layout-model"]],decls:143,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogDetailsLayoutModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[2,"margin-top","1px"],[1,"fas","fa-info-circle","text-success","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Expand",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","text-danger","fas","fa-expand-alt",3,"click"],["pTooltip","Collapse",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","fas","fa-compress-alt",3,"click"],[1,"modal-body","p-4",2,"overflow-y","scroll"],[1,""],[1,"table","table-hover","table-striped","table-bordered","table-sm"],[2,"width","150px"],[2,"width","10px"],[1,"pl-2"],[3,"ngClass"],[4,"ngIf"],[3,"ngStyle"],["id","reqHeader",1,"cursor-pointer","logs-collapse-div",3,"click"],[2,"margin-left","10px"],[1,"float-right","mr-2",3,"hidden"],[1,"fas","fa-caret-down"],[1,"fas","fa-caret-up"],[1,"mt-1",2,"background","#373b3d","border-radius","10px",3,"hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["id","reqQueryParams",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"overflow-auto",2,"height","300px !important"],[3,"editorOptions","editorGenerated"],["id","reqBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resHeader",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","logsBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"ml-2"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",3,"hidden"],[3,"pSelectableRow"],[2,"white-space","nowrap"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._UZ(5,"i",5),e._uU(6,"Detail view "),e.qZA(),e.TgZ(7,"div",6)(8,"button",7)(9,"span",8),e._UZ(10,"i",9),e.qZA()(),e.TgZ(11,"span",10)(12,"i",11),e.NdJ("click",function(){return s.expandAll()}),e.qZA()(),e.TgZ(13,"span",12)(14,"i",13),e.NdJ("click",function(){return s.collapseAll()}),e.qZA()()()(),e.TgZ(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e._UZ(19,"col",17)(20,"col",18)(21,"col"),e.qZA(),e.TgZ(22,"tr")(23,"td"),e._uU(24,"URL"),e.qZA(),e.TgZ(25,"td"),e._uU(26," :"),e.qZA(),e.TgZ(27,"td",19),e._uU(28),e.qZA()(),e.TgZ(29,"tr")(30,"td"),e._uU(31,"Method"),e.qZA(),e.TgZ(32,"td"),e._uU(33," :"),e.qZA(),e.TgZ(34,"td",19)(35,"span",20),e._uU(36),e.qZA()()(),e.TgZ(37,"tr")(38,"td"),e._uU(39,"Type"),e.qZA(),e.TgZ(40,"td"),e._uU(41," :"),e.qZA(),e.TgZ(42,"td",19),e._uU(43),e.qZA()(),e.YNc(44,Te,7,1,"tr",21),e.TgZ(45,"tr")(46,"td"),e._uU(47,"Name"),e.qZA(),e.TgZ(48,"td"),e._uU(49," :"),e.qZA(),e.TgZ(50,"td",19),e._uU(51),e.qZA()(),e.TgZ(52,"tr")(53,"td"),e._uU(54,"Time"),e.qZA(),e.TgZ(55,"td"),e._uU(56," :"),e.qZA(),e.TgZ(57,"td",19),e._uU(58),e.ALo(59,"moment"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"Status"),e.qZA(),e.TgZ(63,"td"),e._uU(64," :"),e.qZA(),e.TgZ(65,"td",19)(66,"span",22),e._uU(67),e.qZA()()(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"Status Code"),e.qZA(),e.TgZ(71,"td"),e._uU(72," :"),e.qZA(),e.TgZ(73,"td",19)(74,"span",22),e._uU(75),e.qZA()()()()(),e.TgZ(76,"div",23),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(77,"span",24),e._uU(78,"Request Header "),e.qZA(),e.TgZ(79,"div",25),e._UZ(80,"i",26),e.qZA(),e.TgZ(81,"div",25),e._UZ(82,"i",27),e.qZA()(),e.TgZ(83,"div",28)(84,"p-table",29),e.YNc(85,Ze,5,0,"ng-template",30),e.YNc(86,xe,7,3,"ng-template",31),e.qZA()(),e.TgZ(87,"div",32),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(88,"span",24),e._uU(89,"Request Query params "),e.qZA(),e.TgZ(90,"div",25),e._UZ(91,"i",26),e.qZA(),e.TgZ(92,"div",25),e._UZ(93,"i",27),e.qZA()(),e.TgZ(94,"div",28)(95,"div",33)(96,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(97,"div",35),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(98,"span",24),e._uU(99,"Request Body "),e.qZA(),e.TgZ(100,"div",25),e._UZ(101,"i",26),e.qZA(),e.TgZ(102,"div",25),e._UZ(103,"i",27),e.qZA()(),e.TgZ(104,"div",28)(105,"div",33)(106,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(107,"div",36),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(108,"span",24),e._uU(109,"Response Header "),e.qZA(),e.TgZ(110,"div",25),e._UZ(111,"i",26),e.qZA(),e.TgZ(112,"div",25),e._UZ(113,"i",27),e.qZA()(),e.TgZ(114,"div",28)(115,"p-table",29),e.YNc(116,Ie,5,0,"ng-template",30),e.YNc(117,Se,7,3,"ng-template",31),e.qZA()(),e.TgZ(118,"div",37),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(119,"span",24),e._uU(120,"Response Body "),e.qZA(),e.TgZ(121,"div",25),e._UZ(122,"i",26),e.qZA(),e.TgZ(123,"div",25),e._UZ(124,"i",27),e.qZA()(),e.TgZ(125,"div",28)(126,"div",33)(127,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(128,"div",38),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(129,"span",39),e._uU(130,"Logs "),e.qZA(),e.TgZ(131,"div",25),e._UZ(132,"i",26),e.qZA(),e.TgZ(133,"div",25),e._UZ(134,"i",27),e.qZA()(),e.TgZ(135,"div",28)(136,"div",33)(137,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(138,"div",40)(139,"button",41),e._UZ(140,"i",42),e._uU(141," Cancel"),e.qZA()(),e._UZ(142,"p-progressSpinner",43),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(45,Le,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.GET,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.PUT,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.POST,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.category),e.xp6(1),e.Q6J("ngIf",null==s.inputData?null:s.inputData.tenantUsername),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(e.xi3(59,42,null==s.inputData?null:s.inputData.createdAt,s.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS)),e.xp6(8),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(50,O):e.DdM(51,k)),e.xp6(1),e.Oqu(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(52,O):e.DdM(53,k)),e.xp6(1),e.Oqu(null==s.inputData?null:s.inputData.statusCode),e.xp6(4),e.Q6J("hidden",s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.xp6(6),e.Q6J("hidden",s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqQueryParams),e.xp6(4),e.Q6J("hidden",s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqBody),e.xp6(4),e.Q6J("hidden",s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.xp6(6),e.Q6J("hidden",s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionResBody),e.xp6(4),e.Q6J("hidden",s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionLogs),e.xp6(5),e.Q6J("hidden",!s.loading.form))},dependencies:[_.mk,_.O5,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,w.u,Ae.d],encapsulation:2})}return a})();const qe=["logFilterPanelLayoutModelC"],Pe=["logDetailsLayoutModelC"];function Ne(a,o){if(1&a&&(e.TgZ(0,"div",7)(1,"span",8)(2,"h4",9),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function Ee(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function De(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",50)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.instanceClickData([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Fe(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Me(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function Re(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeDbClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.db," ")}}function we(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Re,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Ue(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function Oe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeCollectionClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ke(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function Je(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Qe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeApiClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Be(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Qe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function He(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Ye(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_1"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ge(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_2"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function Ke(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ge,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ve(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_3"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function je(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ve,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function We(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function Xe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.customApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ze(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Xe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function et(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function tt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.systemsApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function it(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,tt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function st(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function at(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.amEventsClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function nt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,at,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function lt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function ot(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.schedulersClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function rt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ot,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function dt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function pt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.wsEventClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameUI," ")}}function ct(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,pt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function ut(a,o){1&a&&(e.TgZ(0,"tr")(1,"th",59),e._uU(2,"Index"),e.qZA(),e.TgZ(3,"th",60),e._uU(4,"Date & Time"),e.qZA(),e.TgZ(5,"th",61),e._uU(6,"Method"),e.qZA(),e.TgZ(7,"th",62),e._uU(8,"Status"),e.qZA(),e.TgZ(9,"th",60),e._uU(10,"API Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"API Name"),e.qZA()())}const y=function(a){return{"selected-row":a}},gt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},mt=function(){return{color:"#26b47f"}},_t=function(){return{color:"#ed4b48"}};function ht(a,o){if(1&a&&(e.TgZ(0,"tr",63)(1,"td")(2,"div",64),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"div",65),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",65)(9,"span",66),e._uU(10),e.qZA()()(),e.TgZ(11,"td")(12,"div",67),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"div",65),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"div",65),e._uU(19),e.qZA()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.oxw(3);e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,y,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,gt,(null==t?null:t.requestMethod)===s.ERequestMethod.GET,(null==t?null:t.requestMethod)===s.ERequestMethod.PUT,(null==t?null:t.requestMethod)===s.ERequestMethod.POST,(null==t?null:t.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij("",null==t?null:t.requestMethod," "),e.xp6(2),e.Q6J("ngStyle",t.success?e.DdM(26,mt):e.DdM(27,_t))("ngClass",e.VKq(28,y,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const vt=function(){return[50,200,500]};function ft(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e._UZ(4,"i",12),e._uU(5," Log Table Summary"),e.qZA(),e.TgZ(6,"div",13)(7,"a",14),e._UZ(8,"img",15),e.qZA()(),e.TgZ(9,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.loadGridData(!1))}),e._UZ(10,"i",17),e._uU(11," Apply "),e.qZA(),e.TgZ(12,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(13,"i",19),e.qZA()(),e.TgZ(14,"div",20)(15,"table",21)(16,"tbody")(17,"tr")(18,"td",22),e._uU(19," Instances"),e.qZA(),e.TgZ(20,"td",23),e.YNc(21,Ee,2,0,"div",24),e.YNc(22,Fe,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Me,2,0,"div",24),e.YNc(25,we,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Ue,2,0,"div",24),e.YNc(28,ke,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,Je,2,0,"div",24),e.YNc(31,Be,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,He,3,0,"td",26),e.YNc(36,$e,2,1,"td",27),e.YNc(37,Ke,2,1,"td",27),e.YNc(38,je,2,1,"td",28),e.qZA(),e.TgZ(39,"tr")(40,"td",22),e._uU(41," Custom APIs"),e.qZA(),e.TgZ(42,"td",29),e.YNc(43,We,2,0,"div",24),e.YNc(44,ze,2,1,"div",25),e.qZA()(),e.TgZ(45,"tr")(46,"td",22),e._uU(47," System APIs"),e.qZA(),e.TgZ(48,"td",29),e.YNc(49,et,2,0,"div",24),e.YNc(50,it,2,1,"div",25),e.qZA()(),e.TgZ(51,"tr")(52,"td",22),e._uU(53," Events"),e.qZA(),e.TgZ(54,"td",29),e.YNc(55,st,2,0,"div",24),e.YNc(56,nt,2,1,"div",25),e.qZA()(),e.TgZ(57,"tr")(58,"td",22),e._uU(59," Schedulers"),e.qZA(),e.TgZ(60,"td",29),e.YNc(61,lt,2,0,"div",24),e.YNc(62,rt,2,1,"div",25),e.qZA()(),e.TgZ(63,"tr")(64,"td",22),e._uU(65," WebSocket Events"),e.qZA(),e.TgZ(66,"td",29),e.YNc(67,dt,2,0,"div",24),e.YNc(68,ct,2,1,"div",25),e.qZA()(),e.TgZ(69,"tr")(70,"td",30)(71,"span",31),e._uU(72,"Date"),e.qZA()(),e.TgZ(73,"td",32)(74,"p-calendar",33),e.NdJ("ngModelChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.gridFilter.rangeDates=s)}),e.qZA(),e.TgZ(75,"span",34),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearDate())}),e._UZ(76,"i",35),e.qZA()()()()()()(),e.TgZ(77,"div",36)(78,"div",11)(79,"span"),e._UZ(80,"img",37),e._uU(81," Log Table"),e.qZA(),e.TgZ(82,"span",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(83,"i",19),e.qZA(),e.TgZ(84,"span",39),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearAllLogsDialog())}),e._UZ(85,"i",40),e.qZA(),e.TgZ(86,"span",41),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.refresh())}),e._UZ(87,"i",42),e.qZA()()(),e.TgZ(88,"div",43)(89,"div",44)(90,"p-table",45),e.NdJ("selectionChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectedRows=s)})("dblclick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.dblClickLogs())}),e.YNc(91,ut,13,0,"ng-template",46),e.YNc(92,ht,20,34,"ng-template",47),e.qZA()()()()}if(2&a){const t=e.oxw(2);e.xp6(21),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstanceApis)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstanceApis||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections)),e.xp6(4),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.xp6(6),e.Q6J("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.xp6(16),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.DdM(35,vt))("value",t.responseData)}}function yt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function Ct(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,Ne,4,1,"div",5),e.YNc(2,ft,93,36,"div",0),e.YNc(3,yt,1,0,"p-progressSpinner",6),e.qZA()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.loading)}}let At=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;constantsCS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:E.D.ADD,eventChannel:new e.vpe,formData:void 0};instances;instanceIds;instanceNames;databases;databaseNames;collections;collectionNames;supportedAPIs;supportedApiNames;customApis;functionIds;customApiNames;systemsApis;systemApiIds;systemApiNames;amEvents;amEventIds;amEventNames;schedulersApis;schedulersIds;schedulersNames;wsEvents;wsEventIds;wsEventsNames;tpBundles;tpBundleMap=[];tpApiVersions;tpApiVersionMap=[];tpApis;tpApisMap=[];allTreeItemsMap={};value=new Date;range={start:null,end:null};logFilterPanelLayoutModelC;logDetailsLayoutModelC;gridFilter={queryParams:{},apisRegex:{},supportedAPIs:{}};ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v,C,m,I,S,A,Ft){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=g,this.schedulerS=h,this.amEventS=v,this.webSocketEventsS=C,this.dataProviderS=m,this.confirmationService=I,this.constantsS=S,this.constantsCS=A,this.cd=Ft,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.Z)(function*(s){if(s&&s.action===N.F.APPLY_FILTER){const n=t.gridFilter;t.gridFilter=s.data,t.gridFilter.rangeDates=n.rangeDates,yield t.loadInstances(s.data),yield t.logTableSummaryData(s.data),t.logFilterPanelLayoutModelC&&t.logFilterPanelLayoutModelC.hideModal(),yield t.loadGridData(!1)}});return function(s){return i.apply(this,arguments)}}())),this.generalS.setNewTitle("API Maker - Log Table Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.Z)(function*(){t.loading=!0;try{const i=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,!0===i.isLogsSetupDone?(t.isExternalLogsSetupDoneByRoot=!0,t.loadGridData(!1)):t.isExternalLogsSetupDoneByRoot=!1}catch{t.isExternalLogsSetupDoneByRoot=!1}t.cd.detectChanges()})()}loadGridData(t){var i=this;return(0,u.Z)(function*(){const s={find:{user:i.authCS.getUserId()},select:{createdAt:1,success:1,category:1,requestMethod:1,instanceName:1,databaseName:1,collectionName:1,instanceApiName:1,customApiName:1,systemApiName:1,eventName:1,tpApiBundleName:1,apiVersion:1,tpApiName:1,schedulerName:1,webSocketEventName:1,tenantUsername:1,url:1},sort:{_id:-1},limit:i.settings.maxRowsLimit};if(i.setDataForFilterModal(!1),i.gridFilter&&i.logFilterPanelLayoutModelC&&i.logFilterPanelLayoutModelC.setDataInObjectFromEventCenter(i.gridFilter),i.applyFilterInQuery(s.find,i.gridFilter),t){const l=i.responseData?.[0]?._id;l&&(s.find._id={$gt:l})}const n=yield i.logS.query(s).toPromise();if(t){for(const l of i.responseData)l.isNewInGrid=!1;i.responseData=[...n.data,...i.responseData];for(const l of n.data)i.doChangesInLogObject(l,!0)}else{i.responseData=n.data;for(const l of i.responseData)i.doChangesInLogObject(l,!1)}i.generalS.setNewTitle("API Maker - Log Table Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.R.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.R.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.R.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.R.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.R.INSTANCES};i?.apisRegex?.allInstances?t.$or.push(l):r.isEmpty(i?.queryParams?.instanceIds)||(l.instanceName={$in:this.instanceNames},r.isEmpty(i.queryParams.databaseNames)||(l.databaseName={$in:i.queryParams.databaseNames}),r.isEmpty(i.queryParams.collectionNames)||(l.collectionName={$in:i.queryParams.collectionNames}),r.isEmpty(i.queryParams.supportedApiNames)||(l.instanceApiName={$in:i.queryParams.supportedApiNames}),t.$or.push(l));const g={category:c.R.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(g);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const m=r.uniq(r.map(this.tpBundles,"bundleName")),I=r.uniq(r.map(this.tpApiVersions,"apiVersion")),S=r.uniq(r.map(this.tpApis,"apiName")),A={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(A.tpApiBundleName={$in:m}),r.isEmpty(I)||(A.apiVersion={$in:I}),r.isEmpty(S)||(A.tpApiName={$in:S}),t.$or.push(A)}const h={category:c.R.EVENTS};i?.apisRegex?.allEvents?t.$or.push(h):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.R.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const v={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(v):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const C={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(C):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.R.WEB_SOCKET_EVENT,webSocketEventName:{$in:this.wsEventsNames}}),i?.rangeDates?.[0]&&t.$and.push({createdAt:{$gte:i.rangeDates[0]}}),i?.rangeDates?.[1]&&t.$and.push({createdAt:{$lte:i.rangeDates[1]}}),r.isEmpty(t.$or)&&delete t.$or,r.isEmpty(t.$and)&&delete t.$and}logTableSummaryData(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.functions},select:{name:1}};i.customApis=(yield i.functionS.query(s).toPromise()).data,i.functionIds=r.map(i.customApis,p.iH._id),i.customApiNames=r.map(i.customApis,p.eb.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.iH._id);i.systemsApis=[];for(const m of t?.queryParams.systemApis)l[m]&&i.systemsApis.push(l[m]);i.systemApiIds=r.map(i.systemsApis,p.iH._id),i.systemApiNames=r.map(i.systemsApis,p.aV.name);const g={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(g).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.iH._id),i.amEventNames=r.map(i.amEvents,p.l0.name);const h={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(h).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.iH._id),i.schedulersNames=r.map(i.schedulersApis,p.qH.name);const v=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,C=r.keyBy(v,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)C[m]&&i.wsEvents.push(C[m]);i.wsEventIds=r.map(i.wsEvents,p.iH._id),i.wsEventsNames=r.map(i.wsEvents,p.of.id),i.calculateThirdPartyApiDataForUI(t)})()}calculateThirdPartyApiDataForUI(t){this.tpBundles=[],this.tpApiVersions=[],this.tpApis=[];for(const i of t.thirdPartyApis)i.level0?this.tpBundles.push(i):i.level1?this.tpApiVersions.push(i):i.level2&&this.tpApis.push(i);this.generalS.getMapOfAllItems(this.allTreeItemsMap,t.thirdPartyApis),this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApisMap=r.map(this.tpApis,p.iH._id)}loadInstances(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.instanceIds},select:{name:1},sort:{name:1}};i.instances=(yield i.instanceS.query(s).toPromise()).data,i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.Z)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.iH._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.Z)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.iH._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.Z)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.iH._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format(this.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=[[t.instanceName,t.tenantUsername].filter(s=>!!s).join("::"),t.databaseName,t.collectionName,t.instanceApiName].filter(s=>!!s).join(" \u2192 "):t.category===c.R.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.R.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.R.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.R.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.R.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=E.D.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.Z)(function*(){const s=[];for(const n of t){i.instances.splice(i.instances.indexOf(n),1);for(const l of i.databases)l.instanceId===n._id&&s.push(l)}i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),i.eventCenterS.filterInLog.instanceIds.next(i.instanceIds),i.removeDbClick(s)})()}removeDbClick(t){const i=[];for(const s of t){this.databases.splice(this.databases.indexOf(s),1);for(const n of this.collections)n.instanceName===s.instanceName&&n.databaseName===s.db&&i.push(n)}this.databaseNames=r.map(this.databases,p.iH._id),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames),this.removeCollectionClick(i)}removeCollectionClick(t){const i=[];for(const s of t){this.collections.splice(this.collections.indexOf(s),1);for(const n of this.supportedAPIs)s.instanceName&&n.databaseName===s.databaseName&&n.collectionName===s.name&&i.push(n)}this.collectionNames=r.map(this.collections,p.iH._id),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames),this.removeApiClick(i)}removeApiClick(t){for(const i of t)this.supportedAPIs.splice(this.supportedAPIs.indexOf(i),1);this.supportedApiNames=r.map(this.supportedAPIs,p.iH._id),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames),this.setRegexOnRemove()}setRegexOnRemove(){(0===this.instances.length||0===this.databases.length||0===this.collections.length||0===this.supportedAPIs.length)&&(this.gridFilter.apisRegex={})}customApisClick(t){this.customApis.splice(this.customApis.indexOf(t),1),this.functionIds=r.map(this.customApis,p.iH._id),this.customApiNames=r.map(this.customApis,p.eb.name),this.eventCenterS.filterInLog.functionIds.next(this.functionIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.iH._id),this.systemApiNames=r.map(this.systemsApis,p.aV.name),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds)}amEventsClick(t){this.amEvents.splice(this.amEvents.indexOf(t),1),this.amEventIds=r.map(this.amEvents,p.iH._id),this.amEventNames=r.map(this.amEvents,p.l0.name),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds)}schedulersClick(t){this.schedulersApis.splice(this.schedulersApis.indexOf(t),1),this.schedulersIds=r.map(this.schedulersApis,p.iH._id),this.schedulersNames=r.map(this.schedulersApis,p.qH.name),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds)}wsEventClick(t){this.wsEvents.splice(this.wsEvents.indexOf(t),1),this.wsEventIds=r.map(this.wsEvents,p.iH._id),this.wsEventsNames=r.map(this.wsEvents,p.of.id),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds)}npmPackageClickData(t,i){"L_1"===i?this.bundleAndVersionAndApiRemove(t):"L_2"===i?this.allTreeItemsMap[t._id]&&this.apiVersionClickData(this.allTreeItemsMap[t._id]):"L_3"===i&&this.allTreeItemsMap[t._id]&&this.tpApiClickData(this.allTreeItemsMap[t._id])}bundleAndVersionAndApiRemove(t){if(t.level0&&this.tpBundles.indexOf(t)>=0){for(const i of t.children||[])this.apiVersionClickData(i);this.tpBundles.splice(this.tpBundles.indexOf(t),1)}this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.apiVersionClickData(t)}apiVersionClickData(t){t.level1&&this.tpApiVersions.indexOf(t)>=0&&this.tpApiVersions.splice(this.tpApiVersions.indexOf(t),1),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApiClickData(t)}tpApiClickData(t){if(t.level1)for(const i of t.children||[])this.tpApis.indexOf(i)>=0&&this.tpApis.splice(this.tpApis.indexOf(i),1);else if(t.level0)for(const i of t.children||[])for(const s of i.children||[])this.tpApis.indexOf(s)>=0&&this.tpApis.splice(this.tpApis.indexOf(s),1);else t.level2&&this.tpApis.indexOf(t)>=0&&this.tpApis.splice(this.tpApis.indexOf(t),1);this.tpApisMap=r.map(this.tpApis,p.iH._id)}setDataForFilterModal(t){this.eventCenterS.filterInLog.instanceIds.next(this.instanceIds?this.instanceIds:[]),this.eventCenterS.filterInLog.functionIds.next(this.functionIds?this.functionIds:[]),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds?this.systemApiIds:[]),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds?this.amEventIds:[]),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds?this.schedulersIds:[]),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds?this.wsEventIds:[]),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames?this.databaseNames:[]),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames?this.collectionNames:[]),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames?this.supportedApiNames:[]);const i=[...this.tpBundleMap,...this.tpApiVersionMap,...this.tpApisMap];this.eventCenterS.filterInLog.thirdPartyApiIds.next(i.length?i:[]),t&&this.eventCenterS.filterInLog.refreshGrid.next(Math.random())}clearAllLogsDialog(){var t=this;return(0,u.Z)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.Z)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.Z)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.Z)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.iH._id;dblClickLogs(){var t=this;return(0,u.Z)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.Y36(D.e),e.Y36(Y.D),e.Y36(F.b),e.Y36(G.E),e.Y36(K.d),e.Y36(L.u),e.Y36(V.Z),e.Y36(j.l),e.Y36(W.a),e.Y36(X.B),e.Y36(Z.YP),e.Y36(b.L),e.Y36(M.s),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(qe,5),e.Gf(Pe,5)),2&i){let n;e.iGM(n=e.CRH())&&(s.logFilterPanelLayoutModelC=n.first),e.iGM(n=e.CRH())&&(s.logDetailsLayoutModelC=n.first)}},decls:5,vars:2,consts:[["class","pt-1 pl-1 pr-1",4,"ngIf"],[3,"data"],["logFilterPanelLayoutModelC",""],["logDetailsLayoutModelC",""],[1,"pt-1","pl-1","pr-1"],["class","overflow-hidden","style","height: calc(100vh - 46px);",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"overflow-hidden",2,"height","calc(100vh - 46px)"],[1,"text-center"],[1,"mt-5","pt-5"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-table.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","fa-fw","align-middle","text-success"],["tooltipPosition","left","pTooltip","Show Filter Modal",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fa","fa-filter","text-yellow","fa-fw"],[1,"card-body","p-0","overflow-auto",2,"height","278px"],[1,"table","table-striped","table-sm","mb-0"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2"],[1,"border-right"],["class","text-center text-success",4,"ngIf"],[4,"ngIf"],["colspan","4",4,"ngIf"],["class","border-right",4,"ngIf"],["colspan","2",4,"ngIf"],["colspan","4"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2","pt-2"],[1,"mt-1","d-inline-block"],["colspan","4",1,""],["appendTo","body","selectionMode","range","dateFormat","dd/mm/yy","inputId","filterDatePickerId",1,"form-control-sm",3,"ngModel","showIcon","showButtonBar","readonlyInput","ngModelChange"],["pTooltip","Clear",1,"cursor-pointer",3,"click"],[1,"fas","fa-ban","fa-fw","ml-4","align-middle","text-danger"],[1,"card","shadow-sm","h-100","mt-2"],["src","/assets/images/icons/log.svg","alt","Log Table",1,"fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Show Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Clear All Logs",1,"float-right","cursor-pointer","ml-3","text-danger",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw"],["tooltipPosition","left","pTooltip","Refresh Logs",1,"float-right","cursor-pointer","ml-3","text-success",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],[1,"overflow-hidden"],[2,"height","calc(100vh - 418px)","width","calc(100% - 2px)"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","paginator","rows","rowsPerPageOptions","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"text-center","text-success"],["class","ml-1","styleClass","bg-danger text-dark",4,"ngFor","ngForOf"],["styleClass","bg-danger text-dark",1,"ml-1"],[1,"fas","fa-times-circle","cursor-pointer",3,"click"],["class","ml-1","styleClass","bg-warning text-dark",4,"ngFor","ngForOf"],["styleClass","bg-warning text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-info text-dark",4,"ngFor","ngForOf"],["styleClass","bg-info text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-light text-dark",4,"ngFor","ngForOf"],["styleClass","bg-light text-dark",1,"ml-1"],["colspan","2"],[1,"text-center",2,"width","80px"],[2,"width","200px"],[2,"width","130px"],[2,"width","100px"],[3,"pSelectableRow"],[1,"text-center",3,"ngClass"],[1,"text-nowrap",3,"ngClass"],[1,"small","font-weight-bold","mr-3",3,"ngClass"],[1,"text-nowrap",3,"ngStyle","ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.YNc(0,Ct,4,3,"div",0),e._UZ(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Q6J("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("data",s.data))},dependencies:[R.JJ,R.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,w.u,z.f,ee.A,fe,be],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Tt=d(70292),Zt=d(1678),xt=d(64211),It=d(21434),St=d(84186),Lt=d(95765),bt=d(2777),qt=d(57705),Pt=d(31558),Nt=d(38125);const Et=[{path:"main",component:At,canActivate:[B.P]}];let Dt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[J.Bz.forChild(Et),Q.u,Tt.ApiTestingM,Zt.DashboardM,xt.DbCellM,It.B,St.SystemApiM,Lt.FunctionManM,bt.u,qt.L,Pt.SchedulerManM,Nt.AmEventsM,H.WebSocketEventsM]})}return a})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{48296:(Mt,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Dt});var J=d(77664),Q=d(17017),B=d(63726),H=d(81025),u=d(15861),e=d(94946),r=d(6990),T=d(96925),N=d(33157),E=d(90328),p=d(51162),c=d(45085),D=d(70819),Y=d(95852),F=d(77240),G=d(53429),K=d(67629),L=d(32915),V=d(31042),j=d(67145),W=d(10262),X=d(81429),Z=d(85219),b=d(27414),M=d(90204),R=d(60095),_=d(96814),x=d(95431),q=d(97680),w=d(33259),z=d(51532),ee=d(42169),U=d(99961),te=d(32660),ie=d(55043),se=d(63885),ae=d(559),ne=d(86937),le=d(40356),oe=d(79329),re=d(37595),de=d(53824),pe=d(58651),ce=d(86607),ue=d(5305),ge=d(72726);function me(a,o){1&a&&(e.TgZ(0,"div",38),e._UZ(1,"app-w-instances",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function _e(a,o){1&a&&(e.TgZ(0,"div",40),e._UZ(1,"app-w-databases",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e._UZ(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let fe=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.R;loading={form:!1};constructor(t,i,s){this.eventCenterS=t,this.notificationS=i,this.constantsS=s}ngOnInit(){}showModal(){$("#idFilterPanelInLogsTableForm").modal("show")}hideModal(){$("#idFilterPanelInLogsTableForm").modal("hide")}applyFilter(){const t={};t.supportedAPIs=this.eventCenterS.filterInLog.supportedAPIs.value,t.customApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.functions.value),t.systemApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.systemApis.value),t.eventsApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.eventsApis.value),t.schedulersApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.schedulersApis.value),t.webSocketEvents=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.webSocketApis.value),t.thirdPartyApis=this.eventCenterS.filterInLog.thirdPartyAPIs.value,t.queryParams={},t.apisRegex=this.eventCenterS.filterInLog.apisRegex,this.setDataInObjectFromEventCenter(t),this.data.eventChannel.emit({action:N.F.APPLY_FILTER,data:t}),this.notificationS.showSuccess("Success.")}setDataInObjectFromEventCenter(t){t.queryParams.instanceIds=this.eventCenterS.filterInLog.instanceIds.value,t.queryParams.databaseIds=this.eventCenterS.filterInLog.databaseIds.value,t.queryParams.databaseNames=this.eventCenterS.filterInLog.databaseNames.value,t.queryParams.collectionIds=this.eventCenterS.filterInLog.collectionIds.value,t.queryParams.collectionNames=this.eventCenterS.filterInLog.collectionNames.value,t.queryParams.supportedApiIds=this.eventCenterS.filterInLog.supportedApiIds.value,t.queryParams.supportedApiNames=this.eventCenterS.filterInLog.supportedApiNames.value,t.queryParams.functions=this.eventCenterS.filterInLog.functionIds.value,t.queryParams.systemApis=this.eventCenterS.filterInLog.systemApiIds.value,t.queryParams.eventIds=this.eventCenterS.filterInLog.eventIds.value,t.queryParams.schedulersIds=this.eventCenterS.filterInLog.schedulersIds.value,t.queryParams.webSocketIds=this.eventCenterS.filterInLog.webSocketIds.value,this.setThirdPartyApiIds(t)}setThirdPartyApiIds(t){const i=this.eventCenterS.filterInLog.thirdPartyApiIds.value,s=[];for(const n of i)n.length>=24&&s.push(n);t.queryParams.thirdPartyApis=s}getPermissionMapFunctions(t){const i={};for(const s of t||[])i[s._id]=!0;return i}ngOnDestroy(){this.eventCenterS.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-filter-panel-layout-model"]],inputs:{data:"data"},decls:52,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFilterPanelInLogsTableForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content",2,"max-height","calc(100vh - 58px)"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-categories"],[1,"vertical-height-max"],[3,"isFilterLogTable","typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"v-div","w-ins-apis"],[1,"vertical-height-max",2,"width","500px"],[3,"isLPM","isFilterLogTable","treeViewId"],[1,"v-div","w-third-party"],[1,"vertical-height-tp-api"],[3,"isFilterLogTable","isLPM","IsDependentOnGroup"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","isFilterLogTable","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","isFilterLogTable","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","showCheckbox","IsReadOnly","isFilterLogTable","isLPM"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-filter","text-yellow","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"vertical-height-instances","w-100"],[1,"w-100",3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6,"Filter "),e.qZA(),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e._UZ(14,"app-w-api-categories",12),e.qZA()(),e.TgZ(15,"div",13)(16,"p-splitter",14),e.YNc(17,me,2,3,"ng-template",15),e.YNc(18,_e,2,3,"ng-template",15),e.qZA()(),e.TgZ(19,"div",16)(20,"div",11),e._UZ(21,"app-w-collections",17),e.qZA()(),e.TgZ(22,"div",18)(23,"div",19),e._UZ(24,"app-w-supported-api",20),e.qZA()(),e.TgZ(25,"div",21)(26,"div",22),e._UZ(27,"app-w-supported-tp-api",23),e.qZA()(),e.TgZ(28,"div",24)(29,"div",11),e._UZ(30,"app-custom-api-grid",25),e.qZA()(),e.TgZ(31,"div",26)(32,"div",11),e._UZ(33,"app-system-api-w",25),e.qZA()(),e.TgZ(34,"div",27)(35,"div",11),e._UZ(36,"app-events-grid",25),e.qZA()(),e.TgZ(37,"div",28)(38,"div",11),e._UZ(39,"app-scheduler-man-w",29),e.qZA()(),e.TgZ(40,"div",30)(41,"div",11),e._UZ(42,"app-web-socket-events-grid",31),e.qZA()()()(),e.TgZ(43,"div",32)(44,"button",33),e._UZ(45,"i",34),e._uU(46," Cancel"),e.qZA(),e.TgZ(47,"button",35),e.NdJ("click",function(){return s.applyFilter()}),e._UZ(48,"i",36),e.TgZ(49,"span"),e._uU(50,"Apply Filter"),e.qZA()()(),e.YNc(51,he,1,0,"p-progressSpinner",37),e.qZA()()()),2&i&&(e.xp6(14),e.Q6J("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(53,ve)),e.xp6(3),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(9),e.Q6J("ngIf",s.loading.form))},dependencies:[_.O5,te.y,Z.jx,q.G,ie.q,se.f,ae.O,ne.n,le.T,oe.X,re.G,de.d,pe.A,ce.V,ue.N,ge.x],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 410px)}.vertical-height-max[_ngcontent-%COMP%], .vertical-height-tp-api[_ngcontent-%COMP%]{height:calc(100vh - 154px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 158px);float:left}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:25rem}.w-collection[_ngcontent-%COMP%]{width:28rem}.w-ins-apis[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%], .w-events[_ngcontent-%COMP%], .w-schedulers[_ngcontent-%COMP%]{width:calc(100vw - 24.5rem)}"]})}return a})();var f=d(27672),ye=d(45809),Ce=d(756),Ae=d(84066);function Te(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2,"Tenant Username"),e.qZA(),e.TgZ(3,"td"),e._uU(4," :"),e.qZA(),e.TgZ(5,"td",19),e._uU(6),e.qZA()()),2&a){const t=e.oxw();e.xp6(6),e.Oqu(null==t.inputData?null:t.inputData.tenantUsername)}}function Ze(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function xe(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}function Ie(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function Se(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}const Le=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},O=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let be=(()=>{class a{ec;notificationS;generalCS;constantsCS;logS;cd;monacoS;constantsS;EAPICategory=c.R;loading={form:!1};selectedRowData;reqHeaders=[];resHeaders=[];inputData;editorReqQueryParams;editorOptionReqQueryParams={readOnly:!1,language:"json",contextmenu:!1};editorReqBody;editorOptionReqBody={readOnly:!1,language:"json",contextmenu:!1};editorResBody;editorOptionResBody={readOnly:!1,language:"json",contextmenu:!1};editorLogs;editorOptionLogs={readOnly:!1,language:"text",contextmenu:!1};reqHeaderCollapse;reqQueryParamsCollapse;reqBodyCollapse;resHeaderCollapse;resQueryParamsCollapse;resBodyCollapse;logsBodyCollapse;ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.constantsCS=n,this.logS=l,this.cd=g,this.monacoS=h,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.Z)(function*(){try{if(i.inputData=t[0],!i.inputData)return;yield i.getLogByID(i.inputData._id),i.collapseAll(),$("#idLogDetailsLayoutModal").modal("show")}catch(s){console.log(s)}})()}getLogByID(t){var i=this;return(0,u.Z)(function*(){const s=(yield i.logS.getById(t).toPromise()).data;if(i.inputData=Object.assign({},i.inputData,s),s){s.pathVariables=JSON.parse(s.pathVariables||"{}"),s.meta&&(s.executionTime=s.meta?.executionTime),s.createdAt=moment(s.createdAt).format("DD-MM-YYYY hh:mm:ss A"),s.updatedAt=moment(s.updatedAt).format("DD-MM-YYYY hh:mm:ss A");for(const l of i.getKeys(s.pathVariables))s[l]=s.pathVariables[l];for(const l of s.apiErrors||[])for(const g of i.getKeys(l))s[g]=l[g];delete s.pathVariables,delete s.apiErrors,delete s.meta,delete s._id,delete s.user,delete s.instance,delete s.apiUser}if(i.selectedRowData=s,i.reqHeaders=i.selectedRowData?.reqHeaders?Object.entries(i.selectedRowData.reqHeaders):[],i.generalCS.setValueInEditor(i,"editorReqQueryParams",i.selectedRowData.queryParams||""),i.generalCS.setValueInEditor(i,"editorReqBody",i.selectedRowData.reqPayload||""),i.selectedRowData.resHeaders){i.resHeaders=Object.entries(i.selectedRowData.resHeaders);const l=i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE].indexOf(f.g7.JSON)>=0)&&(n=JSON.stringify(i.selectedRowData.resPayload)),i.generalCS.setValueInEditor(i,"editorResBody",n||""),i.generalCS.setValueInEditor(i,"editorLogs",i.selectedRowData.logs||""),i.cd.detectChanges()})()}setResponseBodyLanguage(t){var i=this;return(0,u.Z)(function*(){t.indexOf(f.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.TEXT)>=0&&(i.editorOptionResBody.language="plaintext",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language))})()}getKeys(t){return t?Object.keys(t):[]}requestHeaderClick(){this.reqHeaderCollapse=!this.reqHeaderCollapse}requestQueryParamsClick(){void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),this.reqQueryParamsCollapse=!this.reqQueryParamsCollapse}requestBodyClick(){void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),this.reqBodyCollapse=!this.reqBodyCollapse}responseHeaderClick(){this.resHeaderCollapse=!this.resHeaderCollapse}responseBodyClick(){void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),this.resBodyCollapse=!this.resBodyCollapse}logsBodyClick(){void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.logsBodyCollapse=!this.logsBodyCollapse}expandAll(){this.reqHeaderCollapse=!0,this.reqQueryParamsCollapse=!0,this.reqBodyCollapse=!0,this.resHeaderCollapse=!0,this.resQueryParamsCollapse=!0,this.resBodyCollapse=!0,this.logsBodyCollapse=!0,void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.cd.detectChanges()}collapseAll(){this.reqHeaderCollapse=!1,this.reqQueryParamsCollapse=!1,this.reqBodyCollapse=!1,this.resHeaderCollapse=!1,this.resQueryParamsCollapse=!1,this.resBodyCollapse=!1,this.logsBodyCollapse=!1,this.cd.detectChanges()}ngOnDestroy(){this.ec.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(F.b),e.Y36(M.s),e.Y36(D.e),e.Y36(e.sBO),e.Y36(ye.b),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-details-layout-model"]],decls:143,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogDetailsLayoutModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[2,"margin-top","1px"],[1,"fas","fa-info-circle","text-success","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Expand",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","text-danger","fas","fa-expand-alt",3,"click"],["pTooltip","Collapse",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","fas","fa-compress-alt",3,"click"],[1,"modal-body","p-4",2,"overflow-y","scroll"],[1,""],[1,"table","table-hover","table-striped","table-bordered","table-sm"],[2,"width","150px"],[2,"width","10px"],[1,"pl-2"],[3,"ngClass"],[4,"ngIf"],[3,"ngStyle"],["id","reqHeader",1,"cursor-pointer","logs-collapse-div",3,"click"],[2,"margin-left","10px"],[1,"float-right","mr-2",3,"hidden"],[1,"fas","fa-caret-down"],[1,"fas","fa-caret-up"],[1,"mt-1",2,"background","#373b3d","border-radius","10px",3,"hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["id","reqQueryParams",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"overflow-auto",2,"height","300px !important"],[3,"editorOptions","editorGenerated"],["id","reqBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resHeader",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","logsBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"ml-2"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",3,"hidden"],[3,"pSelectableRow"],[2,"white-space","nowrap"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._UZ(5,"i",5),e._uU(6,"Detail view "),e.qZA(),e.TgZ(7,"div",6)(8,"button",7)(9,"span",8),e._UZ(10,"i",9),e.qZA()(),e.TgZ(11,"span",10)(12,"i",11),e.NdJ("click",function(){return s.expandAll()}),e.qZA()(),e.TgZ(13,"span",12)(14,"i",13),e.NdJ("click",function(){return s.collapseAll()}),e.qZA()()()(),e.TgZ(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e._UZ(19,"col",17)(20,"col",18)(21,"col"),e.qZA(),e.TgZ(22,"tr")(23,"td"),e._uU(24,"URL"),e.qZA(),e.TgZ(25,"td"),e._uU(26," :"),e.qZA(),e.TgZ(27,"td",19),e._uU(28),e.qZA()(),e.TgZ(29,"tr")(30,"td"),e._uU(31,"Method"),e.qZA(),e.TgZ(32,"td"),e._uU(33," :"),e.qZA(),e.TgZ(34,"td",19)(35,"span",20),e._uU(36),e.qZA()()(),e.TgZ(37,"tr")(38,"td"),e._uU(39,"Type"),e.qZA(),e.TgZ(40,"td"),e._uU(41," :"),e.qZA(),e.TgZ(42,"td",19),e._uU(43),e.qZA()(),e.YNc(44,Te,7,1,"tr",21),e.TgZ(45,"tr")(46,"td"),e._uU(47,"Name"),e.qZA(),e.TgZ(48,"td"),e._uU(49," :"),e.qZA(),e.TgZ(50,"td",19),e._uU(51),e.qZA()(),e.TgZ(52,"tr")(53,"td"),e._uU(54,"Time"),e.qZA(),e.TgZ(55,"td"),e._uU(56," :"),e.qZA(),e.TgZ(57,"td",19),e._uU(58),e.ALo(59,"moment"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"Status"),e.qZA(),e.TgZ(63,"td"),e._uU(64," :"),e.qZA(),e.TgZ(65,"td",19)(66,"span",22),e._uU(67),e.qZA()()(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"Status Code"),e.qZA(),e.TgZ(71,"td"),e._uU(72," :"),e.qZA(),e.TgZ(73,"td",19)(74,"span",22),e._uU(75),e.qZA()()()()(),e.TgZ(76,"div",23),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(77,"span",24),e._uU(78,"Request Header "),e.qZA(),e.TgZ(79,"div",25),e._UZ(80,"i",26),e.qZA(),e.TgZ(81,"div",25),e._UZ(82,"i",27),e.qZA()(),e.TgZ(83,"div",28)(84,"p-table",29),e.YNc(85,Ze,5,0,"ng-template",30),e.YNc(86,xe,7,3,"ng-template",31),e.qZA()(),e.TgZ(87,"div",32),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(88,"span",24),e._uU(89,"Request Query params "),e.qZA(),e.TgZ(90,"div",25),e._UZ(91,"i",26),e.qZA(),e.TgZ(92,"div",25),e._UZ(93,"i",27),e.qZA()(),e.TgZ(94,"div",28)(95,"div",33)(96,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(97,"div",35),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(98,"span",24),e._uU(99,"Request Body "),e.qZA(),e.TgZ(100,"div",25),e._UZ(101,"i",26),e.qZA(),e.TgZ(102,"div",25),e._UZ(103,"i",27),e.qZA()(),e.TgZ(104,"div",28)(105,"div",33)(106,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(107,"div",36),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(108,"span",24),e._uU(109,"Response Header "),e.qZA(),e.TgZ(110,"div",25),e._UZ(111,"i",26),e.qZA(),e.TgZ(112,"div",25),e._UZ(113,"i",27),e.qZA()(),e.TgZ(114,"div",28)(115,"p-table",29),e.YNc(116,Ie,5,0,"ng-template",30),e.YNc(117,Se,7,3,"ng-template",31),e.qZA()(),e.TgZ(118,"div",37),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(119,"span",24),e._uU(120,"Response Body "),e.qZA(),e.TgZ(121,"div",25),e._UZ(122,"i",26),e.qZA(),e.TgZ(123,"div",25),e._UZ(124,"i",27),e.qZA()(),e.TgZ(125,"div",28)(126,"div",33)(127,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(128,"div",38),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(129,"span",39),e._uU(130,"Logs "),e.qZA(),e.TgZ(131,"div",25),e._UZ(132,"i",26),e.qZA(),e.TgZ(133,"div",25),e._UZ(134,"i",27),e.qZA()(),e.TgZ(135,"div",28)(136,"div",33)(137,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(138,"div",40)(139,"button",41),e._UZ(140,"i",42),e._uU(141," Cancel"),e.qZA()(),e._UZ(142,"p-progressSpinner",43),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(45,Le,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.GET,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.PUT,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.POST,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.category),e.xp6(1),e.Q6J("ngIf",null==s.inputData?null:s.inputData.tenantUsername),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(e.xi3(59,42,null==s.inputData?null:s.inputData.createdAt,s.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS)),e.xp6(8),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(50,O):e.DdM(51,k)),e.xp6(1),e.Oqu(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(52,O):e.DdM(53,k)),e.xp6(1),e.Oqu(null==s.inputData?null:s.inputData.statusCode),e.xp6(4),e.Q6J("hidden",s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.xp6(6),e.Q6J("hidden",s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqQueryParams),e.xp6(4),e.Q6J("hidden",s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqBody),e.xp6(4),e.Q6J("hidden",s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.xp6(6),e.Q6J("hidden",s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionResBody),e.xp6(4),e.Q6J("hidden",s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionLogs),e.xp6(5),e.Q6J("hidden",!s.loading.form))},dependencies:[_.mk,_.O5,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,w.u,Ae.d],encapsulation:2})}return a})();const qe=["logFilterPanelLayoutModelC"],Pe=["logDetailsLayoutModelC"];function Ne(a,o){if(1&a&&(e.TgZ(0,"div",7)(1,"span",8)(2,"h4",9),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function Ee(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function De(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",50)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.instanceClickData([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Fe(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Me(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function Re(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeDbClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.db," ")}}function we(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Re,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Ue(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function Oe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeCollectionClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ke(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function Je(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Qe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeApiClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Be(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Qe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function He(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Ye(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_1"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ge(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_2"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function Ke(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ge,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ve(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_3"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function je(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ve,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function We(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function Xe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.customApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ze(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Xe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function et(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function tt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.systemsApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function it(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,tt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function st(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function at(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.amEventsClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function nt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,at,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function lt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function ot(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.schedulersClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function rt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ot,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function dt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function pt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.wsEventClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameUI," ")}}function ct(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,pt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function ut(a,o){1&a&&(e.TgZ(0,"tr")(1,"th",59),e._uU(2,"Index"),e.qZA(),e.TgZ(3,"th",60),e._uU(4,"Date & Time"),e.qZA(),e.TgZ(5,"th",61),e._uU(6,"Method"),e.qZA(),e.TgZ(7,"th",62),e._uU(8,"Status"),e.qZA(),e.TgZ(9,"th",60),e._uU(10,"API Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"API Name"),e.qZA()())}const y=function(a){return{"selected-row":a}},gt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},mt=function(){return{color:"#26b47f"}},_t=function(){return{color:"#ed4b48"}};function ht(a,o){if(1&a&&(e.TgZ(0,"tr",63)(1,"td")(2,"div",64),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"div",65),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",65)(9,"span",66),e._uU(10),e.qZA()()(),e.TgZ(11,"td")(12,"div",67),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"div",65),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"div",65),e._uU(19),e.qZA()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.oxw(3);e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,y,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,gt,(null==t?null:t.requestMethod)===s.ERequestMethod.GET,(null==t?null:t.requestMethod)===s.ERequestMethod.PUT,(null==t?null:t.requestMethod)===s.ERequestMethod.POST,(null==t?null:t.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij("",null==t?null:t.requestMethod," "),e.xp6(2),e.Q6J("ngStyle",t.success?e.DdM(26,mt):e.DdM(27,_t))("ngClass",e.VKq(28,y,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const vt=function(){return[50,200,500]};function ft(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e._UZ(4,"i",12),e._uU(5," Log Table Summary"),e.qZA(),e.TgZ(6,"div",13)(7,"a",14),e._UZ(8,"img",15),e.qZA()(),e.TgZ(9,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.loadGridData(!1))}),e._UZ(10,"i",17),e._uU(11," Apply "),e.qZA(),e.TgZ(12,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(13,"i",19),e.qZA()(),e.TgZ(14,"div",20)(15,"table",21)(16,"tbody")(17,"tr")(18,"td",22),e._uU(19," Instances"),e.qZA(),e.TgZ(20,"td",23),e.YNc(21,Ee,2,0,"div",24),e.YNc(22,Fe,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Me,2,0,"div",24),e.YNc(25,we,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Ue,2,0,"div",24),e.YNc(28,ke,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,Je,2,0,"div",24),e.YNc(31,Be,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,He,3,0,"td",26),e.YNc(36,$e,2,1,"td",27),e.YNc(37,Ke,2,1,"td",27),e.YNc(38,je,2,1,"td",28),e.qZA(),e.TgZ(39,"tr")(40,"td",22),e._uU(41," Custom APIs"),e.qZA(),e.TgZ(42,"td",29),e.YNc(43,We,2,0,"div",24),e.YNc(44,ze,2,1,"div",25),e.qZA()(),e.TgZ(45,"tr")(46,"td",22),e._uU(47," System APIs"),e.qZA(),e.TgZ(48,"td",29),e.YNc(49,et,2,0,"div",24),e.YNc(50,it,2,1,"div",25),e.qZA()(),e.TgZ(51,"tr")(52,"td",22),e._uU(53," Events"),e.qZA(),e.TgZ(54,"td",29),e.YNc(55,st,2,0,"div",24),e.YNc(56,nt,2,1,"div",25),e.qZA()(),e.TgZ(57,"tr")(58,"td",22),e._uU(59," Schedulers"),e.qZA(),e.TgZ(60,"td",29),e.YNc(61,lt,2,0,"div",24),e.YNc(62,rt,2,1,"div",25),e.qZA()(),e.TgZ(63,"tr")(64,"td",22),e._uU(65," WebSocket Events"),e.qZA(),e.TgZ(66,"td",29),e.YNc(67,dt,2,0,"div",24),e.YNc(68,ct,2,1,"div",25),e.qZA()(),e.TgZ(69,"tr")(70,"td",30)(71,"span",31),e._uU(72,"Date"),e.qZA()(),e.TgZ(73,"td",32)(74,"p-calendar",33),e.NdJ("ngModelChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.gridFilter.rangeDates=s)}),e.qZA(),e.TgZ(75,"span",34),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearDate())}),e._UZ(76,"i",35),e.qZA()()()()()()(),e.TgZ(77,"div",36)(78,"div",11)(79,"span"),e._UZ(80,"img",37),e._uU(81," Log Table"),e.qZA(),e.TgZ(82,"span",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(83,"i",19),e.qZA(),e.TgZ(84,"span",39),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearAllLogsDialog())}),e._UZ(85,"i",40),e.qZA(),e.TgZ(86,"span",41),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.refresh())}),e._UZ(87,"i",42),e.qZA()()(),e.TgZ(88,"div",43)(89,"div",44)(90,"p-table",45),e.NdJ("selectionChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectedRows=s)})("dblclick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.dblClickLogs())}),e.YNc(91,ut,13,0,"ng-template",46),e.YNc(92,ht,20,34,"ng-template",47),e.qZA()()()()}if(2&a){const t=e.oxw(2);e.xp6(21),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstanceApis)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstanceApis||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections)),e.xp6(4),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.xp6(6),e.Q6J("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.xp6(16),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.DdM(35,vt))("value",t.responseData)}}function yt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function Ct(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,Ne,4,1,"div",5),e.YNc(2,ft,93,36,"div",0),e.YNc(3,yt,1,0,"p-progressSpinner",6),e.qZA()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.loading)}}let At=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;constantsCS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:E.D.ADD,eventChannel:new e.vpe,formData:void 0};instances;instanceIds;instanceNames;databases;databaseNames;collections;collectionNames;supportedAPIs;supportedApiNames;customApis;functionIds;customApiNames;systemsApis;systemApiIds;systemApiNames;amEvents;amEventIds;amEventNames;schedulersApis;schedulersIds;schedulersNames;wsEvents;wsEventIds;wsEventsNames;tpBundles;tpBundleMap=[];tpApiVersions;tpApiVersionMap=[];tpApis;tpApisMap=[];allTreeItemsMap={};value=new Date;range={start:null,end:null};logFilterPanelLayoutModelC;logDetailsLayoutModelC;gridFilter={queryParams:{},apisRegex:{},supportedAPIs:{}};ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v,C,m,I,S,A,Ft){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=g,this.schedulerS=h,this.amEventS=v,this.webSocketEventsS=C,this.dataProviderS=m,this.confirmationService=I,this.constantsS=S,this.constantsCS=A,this.cd=Ft,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.Z)(function*(s){if(s&&s.action===N.F.APPLY_FILTER){const n=t.gridFilter;t.gridFilter=s.data,t.gridFilter.rangeDates=n.rangeDates,yield t.loadInstances(s.data),yield t.logTableSummaryData(s.data),t.logFilterPanelLayoutModelC&&t.logFilterPanelLayoutModelC.hideModal(),yield t.loadGridData(!1)}});return function(s){return i.apply(this,arguments)}}())),this.generalS.setNewTitle("API Maker - Log Table Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.Z)(function*(){t.loading=!0;try{const i=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,!0===i.isLogsSetupDone?(t.isExternalLogsSetupDoneByRoot=!0,t.loadGridData(!1)):t.isExternalLogsSetupDoneByRoot=!1}catch{t.isExternalLogsSetupDoneByRoot=!1}t.cd.detectChanges()})()}loadGridData(t){var i=this;return(0,u.Z)(function*(){const s={find:{user:i.authCS.getUserId()},select:{createdAt:1,success:1,category:1,requestMethod:1,instanceName:1,databaseName:1,collectionName:1,instanceApiName:1,customApiName:1,systemApiName:1,eventName:1,tpApiBundleName:1,apiVersion:1,tpApiName:1,schedulerName:1,webSocketEventName:1,tenantUsername:1,url:1},sort:{_id:-1},limit:i.settings.maxRowsLimit};if(i.setDataForFilterModal(!1),i.gridFilter&&i.logFilterPanelLayoutModelC&&i.logFilterPanelLayoutModelC.setDataInObjectFromEventCenter(i.gridFilter),i.applyFilterInQuery(s.find,i.gridFilter),t){const l=i.responseData?.[0]?._id;l&&(s.find._id={$gt:l})}const n=yield i.logS.query(s).toPromise();if(t){for(const l of i.responseData)l.isNewInGrid=!1;i.responseData=[...n.data,...i.responseData];for(const l of n.data)i.doChangesInLogObject(l,!0)}else{i.responseData=n.data;for(const l of i.responseData)i.doChangesInLogObject(l,!1)}i.generalS.setNewTitle("API Maker - Log Table Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.R.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.R.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.R.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.R.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.R.INSTANCES};i?.apisRegex?.allInstances?t.$or.push(l):r.isEmpty(i?.queryParams?.instanceIds)||(l.instanceName={$in:this.instanceNames},r.isEmpty(i.queryParams.databaseNames)||(l.databaseName={$in:i.queryParams.databaseNames}),r.isEmpty(i.queryParams.collectionNames)||(l.collectionName={$in:i.queryParams.collectionNames}),r.isEmpty(i.queryParams.supportedApiNames)||(l.instanceApiName={$in:i.queryParams.supportedApiNames}),t.$or.push(l));const g={category:c.R.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(g);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const m=r.uniq(r.map(this.tpBundles,"bundleName")),I=r.uniq(r.map(this.tpApiVersions,"apiVersion")),S=r.uniq(r.map(this.tpApis,"apiName")),A={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(A.tpApiBundleName={$in:m}),r.isEmpty(I)||(A.apiVersion={$in:I}),r.isEmpty(S)||(A.tpApiName={$in:S}),t.$or.push(A)}const h={category:c.R.EVENTS};i?.apisRegex?.allEvents?t.$or.push(h):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.R.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const v={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(v):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const C={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(C):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.R.WEB_SOCKET_EVENT,webSocketEventName:{$in:this.wsEventsNames}}),i?.rangeDates?.[0]&&t.$and.push({createdAt:{$gte:i.rangeDates[0]}}),i?.rangeDates?.[1]&&t.$and.push({createdAt:{$lte:i.rangeDates[1]}}),r.isEmpty(t.$or)&&delete t.$or,r.isEmpty(t.$and)&&delete t.$and}logTableSummaryData(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.functions},select:{name:1}};i.customApis=(yield i.functionS.query(s).toPromise()).data,i.functionIds=r.map(i.customApis,p.iH._id),i.customApiNames=r.map(i.customApis,p.eb.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.iH._id);i.systemsApis=[];for(const m of t?.queryParams.systemApis)l[m]&&i.systemsApis.push(l[m]);i.systemApiIds=r.map(i.systemsApis,p.iH._id),i.systemApiNames=r.map(i.systemsApis,p.aV.name);const g={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(g).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.iH._id),i.amEventNames=r.map(i.amEvents,p.l0.name);const h={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(h).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.iH._id),i.schedulersNames=r.map(i.schedulersApis,p.qH.name);const v=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,C=r.keyBy(v,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)C[m]&&i.wsEvents.push(C[m]);i.wsEventIds=r.map(i.wsEvents,p.iH._id),i.wsEventsNames=r.map(i.wsEvents,p.of.id),i.calculateThirdPartyApiDataForUI(t)})()}calculateThirdPartyApiDataForUI(t){this.tpBundles=[],this.tpApiVersions=[],this.tpApis=[];for(const i of t.thirdPartyApis)i.level0?this.tpBundles.push(i):i.level1?this.tpApiVersions.push(i):i.level2&&this.tpApis.push(i);this.generalS.getMapOfAllItems(this.allTreeItemsMap,t.thirdPartyApis),this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApisMap=r.map(this.tpApis,p.iH._id)}loadInstances(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.instanceIds},select:{name:1},sort:{name:1}};i.instances=(yield i.instanceS.query(s).toPromise()).data,i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.Z)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.iH._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.Z)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.iH._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.Z)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.iH._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format(this.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=[[t.instanceName,t.tenantUsername].filter(s=>!!s).join("::"),t.databaseName,t.collectionName,t.instanceApiName].filter(s=>!!s).join(" \u2192 "):t.category===c.R.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.R.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.R.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.R.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.R.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=E.D.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.Z)(function*(){const s=[];for(const n of t){i.instances.splice(i.instances.indexOf(n),1);for(const l of i.databases)l.instanceId===n._id&&s.push(l)}i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),i.eventCenterS.filterInLog.instanceIds.next(i.instanceIds),i.removeDbClick(s)})()}removeDbClick(t){const i=[];for(const s of t){this.databases.splice(this.databases.indexOf(s),1);for(const n of this.collections)n.instanceName===s.instanceName&&n.databaseName===s.db&&i.push(n)}this.databaseNames=r.map(this.databases,p.iH._id),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames),this.removeCollectionClick(i)}removeCollectionClick(t){const i=[];for(const s of t){this.collections.splice(this.collections.indexOf(s),1);for(const n of this.supportedAPIs)s.instanceName&&n.databaseName===s.databaseName&&n.collectionName===s.name&&i.push(n)}this.collectionNames=r.map(this.collections,p.iH._id),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames),this.removeApiClick(i)}removeApiClick(t){for(const i of t)this.supportedAPIs.splice(this.supportedAPIs.indexOf(i),1);this.supportedApiNames=r.map(this.supportedAPIs,p.iH._id),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames),this.setRegexOnRemove()}setRegexOnRemove(){(0===this.instances.length||0===this.databases.length||0===this.collections.length||0===this.supportedAPIs.length)&&(this.gridFilter.apisRegex={})}customApisClick(t){this.customApis.splice(this.customApis.indexOf(t),1),this.functionIds=r.map(this.customApis,p.iH._id),this.customApiNames=r.map(this.customApis,p.eb.name),this.eventCenterS.filterInLog.functionIds.next(this.functionIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.iH._id),this.systemApiNames=r.map(this.systemsApis,p.aV.name),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds)}amEventsClick(t){this.amEvents.splice(this.amEvents.indexOf(t),1),this.amEventIds=r.map(this.amEvents,p.iH._id),this.amEventNames=r.map(this.amEvents,p.l0.name),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds)}schedulersClick(t){this.schedulersApis.splice(this.schedulersApis.indexOf(t),1),this.schedulersIds=r.map(this.schedulersApis,p.iH._id),this.schedulersNames=r.map(this.schedulersApis,p.qH.name),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds)}wsEventClick(t){this.wsEvents.splice(this.wsEvents.indexOf(t),1),this.wsEventIds=r.map(this.wsEvents,p.iH._id),this.wsEventsNames=r.map(this.wsEvents,p.of.id),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds)}npmPackageClickData(t,i){"L_1"===i?this.bundleAndVersionAndApiRemove(t):"L_2"===i?this.allTreeItemsMap[t._id]&&this.apiVersionClickData(this.allTreeItemsMap[t._id]):"L_3"===i&&this.allTreeItemsMap[t._id]&&this.tpApiClickData(this.allTreeItemsMap[t._id])}bundleAndVersionAndApiRemove(t){if(t.level0&&this.tpBundles.indexOf(t)>=0){for(const i of t.children||[])this.apiVersionClickData(i);this.tpBundles.splice(this.tpBundles.indexOf(t),1)}this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.apiVersionClickData(t)}apiVersionClickData(t){t.level1&&this.tpApiVersions.indexOf(t)>=0&&this.tpApiVersions.splice(this.tpApiVersions.indexOf(t),1),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApiClickData(t)}tpApiClickData(t){if(t.level1)for(const i of t.children||[])this.tpApis.indexOf(i)>=0&&this.tpApis.splice(this.tpApis.indexOf(i),1);else if(t.level0)for(const i of t.children||[])for(const s of i.children||[])this.tpApis.indexOf(s)>=0&&this.tpApis.splice(this.tpApis.indexOf(s),1);else t.level2&&this.tpApis.indexOf(t)>=0&&this.tpApis.splice(this.tpApis.indexOf(t),1);this.tpApisMap=r.map(this.tpApis,p.iH._id)}setDataForFilterModal(t){this.eventCenterS.filterInLog.instanceIds.next(this.instanceIds?this.instanceIds:[]),this.eventCenterS.filterInLog.functionIds.next(this.functionIds?this.functionIds:[]),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds?this.systemApiIds:[]),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds?this.amEventIds:[]),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds?this.schedulersIds:[]),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds?this.wsEventIds:[]),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames?this.databaseNames:[]),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames?this.collectionNames:[]),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames?this.supportedApiNames:[]);const i=[...this.tpBundleMap,...this.tpApiVersionMap,...this.tpApisMap];this.eventCenterS.filterInLog.thirdPartyApiIds.next(i.length?i:[]),t&&this.eventCenterS.filterInLog.refreshGrid.next(Math.random())}clearAllLogsDialog(){var t=this;return(0,u.Z)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.Z)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.Z)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.Z)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.iH._id;dblClickLogs(){var t=this;return(0,u.Z)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.Y36(D.e),e.Y36(Y.D),e.Y36(F.b),e.Y36(G.E),e.Y36(K.d),e.Y36(L.u),e.Y36(V.Z),e.Y36(j.l),e.Y36(W.a),e.Y36(X.B),e.Y36(Z.YP),e.Y36(b.L),e.Y36(M.s),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(qe,5),e.Gf(Pe,5)),2&i){let n;e.iGM(n=e.CRH())&&(s.logFilterPanelLayoutModelC=n.first),e.iGM(n=e.CRH())&&(s.logDetailsLayoutModelC=n.first)}},decls:5,vars:2,consts:[["class","pt-1 pl-1 pr-1",4,"ngIf"],[3,"data"],["logFilterPanelLayoutModelC",""],["logDetailsLayoutModelC",""],[1,"pt-1","pl-1","pr-1"],["class","overflow-hidden","style","height: calc(100vh - 46px);",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"overflow-hidden",2,"height","calc(100vh - 46px)"],[1,"text-center"],[1,"mt-5","pt-5"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-table.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","fa-fw","align-middle","text-success"],["tooltipPosition","left","pTooltip","Show Filter Modal",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fa","fa-filter","text-yellow","fa-fw"],[1,"card-body","p-0","overflow-auto",2,"height","278px"],[1,"table","table-striped","table-sm","mb-0"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2"],[1,"border-right"],["class","text-center text-success",4,"ngIf"],[4,"ngIf"],["colspan","4",4,"ngIf"],["class","border-right",4,"ngIf"],["colspan","2",4,"ngIf"],["colspan","4"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2","pt-2"],[1,"mt-1","d-inline-block"],["colspan","4",1,""],["appendTo","body","selectionMode","range","dateFormat","dd/mm/yy","inputId","filterDatePickerId",1,"form-control-sm",3,"ngModel","showIcon","showButtonBar","readonlyInput","ngModelChange"],["pTooltip","Clear",1,"cursor-pointer",3,"click"],[1,"fas","fa-ban","fa-fw","ml-4","align-middle","text-danger"],[1,"card","shadow-sm","h-100","mt-2"],["src","/assets/images/icons/log.svg","alt","Log Table",1,"fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Show Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Clear All Logs",1,"float-right","cursor-pointer","ml-3","text-danger",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw"],["tooltipPosition","left","pTooltip","Refresh Logs",1,"float-right","cursor-pointer","ml-3","text-success",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],[1,"overflow-hidden"],[2,"height","calc(100vh - 418px)","width","calc(100% - 2px)"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","paginator","rows","rowsPerPageOptions","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"text-center","text-success"],["class","ml-1","styleClass","bg-danger text-dark",4,"ngFor","ngForOf"],["styleClass","bg-danger text-dark",1,"ml-1"],[1,"fas","fa-times-circle","cursor-pointer",3,"click"],["class","ml-1","styleClass","bg-warning text-dark",4,"ngFor","ngForOf"],["styleClass","bg-warning text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-info text-dark",4,"ngFor","ngForOf"],["styleClass","bg-info text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-light text-dark",4,"ngFor","ngForOf"],["styleClass","bg-light text-dark",1,"ml-1"],["colspan","2"],[1,"text-center",2,"width","80px"],[2,"width","200px"],[2,"width","130px"],[2,"width","100px"],[3,"pSelectableRow"],[1,"text-center",3,"ngClass"],[1,"text-nowrap",3,"ngClass"],[1,"small","font-weight-bold","mr-3",3,"ngClass"],[1,"text-nowrap",3,"ngStyle","ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.YNc(0,Ct,4,3,"div",0),e._UZ(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Q6J("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("data",s.data))},dependencies:[R.JJ,R.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,w.u,z.f,ee.A,fe,be],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Tt=d(70292),Zt=d(1678),xt=d(64211),It=d(21434),St=d(84186),Lt=d(95765),bt=d(2777),qt=d(57705),Pt=d(31558),Nt=d(38125);const Et=[{path:"main",component:At,canActivate:[B.P]}];let Dt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[J.Bz.forChild(Et),Q.u,Tt.ApiTestingM,Zt.DashboardM,xt.DbCellM,It.B,St.SystemApiM,Lt.FunctionManM,bt.u,qt.L,Pt.SchedulerManM,Nt.AmEventsM,H.WebSocketEventsM]})}return a})()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[885],{38487:(ee,Z,s)=>{s.d(Z,{L:()=>k});var g=s(15861),e=s(60095),p=s(51162),u=s(90328),m=s(33157),M=s(39490),t=s(94946),C=s(99961),S=s(31042),I=s(77240),A=s(27414),y=s(95852),F=s(62304),O=s(81429),L=s(25405),P=s(96814),w=s(32660),b=s(97680),W=s(53965),K=s(38057);function N(l,h){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",34),t._uU(2," Add Interval"),t.qZA())}function B(l,h){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",35),t._uU(2," View Interval"),t.qZA())}function J(l,h){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",36),t._uU(2," Edit Interval"),t.qZA())}function Y(l,h){1&l&&(t.TgZ(0,"div",39)(1,"a",40),t._uU(2,"Reference"),t.qZA()())}function V(l,h){if(1&l){const i=t.EpF();t.TgZ(0,"div",15)(1,"label",16),t._uU(2,"Custom"),t.qZA(),t.TgZ(3,"div",14)(4,"input",37),t.NdJ("blur",function(d){t.CHM(i);const D=t.oxw();return t.KtG(D.validateCronExpression(d))}),t.qZA(),t.YNc(5,Y,3,0,"div",38),t.qZA()()}if(2&l){const i=t.oxw();t.xp6(5),t.Q6J("ngIf",i.form.get("timeInterval").value===i.ESchedulerInterval.CUSTOM)}}function U(l,h){1&l&&(t.TgZ(0,"div",41)(1,"div",42)(2,"div",43)(3,"div",44),t._uU(4,"Custom CRON writing guide"),t.qZA(),t.TgZ(5,"div",45)(6,"table",46)(7,"tr")(8,"td",47),t._uU(9,"Seconds"),t.qZA(),t.TgZ(10,"td",48),t._uU(11," : "),t.qZA(),t.TgZ(12,"td",49),t._uU(13,"0-59"),t.qZA()(),t.TgZ(14,"tr")(15,"td",47),t._uU(16,"Minutes"),t.qZA(),t.TgZ(17,"td",48),t._uU(18," : "),t.qZA(),t.TgZ(19,"td",49),t._uU(20,"0-59"),t.qZA()(),t.TgZ(21,"tr")(22,"td",47),t._uU(23,"Hours"),t.qZA(),t.TgZ(24,"td",48),t._uU(25," : "),t.qZA(),t.TgZ(26,"td",49),t._uU(27,"0-23"),t.qZA()(),t.TgZ(28,"tr")(29,"td",47),t._uU(30,"Day of Month"),t.qZA(),t.TgZ(31,"td",48),t._uU(32," : "),t.qZA(),t.TgZ(33,"td",49),t._uU(34,"1-31"),t.qZA()(),t.TgZ(35,"tr")(36,"td",47),t._uU(37,"Months"),t.qZA(),t.TgZ(38,"td",48),t._uU(39," : "),t.qZA(),t.TgZ(40,"td",49),t._uU(41,"0-11 (Jan-Dec)"),t.qZA()(),t.TgZ(42,"tr")(43,"td",47),t._uU(44,"Day of Week"),t.qZA(),t.TgZ(45,"td",48),t._uU(46," : "),t.qZA(),t.TgZ(47,"td",49),t._uU(48,"0-6 (Sun-Sat)"),t.qZA()()()()(),t.TgZ(49,"div",50)(50,"span"),t._uU(51,"Note:- "),t.qZA(),t.TgZ(52,"span")(53,"a",40),t._uU(54,"Reference"),t.qZA(),t._uU(55," is having only 5 fields and this cron expression support 6 fields, precision upto seconds."),t.qZA()()()())}function q(l,h){1&l&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function Q(l,h){1&l&&(t.TgZ(0,"span"),t._uU(1,"Update interval"),t.qZA())}function G(l,h){if(1&l){const i=t.EpF();t.TgZ(0,"button",51),t.NdJ("click",function(){t.CHM(i);const d=t.oxw();return t.KtG(d.save())}),t._UZ(1,"i",52),t.YNc(2,q,2,0,"span",4),t.YNc(3,Q,2,0,"span",4),t.qZA()}if(2&l){const i=t.oxw();t.Q6J("disabled",i.form.invalid),t.xp6(2),t.Q6J("ngIf",i.data.mode===i.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",i.data.mode===i.EFormMode.EDIT)}}function x(l,h){1&l&&t._UZ(0,"p-progressSpinner",53)}let k=(()=>{class l{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;dataProviderS;eventCenterCS;data;loading={form:!1};EFormMode=u.D;form;ESchedulerInterval=M.M;subscriptions=[];intervalList=[];timezoneList=[];constructor(i,c,d,D,R,H,j,z,X){this.fb=i,this.ns=c,this.schedulerS=d,this.generalS=D,this.constantsS=R,this.authCS=H,this.monacoS=j,this.dataProviderS=z,this.eventCenterCS=X}ngOnInit(){var i=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.timezoneList=this.dataProviderS.getTimeZones(),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var c=(0,g.Z)(function*(d){d&&(i.form.enable(),d.action===m.F.OPEN_FORM_IN_EDIT_MODE?(i.form.reset(),i.form.patchValue(i.data.formData)):d.action===m.F.OPEN_FORM_IN_VIEW_MODE?(i.form.patchValue(i.data.formData),i.form.reset(),i.form.disable()):d.action===m.F.OPEN_FORM_IN_ADD_MODE&&(i.form.reset(),i.form.get("active").setValue(!1)))});return function(d){return c.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({timeZone:[null,[e.kI.required]],timeInterval:[null,[e.kI.required]],customInterval:[null,[]],active:[null,[]]}),this.manageValidations()}showModal(){$("#idIntervals").modal("show"),this.form.get(p._h.active).setValue(!0)}hideModal(){$("#idIntervals").modal("hide")}manageValidations(){const i=this.form.get("timeInterval"),c=this.form.get("customInterval");i.valueChanges.subscribe(d=>{c.setValidators(d===M.M.CUSTOM?[e.kI.required]:[]),c.updateValueAndValidity()})}validateCronExpression(i){var c=this;return(0,g.Z)(function*(){const d=c.form.get("customInterval"),D=d.value;(yield c.schedulerS.isCronExpressionValid(D).toPromise()).data.valid||d.setValue("")})()}save(){var i=this;return(0,g.Z)(function*(){const c=i.form.value;try{if(i.data.mode===u.D.ADD)i.eventCenterCS.intervalArr.next(c);else if(i.data.mode===u.D.EDIT){const d=Object.assign(i.data.formData,c);i.eventCenterCS.intervalArr.next(d)}i.data.eventChannel.emit({action:i.data.mode===u.D.ADD?m.F.SAVED:m.F.UPDATED})}catch(d){console.log(d)}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(c){return new(c||l)(t.Y36(e.qu),t.Y36(C.W),t.Y36(S.Z),t.Y36(I.b),t.Y36(A.L),t.Y36(y.D),t.Y36(F.b),t.Y36(O.B),t.Y36(L.M))};static \u0275cmp=t.Xpm({type:l,selectors:[["app-intervals-add-edit"]],inputs:{data:"data"},decls:50,vars:13,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idIntervals","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html#interval-time","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-8"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-2","input-group","input-group-sm"],[1,"input-group-prepend"],["id","spanTimeInterval",1,"input-group-text","form-control","form-control-sm"],[1,"col-10","pl-0"],["formControlName","timeInterval","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-4"],["class","row",4,"ngIf"],["formControlName","timeZone","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-6","col-form-label","col-form-label-sm","text-right"],[1,"col-6","col-form-label","col-form-label-sm","align-middle","mb-0","pt-1"],["formControlName","active",3,"binary"],["class","form-group row mt-5",4,"ngIf"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","customInterval","name","customInterval","placeholder","Custom","spellcheck","false","type","text",1,"form-control","form-control-sm",3,"blur"],["class","text-center",4,"ngIf"],[1,"text-center"],["href","https://crontab.guru","target","_blank",1,"text-info",2,"text-decoration","underline"],[1,"form-group","row","mt-5"],[1,"col-12"],[1,"border"],[1,"h6","border-bottom","p-3","m-0","text-center"],[1,"p-3","font-monospaced"],[1,"table","table-sm","table-condensed","w-100","mb-0"],[1,"text-right","pr-1","border-0",2,"width","49%"],[1,"border-0",2,"width","10px"],[1,"border-0"],[1,"text-center","small","border-left","border-right","border-bottom","p-2"],["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(c,d){1&c&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,N,3,0,"span",4),t.YNc(5,B,3,0,"span",4),t.YNc(6,J,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6)(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"a",9),t._UZ(12,"img",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"form",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16),t._uU(19,"Time Interval"),t.qZA(),t.TgZ(20,"div",14)(21,"div",15)(22,"div",17)(23,"div",18)(24,"span",19),t._uU(25,"Every "),t.qZA()()(),t.TgZ(26,"div",20),t._UZ(27,"p-dropdown",21),t.qZA()()()()(),t.TgZ(28,"div",22),t.YNc(29,V,6,1,"div",23),t.qZA()(),t.TgZ(30,"div",13)(31,"div",14)(32,"div",15)(33,"label",16),t._uU(34,"Time Zone"),t.qZA(),t.TgZ(35,"div",14),t._UZ(36,"p-dropdown",24),t.qZA()()(),t.TgZ(37,"div",22)(38,"div",15)(39,"label",25),t._uU(40,"Active"),t.qZA(),t.TgZ(41,"label",26),t._UZ(42,"p-checkbox",27),t.qZA()()()(),t.YNc(43,U,56,0,"div",28),t.qZA()(),t.TgZ(44,"div",29)(45,"button",30),t._UZ(46,"i",31),t._uU(47," Close"),t.qZA(),t.YNc(48,G,4,3,"button",32),t.qZA(),t.YNc(49,x,1,0,"p-progressSpinner",33),t.qZA()()()),2&c&&(t.xp6(4),t.Q6J("ngIf",d.data.mode===d.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",d.data.mode===d.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",d.data.mode===d.EFormMode.EDIT),t.xp6(8),t.Q6J("formGroup",d.form),t.xp6(13),t.Q6J("options",d.intervalList)("filter",!0),t.xp6(2),t.Q6J("ngIf",d.form.get("timeInterval").value===d.ESchedulerInterval.CUSTOM),t.xp6(7),t.Q6J("options",d.timezoneList)("filter",!0),t.xp6(6),t.Q6J("binary",!0),t.xp6(1),t.Q6J("ngIf",d.form.get("timeInterval").value===d.ESchedulerInterval.CUSTOM),t.xp6(5),t.Q6J("ngIf",d.data.mode!==d.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",d.loading.form))},dependencies:[e._Y,e.Fj,e.JJ,e.JL,e.sg,e.u,P.O5,w.y,b.G,W.Lt,K.XZ],encapsulation:2})}return l})()},98479:(ee,Z,s)=>{s.d(Z,{o:()=>ve});var g=s(15861),e=s(94946),p=s(60095),u=s(33157),m=s(90328),M=s(6990),C=s(39490),S=s(59361),I=s(51162),A=s(20553),y=s(45085),F=s(91601),O=s(3531),L=s(39989),P=s(99961),w=s(31042),b=s(77240),W=s(27414),K=s(95852),N=s(62304),B=s(53429),J=s(25405),Y=s(32915),V=s(81429),U=s(96814),q=s(32660),Q=s(5860),G=s(756),x=s(95431),k=s(85219),l=s(97680),h=s(14844),i=s(33259),c=s(38057),d=s(25025),D=s(38487);const R=["intervalsAddEditC"],H=["insertCodeModalC"],j=["monacoEditorModalC"];function z(r,f){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",52),e._uU(2," Add Scheduler"),e.qZA())}function X(r,f){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",53),e._uU(2," View Scheduler"),e.qZA())}function te(r,f){if(1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",54),e._uU(2," Edit Scheduler "),e.TgZ(3,"span",55),e._uU(4),e.qZA()()),2&r){const o=e.oxw();e.xp6(4),e.Oqu(o.form.get("name").value)}}function ae(r,f){if(1&r&&(e.TgZ(0,"span",56),e._uU(1),e.qZA()),2&r){const o=e.oxw();e.xp6(1),e.hij("The system will allow ",o.form.get(o.ISchedulerProps.schedulerTimeoutInMinutes).value," minutes for the scheduler to complete its work.")}}function oe(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"div",57)(1,"app-monaco-editor",58),e.NdJ("editorGenerated",function(n){e.CHM(o);const _=e.oxw();return e.KtG(_.editorGenerated(n))}),e.qZA()()}if(2&r){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptionsSchedulers)}}function ne(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"span",59),e.NdJ("click",function(){e.CHM(o);const n=e.oxw();return e.KtG(n.add())}),e._UZ(1,"i",60),e.qZA()}}function se(r,f){1&r&&(e.TgZ(0,"tr"),e._UZ(1,"th",61),e.TgZ(2,"th"),e._uU(3,"Time Interval"),e.qZA(),e.TgZ(4,"th"),e._uU(5,"Time Zone"),e.qZA(),e.TgZ(6,"th"),e._uU(7,"Custom Interval"),e.qZA(),e.TgZ(8,"th",62),e._uU(9,"Action"),e.qZA()())}function re(r,f){1&r&&e._UZ(0,"i",67)}function ie(r,f){1&r&&e._UZ(0,"i",68)}function de(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"div",69)(1,"button",70),e.NdJ("click",function(n){e.CHM(o);const _=e.oxw().$implicit,v=e.oxw();return e.KtG(v.edit(n,_))}),e._UZ(2,"i",71),e.qZA(),e.TgZ(3,"button",72),e.NdJ("click",function(n){e.CHM(o);const _=e.oxw().$implicit,v=e.oxw();return e.KtG(v.deleteInterval(n,_))}),e._UZ(4,"i",73),e.qZA()()}}function le(r,f){if(1&r&&(e.TgZ(0,"tr",63)(1,"td"),e.YNc(2,re,1,0,"i",64),e.YNc(3,ie,1,0,"i",65),e.qZA(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td")(10,"span"),e._uU(11),e.qZA()(),e.TgZ(12,"td"),e.YNc(13,de,5,0,"div",66),e.qZA()()),2&r){const o=f.$implicit,a=e.oxw();e.Q6J("pSelectableRow",o),e.xp6(2),e.Q6J("ngIf",o.active),e.xp6(1),e.Q6J("ngIf",!o.active),e.xp6(3),e.hij("Every ",a.intervalListMap[o.timeInterval].name,""),e.xp6(2),e.Oqu(o.timeZone),e.xp6(3),e.Oqu(a.intervalListMap[o.timeInterval].name===a.ESchedulerInterval.CUSTOM?o.customInterval:""),e.xp6(2),e.Q6J("ngIf",!o.isReadOnly&&a.data.mode!==a.EFormMode.VIEW)}}function _e(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"a",74),e.NdJ("click",function(){e.CHM(o);const n=e.oxw();return e.KtG(n.viewError())}),e._uU(1,"View error"),e.qZA()}}function ce(r,f){1&r&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function me(r,f){1&r&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function ue(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"button",75),e.NdJ("click",function(){e.CHM(o);const n=e.oxw();return e.KtG(n.save(!0))}),e._UZ(1,"i",76),e.YNc(2,ce,2,0,"span",4),e.YNc(3,me,2,0,"span",4),e.qZA()}if(2&r){const o=e.oxw();e.Q6J("disabled",o.form.invalid),e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function pe(r,f){1&r&&e._UZ(0,"p-progressSpinner",77)}const fe=function(r){return{"text-danger font-weight-bold":r}};let ve=(()=>{class r{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;instanceS;notificationS;eventCenterCS;eventCenterS;dataProviderS;generalCS;data;loading={form:!1};EFormMode=m.D;form;subscriptions=[];ESchedulerInterval=C.M;editorSchedulers;editorOptionsSchedulers={readOnly:!1,language:"typescript",contextmenu:!0};intervalList=[];selectedRows=[];rows=[];rowsMap={};dataItem={mode:m.D.ADD,eventChannel:new e.vpe,formData:void 0};intervalListMap={};gridKey="id";idCounter=0;BE_HOST_PORT=A.N.BE_HOST_PORT;DOCS_HOST_PORT=A.N.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};ISchedulerProps=I.qH;intervalsAddEditC;insertCodeModalC;viewDockerfileModelC;constructor(o,a,n,_,v,T,E,he,Ee,ge,Me,Ce,Ie){this.fb=o,this.ns=a,this.schedulerS=n,this.generalS=_,this.constantsS=v,this.authCS=T,this.monacoS=E,this.instanceS=he,this.notificationS=Ee,this.eventCenterCS=ge,this.eventCenterS=Me,this.dataProviderS=Ce,this.generalCS=Ie}ngOnInit(){var o=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.intervalListMap=M.keyBy(this.intervalList,I.GR.id),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,g.Z)(function*(n){if(n)if(o.form.enable(),n.action===u.F.OPEN_FORM_IN_EDIT_MODE)yield o.updateEditCommon();else if(n.action===u.F.OPEN_FORM_IN_VIEW_MODE)yield o.updateEditCommon(),o.form.disable();else if(n.action===u.F.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.rows=[];const _=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,y.R.SCHEDULERS).toPromise();o.generalCS.setValueInEditor(o,"editorSchedulers",_.data),o.form.get(I.qH.isActive).setValue(!1),o.form.get(I.qH.runOnNativeProcess).setValue(!1)}});return function(n){return a.apply(this,arguments)}}())),this.subscriptions.push(this.dataItem.eventChannel.subscribe(function(){var a=(0,g.Z)(function*(n){n&&(o.form.enable(),(n.action===u.F.SAVED||n.action===u.F.UPDATED)&&(o.intervalsAddEditC.hideModal(),o.loadGridData()))});return function(n){return a.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterCS.intervalArr.subscribe(a=>{this.dataItem.mode===m.D.ADD&&(this.rows.unshift(a),this.loadGridData())}))}createForm(){this.form=this.fb.group({name:[null,[p.kI.required]],schedulerTimeoutInMinutes:[null,[p.kI.min(1),p.kI.max(43200)]],isActive:[null,[]],runOnNativeProcess:[null,[]]})}showInsertCodeModel(){this.generalCS.messageReceivedFor=S.H.All,this.insertCodeModalC.showModal(O.b.SchedulerManFormC)}updateEditCommon(){var o=this;return(0,g.Z)(function*(){const a=yield o.schedulerS.queryOne({find:{guid:o.data.formData.guid,user:o.authCS.gUser._id}});o.form.reset(),o.form.patchValue(a),o.rows=a.intervalArr||[],o.generalCS.setValueInEditor(o,"editorSchedulers",a.schedulerCode||""),o.loadGridData()})()}loadGridData(){this.selectedRows=[];for(const o of this.rows)o.id=this.idCounter++;this.rowsMap=M.keyBy(this.rows,this.gridKey)}reqActiveIndex=0;tabIndexReq={Basic:0,Code:1,Intervals:2};save(o){var a=this;return(0,g.Z)(function*(){const n=a.form.getRawValue();let _;_=a.data.formData&&a.data.formData._id?yield a.schedulerS.queryOne({find:{guid:a.data.formData.guid,user:a.authCS.gUser._id}}):{};const v=M.find(_.versions||[],{isActive:!0});v&&(v.apiCodeStr=a.editorSchedulers.getValue());const T=Object.assign({},_,n);T.user=a.authCS.getUserId(),T.intervalArr=a.rows,T.schedulerCode=a.editorSchedulers.getValue();for(const E of T?.versions||[])E.version=E.version.toString();try{let E;a.loading.form=!0,a.lastError=void 0,a.data.mode===m.D.ADD?E=yield a.schedulerS.post(T).toPromise():a.data.mode===m.D.EDIT&&(E=yield a.schedulerS.put(_._id,T,{select:I.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===m.D.ADD?a.constantsS.schedulers.addSuccess:a.constantsS.schedulers.editSuccess),a.data.eventChannel.emit({action:a.data.mode===m.D.ADD?u.F.SAVED:u.F.UPDATED,closeModal:o}),a.form.get("name").disable(),a.eventCenterS.schedulerSavedAndUpdate.next(!0),a.loading.form=!1}catch(E){"Please Provide Interval."===E.error.errors[0].message&&(a.reqActiveIndex=a.tabIndexReq.Intervals),a.loading.form=!1,a.ns.showErrorFromResponse(E.error||E,"Unable to save scheduler."),a.lastError=E.error}})()}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idSchedulerForm").modal("show")},100)}hideModal(){$("#idSchedulerForm").modal("hide")}add(){this.dataItem.formData=void 0,this.dataItem.mode=m.D.ADD,this.dataItem.eventChannel.emit({action:u.F.OPEN_FORM_IN_ADD_MODE}),this.intervalsAddEditC.showModal()}view(){this.dataItem.formData=this.rowsMap[this.selectedRows[0]],this.dataItem.mode=m.D.VIEW,this.dataItem.eventChannel.emit({action:u.F.OPEN_FORM_IN_VIEW_MODE}),this.intervalsAddEditC.showModal()}edit(o,a){o.stopPropagation(),o.preventDefault(),this.dataItem.formData=a,this.dataItem.mode=m.D.EDIT,this.dataItem.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),this.intervalsAddEditC.showModal()}deleteInterval(o,a){o.stopPropagation(),o.preventDefault(),this.rows.splice(this.rows.indexOf(a),1),this.notificationS.showSuccess(this.constantsS.interval.removePermanent)}editorGenerated(o){var a=this;return(0,g.Z)(function*(){a.editorSchedulers=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,n=>{a.form.valid&&a.save(!0)}),a.monacoS.addInsertCodeKeyBinding(o,n=>{a.generalCS.messageReceivedFor=S.H.All,a.data.mode!==m.D.VIEW&&a.insertCodeModalC.showModal(O.b.SchedulerManFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(n=>{n.type&&n.type===L.g.TEXT_COPIED&&n.componentName===O.b.SchedulerManFormC&&(a.monacoS.insertAtCursor(o,n.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),F.d.json)}dblClickIntervalOpenModel(o){this.selectedRows.length&&this.data.mode!==m.D.VIEW&&this.edit(o,this.selectedRows[0])}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.schedulerSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||r)(e.Y36(p.qu),e.Y36(P.W),e.Y36(w.Z),e.Y36(b.b),e.Y36(W.L),e.Y36(K.D),e.Y36(N.b),e.Y36(B.E),e.Y36(P.W),e.Y36(J.M),e.Y36(Y.u),e.Y36(V.B),e.Y36(b.b))};static \u0275cmp=e.Xpm({type:r,selectors:[["app-w-scheduler-man-form"]],viewQuery:function(a,n){if(1&a&&(e.Gf(R,5),e.Gf(H,5),e.Gf(j,5)),2&a){let _;e.iGM(_=e.CRH())&&(n.intervalsAddEditC=_.first),e.iGM(_=e.CRH())&&(n.insertCodeModalC=_.first),e.iGM(_=e.CRH())&&(n.viewDockerfileModelC=_.first)}},inputs:{data:"data"},decls:69,vars:30,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idSchedulerForm","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"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.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"],[1,"w-100",3,"activeIndex","activeIndexChange"],["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"],["formControlName","schedulerTimeoutInMinutes","name","schedulerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm",3,"min"],["class","mt-1px small text-info",4,"ngIf"],[1,"align-middle","mb-0","pt-1"],["formControlName","isActive","label","Active",3,"binary"],["formControlName","runOnNativeProcess","pTooltip","Code will run on actual process and not in sandbox, so be careful with code. You can not use sandbox packages in this mode. You can use all Node.js packages + some packages on which API Maker is dependent on. You can use features of global variable 'g'.","label","Run Native",3,"ngClass","binary"],["header","Code"],["class","overflow-hidden mb-3","style","height: calc(100vh - 270px);",4,"ngIf"],["header","Intervals"],[1,"overflow-auto",2,"height","calc(100vh - 206px)"],[1,"card","shadow-sm","h-100","mr-1","ml-1"],[1,"card-header"],[1,"fas","fa-stopwatch","text-warning","fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html#create-intervals-in-scheduler","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","pTooltip","Add New",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","200px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[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,"data"],["intervalsAddEditC",""],[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,"mt-1px","small","text-info"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 270px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[2,"width","40px"],[2,"width","100px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],[1,"text-center"],["pTooltip","Edit",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Delete",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw","cursor-pointer"],["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,n){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,z,3,0,"span",4),e.YNc(5,X,3,0,"span",4),e.YNc(6,te,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return n.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return n.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"p-tabView",14),e.NdJ("activeIndexChange",function(v){return n.reqActiveIndex=v}),e.TgZ(17,"p-tabPanel",15)(18,"form",16)(19,"div",17)(20,"label",18),e._uU(21,"Name"),e.qZA(),e.TgZ(22,"div",19),e._UZ(23,"input",20),e.qZA()(),e.TgZ(24,"div",17)(25,"label",18),e._uU(26,"Timeout in minutes"),e.qZA(),e.TgZ(27,"div",19),e._UZ(28,"input",21),e.YNc(29,ae,2,1,"span",22),e.qZA()(),e.TgZ(30,"div",17),e._UZ(31,"label",18),e.TgZ(32,"div",19)(33,"label",23),e._UZ(34,"p-checkbox",24),e.qZA()()(),e.TgZ(35,"div",17),e._UZ(36,"label",18),e.TgZ(37,"div",19)(38,"label",23),e._UZ(39,"p-checkbox",25),e.qZA()()()()(),e.TgZ(40,"p-tabPanel",26),e.YNc(41,oe,2,2,"div",27),e.qZA(),e.TgZ(42,"p-tabPanel",28)(43,"div",29)(44,"div",30)(45,"div",31)(46,"span"),e._UZ(47,"i",32),e._uU(48," Interval"),e.qZA(),e.TgZ(49,"a",33),e._UZ(50,"img",34),e.qZA(),e.YNc(51,ne,2,0,"span",35),e.qZA(),e.TgZ(52,"div",36)(53,"p-table",37),e.NdJ("selectionChange",function(v){return n.selectedRows=v})("dblclick",function(v){return n.dblClickIntervalOpenModel(v)}),e.YNc(54,se,10,0,"ng-template",38),e.YNc(55,le,14,7,"ng-template",39),e.qZA()()()()()()(),e.TgZ(56,"div",40),e.YNc(57,_e,2,0,"a",41),e.TgZ(58,"button",42),e.NdJ("click",function(){return n.hideModal()}),e._UZ(59,"i",43),e._uU(60," Close"),e.qZA(),e.YNc(61,ue,4,3,"button",44),e.qZA(),e.YNc(62,pe,1,0,"p-progressSpinner",45),e.qZA()()(),e._UZ(63,"app-intervals-add-edit",46,47)(65,"app-insert-code-modal",48,49)(67,"app-monaco-editor-modal",50,51)),2&a&&(e.xp6(4),e.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT),e.xp6(10),e.Q6J("activeIndex",n.reqActiveIndex),e.xp6(2),e.Q6J("formGroup",n.form),e.xp6(10),e.Q6J("min",1),e.xp6(1),e.Q6J("ngIf",n.form.get(n.ISchedulerProps.schedulerTimeoutInMinutes).value),e.xp6(5),e.Q6J("binary",!0),e.xp6(5),e.Q6J("ngClass",e.VKq(28,fe,!0===n.form.get(n.ISchedulerProps.runOnNativeProcess).value))("binary",!0),e.xp6(2),e.Q6J("ngIf",n.shouldLoadMonacoEditor),e.xp6(10),e.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(4),e.Q6J("ngIf",n.lastError),e.xp6(4),e.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.loading.form),e.xp6(1),e.Q6J("data",n.dataItem),e.xp6(2),e.Q6J("frameId","idInsertCodeSchedulers")("modalId","idInsertCodeSchedulersForm")("docsHostPort",n.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInScheduler")("editorOptionsMonacoEditorModal",n.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[p._Y,p.Fj,p.wV,p.JJ,p.JL,p.qQ,p.sg,p.u,U.mk,U.O5,q.y,Q.P,G.O,x.iA,k.jx,x.Ei,l.G,h.xf,h.x4,i.u,c.XZ,d.A,D.L],encapsulation:2})}return r})()},10885:(ee,Z,s)=>{s.d(Z,{R:()=>t});var g=s(17017),u=(s(98479),s(38487),s(44950)),m=s(94946);let t=(()=>{class C{static \u0275fac=function(A){return new(A||C)};static \u0275mod=m.oAB({type:C});static \u0275inj=m.cJS({imports:[g.u,u.A]})}return C})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[885],{38487:(ee,Z,s)=>{s.d(Z,{L:()=>k});var g=s(15861),e=s(60095),p=s(51162),u=s(90328),m=s(33157),M=s(39490),t=s(94946),C=s(99961),S=s(31042),I=s(77240),A=s(27414),y=s(95852),F=s(45809),O=s(81429),L=s(25405),P=s(96814),w=s(32660),b=s(97680),W=s(53965),K=s(38057);function N(l,h){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",34),t._uU(2," Add Interval"),t.qZA())}function B(l,h){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",35),t._uU(2," View Interval"),t.qZA())}function J(l,h){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",36),t._uU(2," Edit Interval"),t.qZA())}function Y(l,h){1&l&&(t.TgZ(0,"div",39)(1,"a",40),t._uU(2,"Reference"),t.qZA()())}function V(l,h){if(1&l){const i=t.EpF();t.TgZ(0,"div",15)(1,"label",16),t._uU(2,"Custom"),t.qZA(),t.TgZ(3,"div",14)(4,"input",37),t.NdJ("blur",function(d){t.CHM(i);const D=t.oxw();return t.KtG(D.validateCronExpression(d))}),t.qZA(),t.YNc(5,Y,3,0,"div",38),t.qZA()()}if(2&l){const i=t.oxw();t.xp6(5),t.Q6J("ngIf",i.form.get("timeInterval").value===i.ESchedulerInterval.CUSTOM)}}function U(l,h){1&l&&(t.TgZ(0,"div",41)(1,"div",42)(2,"div",43)(3,"div",44),t._uU(4,"Custom CRON writing guide"),t.qZA(),t.TgZ(5,"div",45)(6,"table",46)(7,"tr")(8,"td",47),t._uU(9,"Seconds"),t.qZA(),t.TgZ(10,"td",48),t._uU(11," : "),t.qZA(),t.TgZ(12,"td",49),t._uU(13,"0-59"),t.qZA()(),t.TgZ(14,"tr")(15,"td",47),t._uU(16,"Minutes"),t.qZA(),t.TgZ(17,"td",48),t._uU(18," : "),t.qZA(),t.TgZ(19,"td",49),t._uU(20,"0-59"),t.qZA()(),t.TgZ(21,"tr")(22,"td",47),t._uU(23,"Hours"),t.qZA(),t.TgZ(24,"td",48),t._uU(25," : "),t.qZA(),t.TgZ(26,"td",49),t._uU(27,"0-23"),t.qZA()(),t.TgZ(28,"tr")(29,"td",47),t._uU(30,"Day of Month"),t.qZA(),t.TgZ(31,"td",48),t._uU(32," : "),t.qZA(),t.TgZ(33,"td",49),t._uU(34,"1-31"),t.qZA()(),t.TgZ(35,"tr")(36,"td",47),t._uU(37,"Months"),t.qZA(),t.TgZ(38,"td",48),t._uU(39," : "),t.qZA(),t.TgZ(40,"td",49),t._uU(41,"0-11 (Jan-Dec)"),t.qZA()(),t.TgZ(42,"tr")(43,"td",47),t._uU(44,"Day of Week"),t.qZA(),t.TgZ(45,"td",48),t._uU(46," : "),t.qZA(),t.TgZ(47,"td",49),t._uU(48,"0-6 (Sun-Sat)"),t.qZA()()()()(),t.TgZ(49,"div",50)(50,"span"),t._uU(51,"Note:- "),t.qZA(),t.TgZ(52,"span")(53,"a",40),t._uU(54,"Reference"),t.qZA(),t._uU(55," is having only 5 fields and this cron expression support 6 fields, precision upto seconds."),t.qZA()()()())}function q(l,h){1&l&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function Q(l,h){1&l&&(t.TgZ(0,"span"),t._uU(1,"Update interval"),t.qZA())}function G(l,h){if(1&l){const i=t.EpF();t.TgZ(0,"button",51),t.NdJ("click",function(){t.CHM(i);const d=t.oxw();return t.KtG(d.save())}),t._UZ(1,"i",52),t.YNc(2,q,2,0,"span",4),t.YNc(3,Q,2,0,"span",4),t.qZA()}if(2&l){const i=t.oxw();t.Q6J("disabled",i.form.invalid),t.xp6(2),t.Q6J("ngIf",i.data.mode===i.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",i.data.mode===i.EFormMode.EDIT)}}function x(l,h){1&l&&t._UZ(0,"p-progressSpinner",53)}let k=(()=>{class l{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;dataProviderS;eventCenterCS;data;loading={form:!1};EFormMode=u.D;form;ESchedulerInterval=M.M;subscriptions=[];intervalList=[];timezoneList=[];constructor(i,c,d,D,R,H,j,z,X){this.fb=i,this.ns=c,this.schedulerS=d,this.generalS=D,this.constantsS=R,this.authCS=H,this.monacoS=j,this.dataProviderS=z,this.eventCenterCS=X}ngOnInit(){var i=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.timezoneList=this.dataProviderS.getTimeZones(),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var c=(0,g.Z)(function*(d){d&&(i.form.enable(),d.action===m.F.OPEN_FORM_IN_EDIT_MODE?(i.form.reset(),i.form.patchValue(i.data.formData)):d.action===m.F.OPEN_FORM_IN_VIEW_MODE?(i.form.patchValue(i.data.formData),i.form.reset(),i.form.disable()):d.action===m.F.OPEN_FORM_IN_ADD_MODE&&(i.form.reset(),i.form.get("active").setValue(!1)))});return function(d){return c.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({timeZone:[null,[e.kI.required]],timeInterval:[null,[e.kI.required]],customInterval:[null,[]],active:[null,[]]}),this.manageValidations()}showModal(){$("#idIntervals").modal("show"),this.form.get(p._h.active).setValue(!0)}hideModal(){$("#idIntervals").modal("hide")}manageValidations(){const i=this.form.get("timeInterval"),c=this.form.get("customInterval");i.valueChanges.subscribe(d=>{c.setValidators(d===M.M.CUSTOM?[e.kI.required]:[]),c.updateValueAndValidity()})}validateCronExpression(i){var c=this;return(0,g.Z)(function*(){const d=c.form.get("customInterval"),D=d.value;(yield c.schedulerS.isCronExpressionValid(D).toPromise()).data.valid||d.setValue("")})()}save(){var i=this;return(0,g.Z)(function*(){const c=i.form.value;try{if(i.data.mode===u.D.ADD)i.eventCenterCS.intervalArr.next(c);else if(i.data.mode===u.D.EDIT){const d=Object.assign(i.data.formData,c);i.eventCenterCS.intervalArr.next(d)}i.data.eventChannel.emit({action:i.data.mode===u.D.ADD?m.F.SAVED:m.F.UPDATED})}catch(d){console.log(d)}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(c){return new(c||l)(t.Y36(e.qu),t.Y36(C.W),t.Y36(S.Z),t.Y36(I.b),t.Y36(A.L),t.Y36(y.D),t.Y36(F.b),t.Y36(O.B),t.Y36(L.M))};static \u0275cmp=t.Xpm({type:l,selectors:[["app-intervals-add-edit"]],inputs:{data:"data"},decls:50,vars:13,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idIntervals","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html#interval-time","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-8"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-2","input-group","input-group-sm"],[1,"input-group-prepend"],["id","spanTimeInterval",1,"input-group-text","form-control","form-control-sm"],[1,"col-10","pl-0"],["formControlName","timeInterval","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-4"],["class","row",4,"ngIf"],["formControlName","timeZone","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-6","col-form-label","col-form-label-sm","text-right"],[1,"col-6","col-form-label","col-form-label-sm","align-middle","mb-0","pt-1"],["formControlName","active",3,"binary"],["class","form-group row mt-5",4,"ngIf"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","customInterval","name","customInterval","placeholder","Custom","spellcheck","false","type","text",1,"form-control","form-control-sm",3,"blur"],["class","text-center",4,"ngIf"],[1,"text-center"],["href","https://crontab.guru","target","_blank",1,"text-info",2,"text-decoration","underline"],[1,"form-group","row","mt-5"],[1,"col-12"],[1,"border"],[1,"h6","border-bottom","p-3","m-0","text-center"],[1,"p-3","font-monospaced"],[1,"table","table-sm","table-condensed","w-100","mb-0"],[1,"text-right","pr-1","border-0",2,"width","49%"],[1,"border-0",2,"width","10px"],[1,"border-0"],[1,"text-center","small","border-left","border-right","border-bottom","p-2"],["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(c,d){1&c&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,N,3,0,"span",4),t.YNc(5,B,3,0,"span",4),t.YNc(6,J,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6)(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"a",9),t._UZ(12,"img",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"form",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16),t._uU(19,"Time Interval"),t.qZA(),t.TgZ(20,"div",14)(21,"div",15)(22,"div",17)(23,"div",18)(24,"span",19),t._uU(25,"Every "),t.qZA()()(),t.TgZ(26,"div",20),t._UZ(27,"p-dropdown",21),t.qZA()()()()(),t.TgZ(28,"div",22),t.YNc(29,V,6,1,"div",23),t.qZA()(),t.TgZ(30,"div",13)(31,"div",14)(32,"div",15)(33,"label",16),t._uU(34,"Time Zone"),t.qZA(),t.TgZ(35,"div",14),t._UZ(36,"p-dropdown",24),t.qZA()()(),t.TgZ(37,"div",22)(38,"div",15)(39,"label",25),t._uU(40,"Active"),t.qZA(),t.TgZ(41,"label",26),t._UZ(42,"p-checkbox",27),t.qZA()()()(),t.YNc(43,U,56,0,"div",28),t.qZA()(),t.TgZ(44,"div",29)(45,"button",30),t._UZ(46,"i",31),t._uU(47," Close"),t.qZA(),t.YNc(48,G,4,3,"button",32),t.qZA(),t.YNc(49,x,1,0,"p-progressSpinner",33),t.qZA()()()),2&c&&(t.xp6(4),t.Q6J("ngIf",d.data.mode===d.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",d.data.mode===d.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",d.data.mode===d.EFormMode.EDIT),t.xp6(8),t.Q6J("formGroup",d.form),t.xp6(13),t.Q6J("options",d.intervalList)("filter",!0),t.xp6(2),t.Q6J("ngIf",d.form.get("timeInterval").value===d.ESchedulerInterval.CUSTOM),t.xp6(7),t.Q6J("options",d.timezoneList)("filter",!0),t.xp6(6),t.Q6J("binary",!0),t.xp6(1),t.Q6J("ngIf",d.form.get("timeInterval").value===d.ESchedulerInterval.CUSTOM),t.xp6(5),t.Q6J("ngIf",d.data.mode!==d.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",d.loading.form))},dependencies:[e._Y,e.Fj,e.JJ,e.JL,e.sg,e.u,P.O5,w.y,b.G,W.Lt,K.XZ],encapsulation:2})}return l})()},98479:(ee,Z,s)=>{s.d(Z,{o:()=>ve});var g=s(15861),e=s(94946),p=s(60095),u=s(33157),m=s(90328),M=s(6990),C=s(39490),S=s(59361),I=s(51162),A=s(20553),y=s(45085),F=s(91601),O=s(3531),L=s(39989),P=s(99961),w=s(31042),b=s(77240),W=s(27414),K=s(95852),N=s(45809),B=s(53429),J=s(25405),Y=s(32915),V=s(81429),U=s(96814),q=s(32660),Q=s(5860),G=s(756),x=s(95431),k=s(85219),l=s(97680),h=s(14844),i=s(33259),c=s(38057),d=s(25025),D=s(38487);const R=["intervalsAddEditC"],H=["insertCodeModalC"],j=["monacoEditorModalC"];function z(r,f){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",52),e._uU(2," Add Scheduler"),e.qZA())}function X(r,f){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",53),e._uU(2," View Scheduler"),e.qZA())}function te(r,f){if(1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",54),e._uU(2," Edit Scheduler "),e.TgZ(3,"span",55),e._uU(4),e.qZA()()),2&r){const o=e.oxw();e.xp6(4),e.Oqu(o.form.get("name").value)}}function ae(r,f){if(1&r&&(e.TgZ(0,"span",56),e._uU(1),e.qZA()),2&r){const o=e.oxw();e.xp6(1),e.hij("The system will allow ",o.form.get(o.ISchedulerProps.schedulerTimeoutInMinutes).value," minutes for the scheduler to complete its work.")}}function oe(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"div",57)(1,"app-monaco-editor",58),e.NdJ("editorGenerated",function(n){e.CHM(o);const _=e.oxw();return e.KtG(_.editorGenerated(n))}),e.qZA()()}if(2&r){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptionsSchedulers)}}function ne(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"span",59),e.NdJ("click",function(){e.CHM(o);const n=e.oxw();return e.KtG(n.add())}),e._UZ(1,"i",60),e.qZA()}}function se(r,f){1&r&&(e.TgZ(0,"tr"),e._UZ(1,"th",61),e.TgZ(2,"th"),e._uU(3,"Time Interval"),e.qZA(),e.TgZ(4,"th"),e._uU(5,"Time Zone"),e.qZA(),e.TgZ(6,"th"),e._uU(7,"Custom Interval"),e.qZA(),e.TgZ(8,"th",62),e._uU(9,"Action"),e.qZA()())}function re(r,f){1&r&&e._UZ(0,"i",67)}function ie(r,f){1&r&&e._UZ(0,"i",68)}function de(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"div",69)(1,"button",70),e.NdJ("click",function(n){e.CHM(o);const _=e.oxw().$implicit,v=e.oxw();return e.KtG(v.edit(n,_))}),e._UZ(2,"i",71),e.qZA(),e.TgZ(3,"button",72),e.NdJ("click",function(n){e.CHM(o);const _=e.oxw().$implicit,v=e.oxw();return e.KtG(v.deleteInterval(n,_))}),e._UZ(4,"i",73),e.qZA()()}}function le(r,f){if(1&r&&(e.TgZ(0,"tr",63)(1,"td"),e.YNc(2,re,1,0,"i",64),e.YNc(3,ie,1,0,"i",65),e.qZA(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td")(10,"span"),e._uU(11),e.qZA()(),e.TgZ(12,"td"),e.YNc(13,de,5,0,"div",66),e.qZA()()),2&r){const o=f.$implicit,a=e.oxw();e.Q6J("pSelectableRow",o),e.xp6(2),e.Q6J("ngIf",o.active),e.xp6(1),e.Q6J("ngIf",!o.active),e.xp6(3),e.hij("Every ",a.intervalListMap[o.timeInterval].name,""),e.xp6(2),e.Oqu(o.timeZone),e.xp6(3),e.Oqu(a.intervalListMap[o.timeInterval].name===a.ESchedulerInterval.CUSTOM?o.customInterval:""),e.xp6(2),e.Q6J("ngIf",!o.isReadOnly&&a.data.mode!==a.EFormMode.VIEW)}}function _e(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"a",74),e.NdJ("click",function(){e.CHM(o);const n=e.oxw();return e.KtG(n.viewError())}),e._uU(1,"View error"),e.qZA()}}function ce(r,f){1&r&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function me(r,f){1&r&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function ue(r,f){if(1&r){const o=e.EpF();e.TgZ(0,"button",75),e.NdJ("click",function(){e.CHM(o);const n=e.oxw();return e.KtG(n.save(!0))}),e._UZ(1,"i",76),e.YNc(2,ce,2,0,"span",4),e.YNc(3,me,2,0,"span",4),e.qZA()}if(2&r){const o=e.oxw();e.Q6J("disabled",o.form.invalid),e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function pe(r,f){1&r&&e._UZ(0,"p-progressSpinner",77)}const fe=function(r){return{"text-danger font-weight-bold":r}};let ve=(()=>{class r{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;instanceS;notificationS;eventCenterCS;eventCenterS;dataProviderS;generalCS;data;loading={form:!1};EFormMode=m.D;form;subscriptions=[];ESchedulerInterval=C.M;editorSchedulers;editorOptionsSchedulers={readOnly:!1,language:"typescript",contextmenu:!0};intervalList=[];selectedRows=[];rows=[];rowsMap={};dataItem={mode:m.D.ADD,eventChannel:new e.vpe,formData:void 0};intervalListMap={};gridKey="id";idCounter=0;BE_HOST_PORT=A.N.BE_HOST_PORT;DOCS_HOST_PORT=A.N.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};ISchedulerProps=I.qH;intervalsAddEditC;insertCodeModalC;viewDockerfileModelC;constructor(o,a,n,_,v,T,E,he,Ee,ge,Me,Ce,Ie){this.fb=o,this.ns=a,this.schedulerS=n,this.generalS=_,this.constantsS=v,this.authCS=T,this.monacoS=E,this.instanceS=he,this.notificationS=Ee,this.eventCenterCS=ge,this.eventCenterS=Me,this.dataProviderS=Ce,this.generalCS=Ie}ngOnInit(){var o=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.intervalListMap=M.keyBy(this.intervalList,I.GR.id),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,g.Z)(function*(n){if(n)if(o.form.enable(),n.action===u.F.OPEN_FORM_IN_EDIT_MODE)yield o.updateEditCommon();else if(n.action===u.F.OPEN_FORM_IN_VIEW_MODE)yield o.updateEditCommon(),o.form.disable();else if(n.action===u.F.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.rows=[];const _=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,y.R.SCHEDULERS).toPromise();o.generalCS.setValueInEditor(o,"editorSchedulers",_.data),o.form.get(I.qH.isActive).setValue(!1),o.form.get(I.qH.runOnNativeProcess).setValue(!1)}});return function(n){return a.apply(this,arguments)}}())),this.subscriptions.push(this.dataItem.eventChannel.subscribe(function(){var a=(0,g.Z)(function*(n){n&&(o.form.enable(),(n.action===u.F.SAVED||n.action===u.F.UPDATED)&&(o.intervalsAddEditC.hideModal(),o.loadGridData()))});return function(n){return a.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterCS.intervalArr.subscribe(a=>{this.dataItem.mode===m.D.ADD&&(this.rows.unshift(a),this.loadGridData())}))}createForm(){this.form=this.fb.group({name:[null,[p.kI.required]],schedulerTimeoutInMinutes:[null,[p.kI.min(1),p.kI.max(43200)]],isActive:[null,[]],runOnNativeProcess:[null,[]]})}showInsertCodeModel(){this.generalCS.messageReceivedFor=S.H.All,this.insertCodeModalC.showModal(O.b.SchedulerManFormC)}updateEditCommon(){var o=this;return(0,g.Z)(function*(){const a=yield o.schedulerS.queryOne({find:{guid:o.data.formData.guid,user:o.authCS.gUser._id}});o.form.reset(),o.form.patchValue(a),o.rows=a.intervalArr||[],o.generalCS.setValueInEditor(o,"editorSchedulers",a.schedulerCode||""),o.loadGridData()})()}loadGridData(){this.selectedRows=[];for(const o of this.rows)o.id=this.idCounter++;this.rowsMap=M.keyBy(this.rows,this.gridKey)}reqActiveIndex=0;tabIndexReq={Basic:0,Code:1,Intervals:2};save(o){var a=this;return(0,g.Z)(function*(){const n=a.form.getRawValue();let _;_=a.data.formData&&a.data.formData._id?yield a.schedulerS.queryOne({find:{guid:a.data.formData.guid,user:a.authCS.gUser._id}}):{};const v=M.find(_.versions||[],{isActive:!0});v&&(v.apiCodeStr=a.editorSchedulers.getValue());const T=Object.assign({},_,n);T.user=a.authCS.getUserId(),T.intervalArr=a.rows,T.schedulerCode=a.editorSchedulers.getValue();for(const E of T?.versions||[])E.version=E.version.toString();try{let E;a.loading.form=!0,a.lastError=void 0,a.data.mode===m.D.ADD?E=yield a.schedulerS.post(T).toPromise():a.data.mode===m.D.EDIT&&(E=yield a.schedulerS.put(_._id,T,{select:I.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===m.D.ADD?a.constantsS.schedulers.addSuccess:a.constantsS.schedulers.editSuccess),a.data.eventChannel.emit({action:a.data.mode===m.D.ADD?u.F.SAVED:u.F.UPDATED,closeModal:o}),a.form.get("name").disable(),a.eventCenterS.schedulerSavedAndUpdate.next(!0),a.loading.form=!1}catch(E){"Please Provide Interval."===E.error.errors[0].message&&(a.reqActiveIndex=a.tabIndexReq.Intervals),a.loading.form=!1,a.ns.showErrorFromResponse(E.error||E,"Unable to save scheduler."),a.lastError=E.error}})()}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idSchedulerForm").modal("show")},100)}hideModal(){$("#idSchedulerForm").modal("hide")}add(){this.dataItem.formData=void 0,this.dataItem.mode=m.D.ADD,this.dataItem.eventChannel.emit({action:u.F.OPEN_FORM_IN_ADD_MODE}),this.intervalsAddEditC.showModal()}view(){this.dataItem.formData=this.rowsMap[this.selectedRows[0]],this.dataItem.mode=m.D.VIEW,this.dataItem.eventChannel.emit({action:u.F.OPEN_FORM_IN_VIEW_MODE}),this.intervalsAddEditC.showModal()}edit(o,a){o.stopPropagation(),o.preventDefault(),this.dataItem.formData=a,this.dataItem.mode=m.D.EDIT,this.dataItem.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),this.intervalsAddEditC.showModal()}deleteInterval(o,a){o.stopPropagation(),o.preventDefault(),this.rows.splice(this.rows.indexOf(a),1),this.notificationS.showSuccess(this.constantsS.interval.removePermanent)}editorGenerated(o){var a=this;return(0,g.Z)(function*(){a.editorSchedulers=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,n=>{a.form.valid&&a.save(!0)}),a.monacoS.addInsertCodeKeyBinding(o,n=>{a.generalCS.messageReceivedFor=S.H.All,a.data.mode!==m.D.VIEW&&a.insertCodeModalC.showModal(O.b.SchedulerManFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(n=>{n.type&&n.type===L.g.TEXT_COPIED&&n.componentName===O.b.SchedulerManFormC&&(a.monacoS.insertAtCursor(o,n.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),F.d.json)}dblClickIntervalOpenModel(o){this.selectedRows.length&&this.data.mode!==m.D.VIEW&&this.edit(o,this.selectedRows[0])}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.schedulerSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||r)(e.Y36(p.qu),e.Y36(P.W),e.Y36(w.Z),e.Y36(b.b),e.Y36(W.L),e.Y36(K.D),e.Y36(N.b),e.Y36(B.E),e.Y36(P.W),e.Y36(J.M),e.Y36(Y.u),e.Y36(V.B),e.Y36(b.b))};static \u0275cmp=e.Xpm({type:r,selectors:[["app-w-scheduler-man-form"]],viewQuery:function(a,n){if(1&a&&(e.Gf(R,5),e.Gf(H,5),e.Gf(j,5)),2&a){let _;e.iGM(_=e.CRH())&&(n.intervalsAddEditC=_.first),e.iGM(_=e.CRH())&&(n.insertCodeModalC=_.first),e.iGM(_=e.CRH())&&(n.viewDockerfileModelC=_.first)}},inputs:{data:"data"},decls:69,vars:30,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idSchedulerForm","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"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.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"],[1,"w-100",3,"activeIndex","activeIndexChange"],["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"],["formControlName","schedulerTimeoutInMinutes","name","schedulerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm",3,"min"],["class","mt-1px small text-info",4,"ngIf"],[1,"align-middle","mb-0","pt-1"],["formControlName","isActive","label","Active",3,"binary"],["formControlName","runOnNativeProcess","pTooltip","Code will run on actual process and not in sandbox, so be careful with code. You can not use sandbox packages in this mode. You can use all Node.js packages + some packages on which API Maker is dependent on. You can use features of global variable 'g'.","label","Run Native",3,"ngClass","binary"],["header","Code"],["class","overflow-hidden mb-3","style","height: calc(100vh - 270px);",4,"ngIf"],["header","Intervals"],[1,"overflow-auto",2,"height","calc(100vh - 206px)"],[1,"card","shadow-sm","h-100","mr-1","ml-1"],[1,"card-header"],[1,"fas","fa-stopwatch","text-warning","fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html#create-intervals-in-scheduler","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","pTooltip","Add New",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","200px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[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,"data"],["intervalsAddEditC",""],[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,"mt-1px","small","text-info"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 270px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[2,"width","40px"],[2,"width","100px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],[1,"text-center"],["pTooltip","Edit",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Delete",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw","cursor-pointer"],["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,n){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,z,3,0,"span",4),e.YNc(5,X,3,0,"span",4),e.YNc(6,te,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return n.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return n.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"p-tabView",14),e.NdJ("activeIndexChange",function(v){return n.reqActiveIndex=v}),e.TgZ(17,"p-tabPanel",15)(18,"form",16)(19,"div",17)(20,"label",18),e._uU(21,"Name"),e.qZA(),e.TgZ(22,"div",19),e._UZ(23,"input",20),e.qZA()(),e.TgZ(24,"div",17)(25,"label",18),e._uU(26,"Timeout in minutes"),e.qZA(),e.TgZ(27,"div",19),e._UZ(28,"input",21),e.YNc(29,ae,2,1,"span",22),e.qZA()(),e.TgZ(30,"div",17),e._UZ(31,"label",18),e.TgZ(32,"div",19)(33,"label",23),e._UZ(34,"p-checkbox",24),e.qZA()()(),e.TgZ(35,"div",17),e._UZ(36,"label",18),e.TgZ(37,"div",19)(38,"label",23),e._UZ(39,"p-checkbox",25),e.qZA()()()()(),e.TgZ(40,"p-tabPanel",26),e.YNc(41,oe,2,2,"div",27),e.qZA(),e.TgZ(42,"p-tabPanel",28)(43,"div",29)(44,"div",30)(45,"div",31)(46,"span"),e._UZ(47,"i",32),e._uU(48," Interval"),e.qZA(),e.TgZ(49,"a",33),e._UZ(50,"img",34),e.qZA(),e.YNc(51,ne,2,0,"span",35),e.qZA(),e.TgZ(52,"div",36)(53,"p-table",37),e.NdJ("selectionChange",function(v){return n.selectedRows=v})("dblclick",function(v){return n.dblClickIntervalOpenModel(v)}),e.YNc(54,se,10,0,"ng-template",38),e.YNc(55,le,14,7,"ng-template",39),e.qZA()()()()()()(),e.TgZ(56,"div",40),e.YNc(57,_e,2,0,"a",41),e.TgZ(58,"button",42),e.NdJ("click",function(){return n.hideModal()}),e._UZ(59,"i",43),e._uU(60," Close"),e.qZA(),e.YNc(61,ue,4,3,"button",44),e.qZA(),e.YNc(62,pe,1,0,"p-progressSpinner",45),e.qZA()()(),e._UZ(63,"app-intervals-add-edit",46,47)(65,"app-insert-code-modal",48,49)(67,"app-monaco-editor-modal",50,51)),2&a&&(e.xp6(4),e.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT),e.xp6(10),e.Q6J("activeIndex",n.reqActiveIndex),e.xp6(2),e.Q6J("formGroup",n.form),e.xp6(10),e.Q6J("min",1),e.xp6(1),e.Q6J("ngIf",n.form.get(n.ISchedulerProps.schedulerTimeoutInMinutes).value),e.xp6(5),e.Q6J("binary",!0),e.xp6(5),e.Q6J("ngClass",e.VKq(28,fe,!0===n.form.get(n.ISchedulerProps.runOnNativeProcess).value))("binary",!0),e.xp6(2),e.Q6J("ngIf",n.shouldLoadMonacoEditor),e.xp6(10),e.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(4),e.Q6J("ngIf",n.lastError),e.xp6(4),e.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.loading.form),e.xp6(1),e.Q6J("data",n.dataItem),e.xp6(2),e.Q6J("frameId","idInsertCodeSchedulers")("modalId","idInsertCodeSchedulersForm")("docsHostPort",n.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInScheduler")("editorOptionsMonacoEditorModal",n.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[p._Y,p.Fj,p.wV,p.JJ,p.JL,p.qQ,p.sg,p.u,U.mk,U.O5,q.y,Q.P,G.O,x.iA,k.jx,x.Ei,l.G,h.xf,h.x4,i.u,c.XZ,d.A,D.L],encapsulation:2})}return r})()},10885:(ee,Z,s)=>{s.d(Z,{R:()=>t});var g=s(17017),u=(s(98479),s(38487),s(44950)),m=s(94946);let t=(()=>{class C{static \u0275fac=function(A){return new(A||C)};static \u0275mod=m.oAB({type:C});static \u0275inj=m.cJS({imports:[g.u,u.A]})}return C})()}}]);
@@ -0,0 +1,61 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Monaco Editor</title>
6
+ <style>
7
+ @font-face {
8
+ font-family: 'JetBrains Mono';
9
+ src: url('../../styles/fonts/JetBrainsMonoRegular.ttf');
10
+ }
11
+ * { margin: 0; padding: 0; box-sizing: border-box; }
12
+ html, body { width: 100%; height: 100%; overflow: hidden; background: #1e1e1e; }
13
+ #editor { width: 100%; height: 100%; }
14
+ .highlightMatchedWord {
15
+ background: #ff0 !important;
16
+ color: #000 !important;
17
+ font-weight: 700 !important;
18
+ }
19
+ .highlightLineHavingError {
20
+ border-bottom: 1px dashed #ff4d4f !important;
21
+ }
22
+ #reload-types-btn {
23
+ position: fixed;
24
+ top: 50px;
25
+ right: 9px;
26
+ z-index: 1000;
27
+ background: #2d2d2d;
28
+ border: 1px solid #555;
29
+ color: #dfdfdf;
30
+ font-size: 12px;
31
+ padding: 2px 7px;
32
+ border-radius: 3px;
33
+ cursor: pointer;
34
+ opacity: 0;
35
+ pointer-events: none;
36
+ font-family: monospace;
37
+ line-height: 1.5;
38
+ transition: opacity 0.2s;
39
+ user-select: none;
40
+ }
41
+ #reload-types-btn.visible { opacity: 0.55; pointer-events: auto; }
42
+ #reload-types-btn.visible:hover { opacity: 1; background: #3c3c3c; }
43
+ #reload-types-btn.loading { opacity: 0.3; pointer-events: none; cursor: default; }
44
+ </style>
45
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/loader.min.js"></script>
46
+ <script>
47
+ require.config({
48
+ paths: { vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs' },
49
+ });
50
+ require(['vs/editor/editor.main'], function() {
51
+ const s = document.createElement('script');
52
+ s.src = './index.js';
53
+ document.head.appendChild(s);
54
+ });
55
+ </script>
56
+ </head>
57
+ <body>
58
+ <div id="editor"></div>
59
+ <button id="reload-types-btn" title="Reload fresh types (bypass cache)">&#x21BA; Types</button>
60
+ </body>
61
+ </html>