function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }

function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }

function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }

function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }

function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }

function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }

function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }

function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }

function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }

function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }

function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }

function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["default~components-nethavoc-configuration-nethavoc-configuration-module~components-nethavoc-home-net~2b6c53ef"], {
  /***/
  "./src/app/pages/home/netHavoc-v2/services/nethavoc-http.service.ts":
  /*!**************************************************************************!*\
    !*** ./src/app/pages/home/netHavoc-v2/services/nethavoc-http.service.ts ***!
    \**************************************************************************/

  /*! exports provided: NHPreLoadedState, NHPreLoadingState, NHPreLoadingErrorState, NethavocHttpService */

  /***/
  function _src_app_pages_home_netHavocV2_services_nethavocHttpServiceTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NHPreLoadedState", function () {
      return NHPreLoadedState;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NHPreLoadingState", function () {
      return NHPreLoadingState;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NHPreLoadingErrorState", function () {
      return NHPreLoadingErrorState;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NethavocHttpService", function () {
      return NethavocHttpService;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var src_app_core_store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! src/app/core/store/store */
    "./src/app/core/store/store.ts");
    /* harmony import */


    var src_environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! src/environments/environment */
    "./src/environments/environment.ts");
    /* harmony import */


    var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! rxjs */
    "./node_modules/rxjs/_esm2015/index.js");
    /* harmony import */


    var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! src/app/core/session/session.service */
    "./src/app/core/session/session.service.ts");
    /* harmony import */


    var src_app_shared_time_bar_service_time_bar_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/shared/time-bar/service/time-bar.service */
    "./src/app/shared/time-bar/service/time-bar.service.ts");

    var NHPreLoadedState = /*#__PURE__*/function (_src_app_core_store_s) {
      function NHPreLoadedState() {
        _classCallCheck(this, NHPreLoadedState);

        return _callSuper(this, NHPreLoadedState, arguments);
      }

      _inherits(NHPreLoadedState, _src_app_core_store_s);

      return _createClass(NHPreLoadedState);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_3__["Store"].AbstractIdealState);

    var NHPreLoadingState = /*#__PURE__*/function (_src_app_core_store_s2) {
      function NHPreLoadingState() {
        _classCallCheck(this, NHPreLoadingState);

        return _callSuper(this, NHPreLoadingState, arguments);
      }

      _inherits(NHPreLoadingState, _src_app_core_store_s2);

      return _createClass(NHPreLoadingState);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_3__["Store"].AbstractLoadingState);

    var NHPreLoadingErrorState = /*#__PURE__*/function (_src_app_core_store_s3) {
      function NHPreLoadingErrorState() {
        _classCallCheck(this, NHPreLoadingErrorState);

        return _callSuper(this, NHPreLoadingErrorState, arguments);
      }

      _inherits(NHPreLoadingErrorState, _src_app_core_store_s3);

      return _createClass(NHPreLoadingErrorState);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_3__["Store"].AbstractErrorState);

    var NethavocHttpService = /*#__PURE__*/function (_src_app_core_store_s4) {
      function NethavocHttpService(http, session, TimebarService) {
        var _this;

        _classCallCheck(this, NethavocHttpService);

        _this = _callSuper(this, NethavocHttpService);
        _this.http = http;
        _this.session = session;
        _this.TimebarService = TimebarService;
        _this.havocRunBroadcaster = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
        _this.havocRunObserver$ = _this.havocRunBroadcaster.asObservable();
        _this.havocRuntablestatusobj = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
        _this.havocRuntableObserver$ = _this.havocRuntablestatusobj.asObservable();
        _this.ScenarioListtablestatusobj = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
        _this.ScenarioListtableObserver$ = _this.ScenarioListtablestatusobj.asObservable();
        _this.isscenarioRunExecuted = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
        _this.scenarioRunExecuted$ = _this.isscenarioRunExecuted.asObservable();
        _this.havocEmailSettings = {}; // new restcall this.defaultBase = environment.api.nethavocAPI.base.defaultBase 

        _this.defaultBase = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.base.defaultBase;
        return _this;
      }

      _inherits(NethavocHttpService, _src_app_core_store_s4);

      return _createClass(NethavocHttpService, [{
        key: "getHavocRuns",
        value: function getHavocRuns(limit, offset) {
          var count = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
          var filterValues = arguments.length > 3 ? arguments[3] : undefined;

          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var payload = {
              limit: limit,
              offset: offset,
              count: count,
              project: filterValues === null || filterValues === void 0 ? void 0 : filterValues.project,
              subproject: filterValues === null || filterValues === void 0 ? void 0 : filterValues.subproject,
              scenarioName: filterValues === null || filterValues === void 0 ? void 0 : filterValues.scenarioName,
              scenarioStatus: filterValues === null || filterValues === void 0 ? void 0 : filterValues.scenarioStatus,
              duration: filterValues === null || filterValues === void 0 ? void 0 : filterValues.duration,
              started: filterValues === null || filterValues === void 0 ? void 0 : filterValues.started
            };
            this.doRestCall(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.havocRunslist.endpoint, payload, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in getHavocRuns", e);
            });
            return output;
          } catch (error) {
            console.error("Error in getHavocRuns", error);
          }
        }
      }, {
        key: "getDetailsHavocRuns",
        value: function getDetailsHavocRuns(havocRunNumber) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.havocRunslist.endpoint + "/" + havocRunNumber;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in getHavocRuns", e);
            });
            return output;
          } catch (error) {
            console.error("Error in getHavocRuns", error);
          }
        }
      }, {
        key: "lockUnlockRun",
        value: function lockUnlockRun(havocRunNumber, lockstatus) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.havocRunslist.endpoint + "/" + havocRunNumber + "/" + lockstatus;
            this.doRestCall(path.toString(), null, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in lockUnlockRun", e);
            });
            return output;
          } catch (error) {
            console.error("Error in lockUnlockRun", error);
          }
        }
      }, {
        key: "runScenario",
        value: function runScenario(json) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.runNetHavocScenario.endpoint;
            this.doRestCall(path.toString(), json, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in runScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in runScenario", error);
          }
        }
      }, {
        key: "enabledisableHavocs",
        value: function enabledisableHavocs(json, testRun, stateflag) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = "";
            if (!stateflag) path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.enabledisableHavocs.endpoint + "?testRun=" + testRun;else path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.getHavocsstate.endpoint + "?testRun=" + testRun; //(path: string, param: any, type: string, virtualPath?: string, localBase?: string)

            this.doRestCall(path.toString(), json, 'post', '/DashboardServer/v2/netHavoc/NethavocDataService/').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in runScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in runScenario", error);
          }
        }
      }, {
        key: "nethavocOldPostCall",
        value: function nethavocOldPostCall(restpath, testrun, jsonInfo, serverrestpath, resttype) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = "";
            if (testrun != null) path = restpath + "?tr=" + testrun;else path = restpath; //(path: string, param: any, type: string, virtualPath?: string, localBase?: string)

            this.doRestCall(path.toString(), jsonInfo, resttype, serverrestpath).subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in runScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in runScenario", error);
          }
        }
      }, {
        key: "nhHierarchicalCall",
        value: function nhHierarchicalCall(grpName, mgId, levels, url) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            setTimeout(function () {
              output.next(new NHPreLoadingState());
            }, 0);
            var timebarValue = this.TimebarService.getValue();
            var json = {
              "opType": "9",
              "tr": this.session.session.testRun.id,
              "cctx": this.session.session.cctx,
              "duration": {
                "st": timebarValue["time"]["frameStart"]["value"],
                "et": timebarValue["time"]["frameEnd"]["value"],
                "preset": "LIVE5",
                "viewBy": 600
              },
              "clientId": "Default",
              "appId": "Default",
              "glbMgId": "-1",
              "grpName": grpName,
              "mgId": mgId,
              "levels": levels,
              "subject": {
                "tags": []
              }
            };
            var commonJson = this.commonhierarchicalJson();
            var jsonInfo = Object.assign(json, commonJson); //(path: string, param: any, type: string, virtualPath?: string, localBase?: string)

            this.doRestCall(url, jsonInfo, 'post', src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.core.defaultBase.toString()).subscribe(function (result) {
              output.next(new NHPreLoadedState(result));
              output.complete();
            }, function (e) {
              output.error(new NHPreLoadingErrorState(e));
              output.complete();
              console.error("Error in fetch nhHierarchicalCall data", e);
            });
            return output;
          } catch (error) {
            console.error("Error in fetch nhHierarchicalCall data", error);
          }
        }
      }, {
        key: "commonhierarchicalJson",
        value: function commonhierarchicalJson() {
          try {
            var json = {};
            json = {
              activeOnly: "1"
            };
            return json;
          } catch (error) {
            console.log("Error in creating common json", error);
          }
        }
      }, {
        key: "deleteHavocRun",
        value: function deleteHavocRun(havocRun) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.deleteHavocRun.defaultBase + '/' + havocRun;
            this.doRestCall(path.toString(), null, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in deleteHavocRun", e);
            });
            return output;
          } catch (error) {
            console.error("Error in deleteHavocRun", error);
          }
        }
      }, {
        key: "deleteScenario",
        value: function deleteScenario(scenarioInfo) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.deleteScenario.defaultBase + "/".concat(scenarioInfo.project, "/").concat(scenarioInfo.subProject, "/").concat(scenarioInfo.scenarioName);
            this.doRestCall(path.toString(), null, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in deleteScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in deleteScenario", error);
          }
        }
      }, {
        key: "copyScenario",
        value: function copyScenario(json) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.copyScenario.defaultBase;
            this.doRestCall(path.toString(), json, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in copyScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in copyScenario", error);
          }
        }
      }, {
        key: "disableAllHavocs",
        value: function disableAllHavocs() {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.disableAllHavocs.defaultBase;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in disableAllHavocs", e);
            });
            return output;
          } catch (error) {
            console.error("Error in disableAllHavocs", error);
          }
        }
      }, {
        key: "editScenario",
        value: function editScenario(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.editScenario.defaultBase;
            path = path + query;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in editScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in editScenario", error);
          }
        }
      }, {
        key: "updateScenarios",
        value: function updateScenarios(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.updateScenario.endpoint;
            this.doRestCall(path.toString(), query, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in editScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in editScenario", error);
          }
        } //importhavocrun

      }, {
        key: "importhavocrunReq",
        value: function importhavocrunReq(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.importhavocrun.endpoint;
            this.doRestCall(path.toString(), query, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in editScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in editScenario", error);
          }
        }
      }, {
        key: "saveEmailconfiguration",
        value: function saveEmailconfiguration(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.saveEmailconfiguration.endpoint;
            this.doRestCall(path.toString(), query, 'post').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in editScenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in editScenario", error);
          }
        }
      }, {
        key: "getScenarioList",
        value: function getScenarioList(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.scenarioList.endpoint; //this.defaultBase = environment.api.nethavocAPI.base.defaultBase;

            path = path + query;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in getScenarioList", e);
            });
            return output;
          } catch (error) {
            console.error("Error in getScenarioList", error);
          }
        }
      }, {
        key: "getScenarioScheduleList",
        value: function getScenarioScheduleList(taskType) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.scenarioScheduleList.endpoint; //this.defaultBase = environment.api.nethavocAPI.base.defaultBase;

            path = path + "?taskType=" + taskType;
            this.doRestCall(path.toString(), null, 'get', '/DashboardServer/v2/schedule/task/').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in getScenarioScheduleList", e);
            });
            return output;
          } catch (error) {
            console.error("Error in getScenarioScheduleList", error);
          }
        }
      }, {
        key: "stopHavoc",
        value: function stopHavoc(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.stopHavoc.defaultBase;
            path = path + query;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in stopHavoc", e);
            });
            return output;
          } catch (error) {
            console.error("Error in stopHavoc", error);
          }
        }
      }, {
        key: "getHavocDesignData",
        value: function getHavocDesignData(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocData.havocDesign.defaultBase;
            path = path + query;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in getHavocDesignData", e);
            });
            return output;
          } catch (error) {
            console.error("Error in getHavocDesignData", error);
          }
        }
      }, {
        key: "doGET",
        value: function doGET(path, base) {
          return this.doRestCall(path, null, 'get', base);
        }
      }, {
        key: "doPOST",
        value: function doPOST(path, payload, base) {
          return this.doRestCall(path, payload, 'post', base);
        }
      }, {
        key: "doRestCall",
        value: function doRestCall(path, param, method, localBase) {
          var base = localBase || this.defaultBase;

          if (this.session.preSession.multiDc) {
            base = this.session.getNetHavocBasePath(base);
          }

          try {
            if (method == 'get') return this.controller.get(path, null, base);else if (method == 'post') return this.controller.post(path, param, base);else if (method == 'delete') return this.controller["delete"](path, base);else if (method == 'getForTxt') return this.controller.getForTextResp(path, null, base);else if (method == 'put') return this.controller.put(path, param, base);
          } catch (error) {
            console.error("Error in doRestCall", error);
          }
        } // getHavocJson(havoctype, platformflag = false) {
        //   if (!platformflag)
        //     havoctype = "/havocs/" + havoctype;
        //   const url: any = environment.nethavocNewJson + havoctype + ".json";
        //   return this.controller.get(url, null, '/');
        // }

      }, {
        key: "configureScenario",
        value: function configureScenario(scenarioInfo) {
          var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'post';

          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.saveHavoc.endpoint; // +`/${scenarioInfo.scenario.project}/${scenarioInfo.scenario.subProject}/${scenarioInfo.scenario.scenarioName}`;

            this.doRestCall(path.toString(), scenarioInfo, method).subscribe( // check use case virtual path
            function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in Saving Scenario", e);
            });
            return output;
          } catch (error) {
            console.error("Error in Saving Scenario", error);
          }
        }
      }, {
        key: "saveNHConfiguration",
        value: function saveNHConfiguration(configInfo) {
          console.log("configInfo ", configInfo);
        }
      }, {
        key: "getHavocStatus",
        value: function getHavocStatus(query) {
          try {
            var output = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
            var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].api.nethavocAPI.havocStatus.endpoint;
            path = path + query;
            this.doRestCall(path.toString(), null, 'get').subscribe(function (result) {
              output.next(result);
              output.complete();
            }, function (e) {
              output.error(e);
              output.complete();
              console.error("Error in getScenarioList", e);
            });
            return output;
          } catch (error) {
            console.error("Error in getScenarioList", error);
          }
        }
      }, {
        key: "getDataFromRESTUsingPOSTReq",
        value: function getDataFromRESTUsingPOSTReq(url, param, data, baseValue, cname) {
          try {
            // let base;
            var base = baseValue;

            if (base) {
              if (this.session.preSession.multiDc) {
                // console.log("this.sessionService.preSession.dcData -->>",this.sessionService.preSession.dcData);
                // const masterURL = this.sessionService.preSession.dcData.filter(e => e.master).map(e => e.url)[0];
                var masterURL;

                if (cname != '' && cname != undefined) {
                  masterURL = "/tomcat/" + cname;
                } else {
                  masterURL = "/node/ALL";
                }

                baseValue = masterURL + baseValue;
              }

              return this.controller.post(url + param, data, baseValue);
            }
          } catch (e) {
            console.error("Error in getDataFromRESTUsingPOSTReq()", e);
          }
        }
      }]);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_3__["Store"].AbstractService);

    NethavocHttpService.ctorParameters = function () {
      return [{
        type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_6__["SessionService"]
      }, {
        type: src_app_shared_time_bar_service_time_bar_service__WEBPACK_IMPORTED_MODULE_7__["TimebarService"]
      }];
    };

    NethavocHttpService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
      providedIn: 'root'
    })], NethavocHttpService);
    /***/
  }
}]);